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

Converts from StdHep input to a G4Event. More...

#include <StdHepGenerator.hh>

Public Member Functions

 StdHepGenerator (G4String eventFile)
 
virtual ~StdHepGenerator ()
 
void generateEvent (G4Event *event)
 
LCCollectionVec * getCurrentParticleCollection ()
 
void readNextEvent ()
 

Private Attributes

LCCollectionVec * _particles
 
LCStdHepRdrNew * _reader
 

Detailed Description

Converts from StdHep input to a G4Event.

Note
Borrows heavily from Mokka's HepLCIOInterfaceNew class.

Definition at line 31 of file StdHepGenerator.hh.

Constructor & Destructor Documentation

◆ StdHepGenerator()

StdHepGenerator ( G4String  eventFile)

Class constructor.

Definition at line 18 of file StdHepGenerator.cc.

References StdHepGenerator::_reader.

◆ ~StdHepGenerator()

~StdHepGenerator ( )
virtual

Class destructor.

Definition at line 23 of file StdHepGenerator.cc.

References StdHepGenerator::_reader.

Member Function Documentation

◆ generateEvent()

void generateEvent ( G4Event *  event)

Generate a G4Event from the current collection of MCParticles.

Parameters
[in]eventThe output G4Event.

Definition at line 32 of file StdHepGenerator.cc.

References StdHepGenerator::_particles, and Singleton< MCParticleManager >::instance().

Referenced by StdHepEventSource::generate().

◆ getCurrentParticleCollection()

LCCollectionVec * getCurrentParticleCollection ( )

Get the current MCParticle collection.

Returns
The current MCParticle collection.

Definition at line 40 of file StdHepGenerator.cc.

References StdHepGenerator::_particles.

Referenced by StdHepEventSource::readNextEvent().

◆ readNextEvent()

void readNextEvent ( )

Read the next event from the StdHep file.

Definition at line 27 of file StdHepGenerator.cc.

References StdHepGenerator::_particles, and StdHepGenerator::_reader.

Referenced by StdHepEventSource::readNextEvent().

Member Data Documentation

◆ _particles

LCCollectionVec* _particles
private

◆ _reader

LCStdHepRdrNew* _reader
private

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