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

Wrapper for Geant4's general particle source. More...

#include <GPSEventSource.hh>

Inheritance diagram for GPSEventSource:
EventSource Module

Public Member Functions

 GPSEventSource ()
 
virtual ~GPSEventSource ()
 
void generate (G4Event *event)
 
G4GeneralParticleSource * getGPS ()
 
void printCurrentEvent ()
 
- Public Member Functions inherited from EventSource
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 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 *)
 

Private Member Functions

void setupGeneratorDefaults ()
 

Private Attributes

G4GeneralParticleSource * m_generator
 

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 EventSource
 EventSource (const std::string &name)
 
- Protected Member Functions inherited from Module
 Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true)
 

Detailed Description

Wrapper for Geant4's general particle source.

Definition at line 16 of file GPSEventSource.hh.

Constructor & Destructor Documentation

◆ GPSEventSource()

Class constructor.

Definition at line 8 of file GPSEventSource.cc.

References GPSEventSource::m_generator, and GPSEventSource::setupGeneratorDefaults().

◆ ~GPSEventSource()

~GPSEventSource ( )
virtual

Class destructor.

Definition at line 15 of file GPSEventSource.cc.

References GPSEventSource::m_generator.

Member Function Documentation

◆ generate()

void generate ( G4Event *  event)
virtual

Generate a Geant4 event.

Parameters
[in]eventThe Geant4 event.

Implements EventSource.

Definition at line 32 of file GPSEventSource.cc.

References GPSEventSource::m_generator.

◆ getGPS()

G4GeneralParticleSource * getGPS ( )

Get the Geant4 general particle source class.

Returns
The general particle source.

Definition at line 51 of file GPSEventSource.cc.

References GPSEventSource::m_generator.

Referenced by EventSourceManager::getGPS().

◆ printCurrentEvent()

void printCurrentEvent ( )
virtual

Dump the current event to std::cout.

This is mostly wrong until after the first event generation.

Implements EventSource.

Definition at line 37 of file GPSEventSource.cc.

References LOG::done, Module::log(), GPSEventSource::m_generator, and LOG::okay.

◆ setupGeneratorDefaults()

void setupGeneratorDefaults ( )
private

Setup the default GPS event settings.

Definition at line 19 of file GPSEventSource.cc.

References GPSEventSource::m_generator.

Referenced by GPSEventSource::GPSEventSource().

Member Data Documentation

◆ m_generator

G4GeneralParticleSource* m_generator
private

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