hepmc - Diff between revs 2 and 65
Subversion Repositories:
| Rev 2 | Rev 65 | |||
|---|---|---|---|---|
| Line 38... | Line 38... | |||
| 38 | 38 | |||
| 39 | namespace HepMC { | 39 | namespace HepMC { | |
| 40 | 40 | |||
| 41 | class GenEvent; | 41 | class GenEvent; | |
| 42 | 42 | |||
| - | 43 | //! an example ParticleDataTable IO method | ||
| - | 44 | |||
| - | 45 | /// | ||
| - | 46 | /// \class IO_PDG_ParticleDataTable | ||
| - | 47 | /// Example of reading from file PDG98_ParticleDataTable.txt | ||
| - | 48 | /// | ||
| 43 | class IO_PDG_ParticleDataTable : public IO_BaseClass { | 49 | class IO_PDG_ParticleDataTable : public IO_BaseClass { | |
| 44 | public: | 50 | public: | |
| - | 51 | /// constructor using filename | ||
| 45 | IO_PDG_ParticleDataTable( const char* filename | 52 | IO_PDG_ParticleDataTable( const char* filename | |
| 46 | ="PDG98_ParticleDataTable.txt" ); | 53 | ="PDG98_ParticleDataTable.txt" ); | |
| 47 | virtual ~IO_PDG_ParticleDataTable(); | 54 | virtual ~IO_PDG_ParticleDataTable(); | |
| - | 55 | /// read the input and fill the table | ||
| 48 | bool fill_particle_data_table( ParticleDataTable* ); | 56 | bool fill_particle_data_table( ParticleDataTable* ); | |
| 49 | void add_quarks_to_table( ParticleDataTable& ); | 57 | void add_quarks_to_table( ParticleDataTable& ); | |
| - | 58 | /// write to ostr | ||
| 50 | void print( std::ostream& ostr = std::cout ) const; | 59 | void print( std::ostream& ostr = std::cout ) const; | |
| 51 | 60 | |||
| - | 61 | /// check the IO state | ||
| 52 | int rdstate() const { return (int)m_file.rdstate(); } | 62 | int rdstate() const { return (int)m_file.rdstate(); } | |
| 53 | protected: // for internal use only | 63 | protected: // for internal use only | |
| 54 | bool search_for_key_end( std::istream& in, const char* key ); | 64 | bool search_for_key_end( std::istream& in, const char* key ); | |
| - | 65 | /// read a line | ||
| 55 | void read_entry( ParticleDataTable* ); | 66 | void read_entry( ParticleDataTable* ); | |
| 56 | private: // following are not implemented | 67 | private: // following are not implemented | |
| 57 | void write_event( const GenEvent* ){} | 68 | void write_event( const GenEvent* ){} | |
| 58 | bool fill_next_event( GenEvent* ){ return 0; } | 69 | bool fill_next_event( GenEvent* ){ return 0; } | |
| 59 | void write_particle_data_table( const ParticleDataTable* ){} | 70 | void write_particle_data_table( const ParticleDataTable* ){} | |
