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

Top-level controller of StdHep input. More...

#include <StdHepEventSource.hh>

Inheritance diagram for StdHepEventSource:
EventSourceWithInputFile EventSource Module

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
 

Detailed Description

Top-level controller of StdHep input.

Note
Uses Willy Langeveld's lStdHep and lXDR classes for input processing.

Definition at line 14 of file StdHepEventSource.hh.

Constructor & Destructor Documentation

◆ StdHepEventSource()

StdHepEventSource ( const std::string &  fname)

Class constructor.

Parameters
[in]fnameThe file name.

Definition at line 11 of file StdHepEventSource.cc.

Member Function Documentation

◆ beginEvent()

void beginEvent ( const G4Event *  anEvent)
virtual

Begin of event action.

Parameters
[in]anEventThe G4Event that is tarting.

Reimplemented from EventSourceWithInputFile.

Definition at line 56 of file StdHepEventSource.cc.

References EventSourceWithInputFile::beginEvent().

◆ beginRun()

void beginRun ( const G4Run *  aRun)
virtual

Begin of run action.

Parameters
[in]aRunThe G4Run that is starting.

Reimplemented from EventSourceWithInputFile.

Definition at line 50 of file StdHepEventSource.cc.

References EventSourceWithInputFile::beginRun().

◆ close()

void close ( )
virtual

Close the current file.

Implements EventSourceWithInputFile.

Definition at line 31 of file StdHepEventSource.cc.

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

◆ generate()

void generate ( G4Event *  anEvent)
virtual

Generate events.

Parameters
[in]anEventThe target G4Event.

Implements EventSource.

Definition at line 15 of file StdHepEventSource.cc.

References StdHepGenerator::generateEvent(), and StdHepEventSource::m_eventGenerator.

◆ open()

void open ( )
virtual

◆ printCurrentEvent()

void printCurrentEvent ( )
virtual

Print out the current event.

Implements EventSourceWithInputFile.

Definition at line 45 of file StdHepEventSource.cc.

References Singleton< MCParticleManager >::instance().

◆ readNextEvent()

void readNextEvent ( )
virtual

Member Data Documentation

◆ m_eventGenerator

StdHepGenerator* m_eventGenerator
private

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