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

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

#include <LHEEventSource.hh>

Inheritance diagram for LHEEventSource:
EventSourceWithInputFile EventSource Module

Public Member Functions

 LHEEventSource (const std::string &fname)
 
virtual ~LHEEventSource ()
 
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

LHEPrimaryGenerator * m_eventGenerator {nullptr}
 
LHEReader * m_reader {nullptr}
 

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 LHE input.

Definition at line 13 of file LHEEventSource.hh.

Constructor & Destructor Documentation

◆ LHEEventSource()

LHEEventSource ( const std::string &  fname)

Class constructor.

Parameters
[in]fnameThe file name.

Definition at line 7 of file LHEEventSource.cc.

◆ ~LHEEventSource()

~LHEEventSource ( )
virtual

Definition at line 10 of file LHEEventSource.cc.

References LHEEventSource::m_eventGenerator.

Member Function Documentation

◆ beginEvent()

void beginEvent ( const G4Event *  anEvent)
virtual

Begin of event action.

Parameters
[in]anEventThe G4Event that is starting.

Reimplemented from EventSourceWithInputFile.

Definition at line 40 of file LHEEventSource.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 36 of file LHEEventSource.cc.

References EventSourceWithInputFile::beginRun().

◆ close()

void close ( )
virtual

Close the current file.

Implements EventSourceWithInputFile.

Definition at line 24 of file LHEEventSource.cc.

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

◆ generate()

void generate ( G4Event *  anEvent)
virtual

Generate events.

Parameters
[in]anEventThe target G4Event.

Implements EventSource.

Definition at line 14 of file LHEEventSource.cc.

References LHEPrimaryGenerator::GeneratePrimaryVertex(), and LHEEventSource::m_eventGenerator.

◆ open()

void open ( )
virtual

◆ printCurrentEvent()

void printCurrentEvent ( )
virtual

Print out the current event.

Implements EventSourceWithInputFile.

Definition at line 33 of file LHEEventSource.cc.

◆ readNextEvent()

void readNextEvent ( )
virtual

Read in the next event.

Implements EventSourceWithInputFile.

Definition at line 29 of file LHEEventSource.cc.

Member Data Documentation

◆ m_eventGenerator

LHEPrimaryGenerator* m_eventGenerator {nullptr}
private

◆ m_reader

LHEReader* m_reader {nullptr}
private

Definition at line 67 of file LHEEventSource.hh.

Referenced by LHEEventSource::open().


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