/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions
HepMC::IO_BaseClass Class Reference

all input/output classes inherit from IO_BaseClass More...

#include <IO_BaseClass.h>

Inheritance diagram for HepMC::IO_BaseClass:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~IO_BaseClass ()
virtual void write_event (const GenEvent *)=0
 write this GenEvent
virtual bool fill_next_event (GenEvent *)=0
 fill this GenEvent
virtual void write_particle_data_table (const ParticleDataTable *)=0
 write this ParticleDataTable
virtual bool fill_particle_data_table (ParticleDataTable *)=0
 fill this ParticleDataTable
virtual void print (std::ostream &ostr=std::cout) const
 write output to ostr
GenEventread_next_event ()
 do not over-ride
ParticleDataTableread_particle_data_table ()
 do not over-ride
virtual GenEvent *& operator>> (GenEvent *&)
 the same as read_next_event
virtual const GenEvent *& operator<< (const GenEvent *&)
 the same as write_event
virtual GenEvent *& operator<< (GenEvent *&)
 the same as write_event
virtual ParticleDataTable *& operator>> (ParticleDataTable *&)
 the same as read_particle_data_table
virtual const ParticleDataTable *& operator<< (const ParticleDataTable *&)
 the same as write_particle_data_table
virtual ParticleDataTable *& operator<< (ParticleDataTable *&)
 the same as write_particle_data_table

Detailed Description

all input/output classes inherit from IO_BaseClass

If you want to write a new IO class, then inherit from this class and re-define read_event() and write_event()

Definition at line 35 of file IO_BaseClass.h.


Constructor & Destructor Documentation

virtual HepMC::IO_BaseClass::~IO_BaseClass ( ) [inline, virtual]

Definition at line 37 of file IO_BaseClass.h.

{}

Member Function Documentation

virtual void HepMC::IO_BaseClass::write_event ( const GenEvent ) [pure virtual]
virtual bool HepMC::IO_BaseClass::fill_next_event ( GenEvent ) [pure virtual]
virtual void HepMC::IO_BaseClass::write_particle_data_table ( const ParticleDataTable ) [pure virtual]
virtual bool HepMC::IO_BaseClass::fill_particle_data_table ( ParticleDataTable ) [pure virtual]
void HepMC::IO_BaseClass::print ( std::ostream &  ostr = std::cout) const [inline, virtual]

write output to ostr

Reimplemented in HepMC::IO_Ascii, HepMC::IO_AsciiParticles, HepMC::IO_ExtendedAscii, HepMC::IO_GenEvent, HepMC::IO_HEPEVT, HepMC::IO_HERWIG, and HepMC::IO_PDG_ParticleDataTable.

Definition at line 117 of file IO_BaseClass.h.

                                                            { 
        ostr << "IO_BaseClass: abstract parent I/O class. " <<  std::endl;
    }
GenEvent * HepMC::IO_BaseClass::read_next_event ( ) [inline]

do not over-ride

creates a new event and fills it by calling the sister method read_next_event( GenEvent* )

Definition at line 87 of file IO_BaseClass.h.

                                                   {
        // 
        // 1. create an empty event container
        GenEvent* evt = new GenEvent();
        // 2. fill the evt container - if the read is successful, return the
        //    pointer, otherwise return null and delete the evt
        if ( fill_next_event( evt ) ) return evt;
        // note: the below delete is only reached if read fails
        //       ... thus there is not much overhead in new then delete 
        //       since this statement is rarely reached
        delete evt;
        return 0;
    }
ParticleDataTable * HepMC::IO_BaseClass::read_particle_data_table ( ) [inline]

do not over-ride

creates a new particle data table and fills it by calling the sister method read_particle_data_table( ParticleDataTable* )

Definition at line 103 of file IO_BaseClass.h.

                                                                     {
        //
        // 1. create an empty pdt
        ParticleDataTable* pdt = new ParticleDataTable();
        // 2. fill the pdt container - if the read is successful, return the
        //    pointer, otherwise return null and delete the evt
        if ( fill_particle_data_table( pdt ) ) return pdt;
        // next statement is only reached if read fails
        delete pdt;
        return 0;
    }
GenEvent *& HepMC::IO_BaseClass::operator>> ( GenEvent *&  evt) [inline, virtual]

the same as read_next_event

Definition at line 121 of file IO_BaseClass.h.

                                                              {
        evt = read_next_event();
        return evt;
    }
const GenEvent *& HepMC::IO_BaseClass::operator<< ( const GenEvent *&  evt) [inline, virtual]

the same as write_event

Definition at line 126 of file IO_BaseClass.h.

                                                                     {
        write_event( evt );
        return evt;
    }
GenEvent *& HepMC::IO_BaseClass::operator<< ( GenEvent *&  evt) [inline, virtual]

the same as write_event

Definition at line 132 of file IO_BaseClass.h.

                                                               {
        write_event( evt );
        return evt;
    }
ParticleDataTable *& HepMC::IO_BaseClass::operator>> ( ParticleDataTable *&  pdt) [inline, virtual]

the same as read_particle_data_table

Definition at line 137 of file IO_BaseClass.h.

                                                                    {
        pdt = read_particle_data_table();
        return pdt;
    }
const ParticleDataTable *& HepMC::IO_BaseClass::operator<< ( const ParticleDataTable *&  pdt) [inline, virtual]

the same as write_particle_data_table

Definition at line 143 of file IO_BaseClass.h.

                                                                             {
        write_particle_data_table( pdt );
        return pdt;
    }
ParticleDataTable *& HepMC::IO_BaseClass::operator<< ( ParticleDataTable *&  pdt) [inline, virtual]

the same as write_particle_data_table

Definition at line 149 of file IO_BaseClass.h.

                                                                              {
        write_particle_data_table( pdt );
        return pdt;
    }

The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:49:37 for HepMC by doxygen 1.7.4