|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
Top-level controller of StdHep input. More...
#include <StdHepEventSource.hh>
Public Member Functions | |
| StdHepEventSource (const std::string &fname) | |
| 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 | |
| StdHepGenerator * | m_eventGenerator |
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 |
Top-level controller of StdHep input.
Definition at line 14 of file StdHepEventSource.hh.
| StdHepEventSource | ( | const std::string & | fname | ) |
Class constructor.
| [in] | fname | The file name. |
Definition at line 11 of file StdHepEventSource.cc.
|
virtual |
Begin of event action.
| [in] | anEvent | The G4Event that is tarting. |
Reimplemented from EventSourceWithInputFile.
Definition at line 56 of file StdHepEventSource.cc.
References EventSourceWithInputFile::beginEvent().
|
virtual |
Begin of run action.
| [in] | aRun | The G4Run that is starting. |
Reimplemented from EventSourceWithInputFile.
Definition at line 50 of file StdHepEventSource.cc.
References EventSourceWithInputFile::beginRun().
|
virtual |
Close the current file.
Implements EventSourceWithInputFile.
Definition at line 31 of file StdHepEventSource.cc.
References StdHepEventSource::m_eventGenerator, and EventSourceWithInputFile::m_fileIsOpen.
|
virtual |
Generate events.
| [in] | anEvent | The target G4Event. |
Implements EventSource.
Definition at line 15 of file StdHepEventSource.cc.
References StdHepGenerator::generateEvent(), and StdHepEventSource::m_eventGenerator.
|
virtual |
Open the current file for reading.
Implements EventSourceWithInputFile.
Definition at line 22 of file StdHepEventSource.cc.
References EventSourceWithInputFile::getFilename(), StdHepEventSource::m_eventGenerator, and EventSourceWithInputFile::m_fileIsOpen.
|
virtual |
Print out the current event.
Implements EventSourceWithInputFile.
Definition at line 45 of file StdHepEventSource.cc.
References Singleton< MCParticleManager >::instance().
|
virtual |
Read in the next event.
Implements EventSourceWithInputFile.
Definition at line 37 of file StdHepEventSource.cc.
References StdHepGenerator::getCurrentParticleCollection(), EventSourceWithInputFile::m_eof, StdHepEventSource::m_eventGenerator, and StdHepGenerator::readNextEvent().
|
private |
Definition at line 65 of file StdHepEventSource.hh.
Referenced by StdHepEventSource::close(), StdHepEventSource::generate(), StdHepEventSource::open(), and StdHepEventSource::readNextEvent().