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

The virtual base class for a physics event source such as a StdHep file. More...

#include <EventSource.hh>

Inheritance diagram for EventSource:
Module EventSourceWithInputFile GPSEventSource ParticleGunEventSource LHEEventSource LcioEventSource StdHepEventSource

Public Member Functions

virtual ~EventSource ()
 
virtual void beginEvent (const G4Event *event)
 
virtual void beginRun (const G4Run *run)
 
virtual void endEvent (const G4Event *event)
 
virtual void endRun (const G4Run *run)
 
virtual void generate (G4Event *event)=0
 
virtual void printCurrentEvent ()=0
 
virtual void reset ()
 
virtual unsigned int skipEvents (unsigned int n)
 
- 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 *)
 

Protected Member Functions

 EventSource (const std::string &name)
 
- Protected Member Functions inherited from Module
 Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true)
 

Private Attributes

std::string m_name
 
int nEventsGenerated
 

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
 

Detailed Description

The virtual base class for a physics event source such as a StdHep file.

Definition at line 19 of file EventSource.hh.

Constructor & Destructor Documentation

◆ EventSource()

EventSource ( const std::string &  name)
protected

Class constructor.

Definition at line 12 of file EventSource.cc.

◆ ~EventSource()

~EventSource ( )
virtual

Class destructor.

Definition at line 9 of file EventSource.cc.

Member Function Documentation

◆ beginEvent()

void beginEvent ( const G4Event *  event)
virtual

Hook for beginning of an event.

Parameters
[in]eventThe Geant4 event.

Reimplemented from Module.

Reimplemented in EventSourceWithInputFile, StdHepEventSource, LHEEventSource, and LcioEventSource.

Definition at line 25 of file EventSource.cc.

Referenced by EventSourceManager::beginEvent().

◆ beginRun()

void beginRun ( const G4Run *  run)
virtual

Hook for the beginning of a run.

Parameters
[in]runThe Geant4 run.

Reimplemented from Module.

Reimplemented in EventSourceWithInputFile, StdHepEventSource, LHEEventSource, and LcioEventSource.

Definition at line 33 of file EventSource.cc.

Referenced by EventSourceManager::beginRun().

◆ endEvent()

void endEvent ( const G4Event *  event)
virtual

Hook for end of an event.

Parameters
[in]eventThe Geant4 event.

Reimplemented from Module.

Definition at line 29 of file EventSource.cc.

Referenced by EventSourceManager::endEvent().

◆ endRun()

void endRun ( const G4Run *  run)
virtual

Hook for the end of a run.

Parameters
[in]runThe Geant4 run.

Reimplemented from Module.

Definition at line 37 of file EventSource.cc.

Referenced by EventSourceManager::endRun().

◆ generate()

virtual void generate ( G4Event *  event)
pure virtual

Generate an event.

Parameters
[in]eventThe Geant4 event to be modified.

Implemented in ParticleGunEventSource, GPSEventSource, StdHepEventSource, LHEEventSource, and LcioEventSource.

Referenced by EventSourceManager::generate().

◆ printCurrentEvent()

virtual void printCurrentEvent ( )
pure virtual

◆ reset()

void reset ( )
virtual

Reset the event source.

Reimplemented from Module.

Reimplemented in EventSourceWithInputFile.

Definition at line 16 of file EventSource.cc.

Referenced by EventSourceManager::resetCurrentEventSource().

◆ skipEvents()

unsigned int skipEvents ( unsigned int  n)
virtual

Skip a number of events in the source.

Parameters
[in]nThe number of events to skip.

Reimplemented in EventSourceWithInputFile.

Definition at line 20 of file EventSource.cc.

Member Data Documentation

◆ m_name

std::string m_name
private

Definition at line 85 of file EventSource.hh.

◆ nEventsGenerated

int nEventsGenerated
private

Definition at line 86 of file EventSource.hh.


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