|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
Generates events from the MCParticle collection of an LCIO file. More...
#include <LcioEventSource.hh>
Public Member Functions | |
| LcioEventSource (const std::string &fname="") | |
| virtual | ~LcioEventSource () |
| void | beginEvent (const G4Event *anEvent) |
| void | beginRun (const G4Run *aRun) |
| void | close () |
| void | generate (G4Event *anEvent) |
| void | open () |
| void | printCurrentEvent () |
| void | readNextEvent () |
Public Member Functions inherited from EventSourceWithInputFile | |
| virtual | ~EventSourceWithInputFile () |
| const std::string & | getFilename () |
| bool | isEOF () |
| void | reset () |
| void | setFilename (const std::string &filename) |
| unsigned int | skipEvents (unsigned int nevents) |
Public Member Functions inherited from EventSource | |
| virtual | ~EventSource () |
| virtual void | endEvent (const G4Event *event) |
| virtual void | endRun (const G4Run *run) |
Public Member Functions inherited from Module | |
| virtual | ~Module () |
| virtual void | cleanup () |
| bool | deleteOnExit () |
| const std::string & | getName () const |
| ModuleStatus | getStatus () const |
| virtual void | initialize () |
| LogStream & | log () |
| virtual void | postTracking (const G4Track *) |
| virtual void | preTracking (const G4Track *) |
| virtual void | stepping (const G4Step *) |
Private Attributes | |
| MCParticleGenerator * | m_eventGenerator |
| IO::LCReader * | m_reader |
Additional Inherited Members | |
Public Types inherited from Module | |
| enum | ModuleStatus { eOkay = 0 , eNotInitialized = 1 , eBadState = 2 , eFatalError = 3 } |
Public Attributes inherited from Module | |
| bool | m_deleteOnExit |
| LogStream * | m_log |
| std::string | m_name |
| ModuleStatus | m_status |
Protected Member Functions inherited from EventSourceWithInputFile | |
| EventSourceWithInputFile (const std::string &name, const std::string &filename="") | |
Protected Member Functions inherited from EventSource | |
| EventSource (const std::string &name) | |
Protected Member Functions inherited from Module | |
| Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true) | |
Protected Attributes inherited from EventSourceWithInputFile | |
| bool | m_eof |
| bool | m_fileIsNew |
| bool | m_fileIsOpen |
| bool | m_fileIsSet |
| std::string | m_filename |
Generates events from the MCParticle collection of an LCIO file.
Definition at line 21 of file LcioEventSource.hh.
| LcioEventSource | ( | const std::string & | fname = "" | ) |
Class constructor.
Definition at line 11 of file LcioEventSource.cc.
|
virtual |
Class destructor.
Definition at line 15 of file LcioEventSource.cc.
References LcioEventSource::m_eventGenerator.
|
virtual |
Begin of event action which executes the superclass method.
Reimplemented from EventSourceWithInputFile.
Definition at line 54 of file LcioEventSource.cc.
References EventSourceWithInputFile::beginEvent().
|
virtual |
Begin of run action which executes the superclass method.
Reimplemented from EventSourceWithInputFile.
Definition at line 49 of file LcioEventSource.cc.
References EventSourceWithInputFile::beginRun().
|
virtual |
Close the LCIO file.
Implements EventSourceWithInputFile.
Definition at line 26 of file LcioEventSource.cc.
References LcioEventSource::m_eventGenerator, and EventSourceWithInputFile::m_fileIsOpen.
|
virtual |
Generate a G4Event from the current MCParticle collection.
Implements EventSource.
Definition at line 45 of file LcioEventSource.cc.
References MCParticleGenerator::generateEvent(), and LcioEventSource::m_eventGenerator.
|
virtual |
Open the LCIO file.
Implements EventSourceWithInputFile.
Definition at line 20 of file LcioEventSource.cc.
References LcioEventSource::m_eventGenerator, EventSourceWithInputFile::m_fileIsOpen, and EventSourceWithInputFile::m_filename.
|
virtual |
Print out the current event.
Implements EventSourceWithInputFile.
Definition at line 40 of file LcioEventSource.cc.
References Singleton< MCParticleManager >::instance().
|
virtual |
Read the next event.
Implements EventSourceWithInputFile.
Definition at line 33 of file LcioEventSource.cc.
References MCParticleGenerator::getCurrentEvent(), EventSourceWithInputFile::m_eof, LcioEventSource::m_eventGenerator, and MCParticleGenerator::readNextEvent().
|
private |
Definition at line 74 of file LcioEventSource.hh.
Referenced by LcioEventSource::~LcioEventSource(), LcioEventSource::close(), LcioEventSource::generate(), LcioEventSource::open(), and LcioEventSource::readNextEvent().
|
private |
Definition at line 73 of file LcioEventSource.hh.