SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
Public Member Functions | Private Attributes | List of all members
LcioEventSource Class Reference

Generates events from the MCParticle collection of an LCIO file. More...

#include <LcioEventSource.hh>

Inheritance diagram for LcioEventSource:
EventSourceWithInputFile EventSource Module

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
 

Detailed Description

Generates events from the MCParticle collection of an LCIO file.

Definition at line 21 of file LcioEventSource.hh.

Constructor & Destructor Documentation

◆ LcioEventSource()

LcioEventSource ( const std::string &  fname = "")

Class constructor.

Definition at line 11 of file LcioEventSource.cc.

◆ ~LcioEventSource()

~LcioEventSource ( )
virtual

Class destructor.

Definition at line 15 of file LcioEventSource.cc.

References LcioEventSource::m_eventGenerator.

Member Function Documentation

◆ beginEvent()

void beginEvent ( const G4Event *  anEvent)
virtual

Begin of event action which executes the superclass method.

Reimplemented from EventSourceWithInputFile.

Definition at line 54 of file LcioEventSource.cc.

References EventSourceWithInputFile::beginEvent().

◆ beginRun()

void beginRun ( const G4Run *  aRun)
virtual

Begin of run action which executes the superclass method.

Reimplemented from EventSourceWithInputFile.

Definition at line 49 of file LcioEventSource.cc.

References EventSourceWithInputFile::beginRun().

◆ close()

void close ( )
virtual

Close the LCIO file.

Implements EventSourceWithInputFile.

Definition at line 26 of file LcioEventSource.cc.

References LcioEventSource::m_eventGenerator, and EventSourceWithInputFile::m_fileIsOpen.

◆ generate()

void generate ( G4Event *  anEvent)
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.

◆ open()

void open ( )
virtual

◆ printCurrentEvent()

void printCurrentEvent ( )
virtual

Print out the current event.

Implements EventSourceWithInputFile.

Definition at line 40 of file LcioEventSource.cc.

References Singleton< MCParticleManager >::instance().

◆ readNextEvent()

void readNextEvent ( )
virtual

Member Data Documentation

◆ m_eventGenerator

MCParticleGenerator* m_eventGenerator
private

◆ m_reader

IO::LCReader* m_reader
private

Definition at line 73 of file LcioEventSource.hh.


The documentation for this class was generated from the following files: