Warning, file /include/HepMC/StreamHelpers.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002 #ifndef HEPMC_STREAM_HELPERS_H
0003 #define HEPMC_STREAM_HELPERS_H
0004
0005
0006
0007
0008
0009
0010
0011 #include <ostream>
0012 #include <istream>
0013
0014 #include "HepMC/GenEvent.h"
0015 #include "HepMC/TempParticleMap.h"
0016
0017 namespace HepMC {
0018
0019 namespace detail {
0020
0021
0022 std::ostream & establish_output_stream_info( std::ostream & );
0023
0024 std::istream & establish_input_stream_info( std::istream & );
0025
0026
0027
0028 std::istream & read_vertex( std::istream &, TempParticleMap &, GenVertex * );
0029
0030
0031
0032 std::istream & read_particle( std::istream&, TempParticleMap &, GenParticle * );
0033
0034
0035 inline std::ostream & output( std::ostream & os, const double& d ) {
0036 if( os ) {
0037 if ( d == 0. ) {
0038 os << ' ' << (int)0;
0039 } else {
0040 os << ' ' << d;
0041 }
0042 }
0043 return os;
0044 }
0045
0046
0047 inline std::ostream & output( std::ostream & os, const float& d ) {
0048 if( os ) {
0049 if ( d == 0. ) {
0050 os << ' ' << (int)0;
0051 } else {
0052 os << ' ' << d;
0053 }
0054 }
0055 return os;
0056 }
0057
0058
0059 inline std::ostream & output( std::ostream & os, const int& i ) {
0060 if( os ) {
0061 if ( i == 0. ) {
0062 os << ' ' << (int)0;
0063 } else {
0064 os << ' ' << i;
0065 }
0066 }
0067 return os;
0068 }
0069
0070
0071 inline std::ostream & output( std::ostream & os, const long& i ) {
0072 if( os ) {
0073 if ( i == 0. ) {
0074 os << ' ' << (int)0;
0075 } else {
0076 os << ' ' << i;
0077 }
0078 }
0079 return os;
0080 }
0081
0082
0083 inline std::ostream & output( std::ostream & os, const char& c ) {
0084 if( os ) {
0085 if ( c ) {
0086 os << c;
0087 } else {
0088 os << ' ' ;
0089 }
0090 }
0091 return os;
0092 }
0093
0094
0095 std::istream & find_event_end( std::istream & );
0096
0097 }
0098
0099 }
0100
0101 #endif
0102