SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
LcioEventSource.hh
Go to the documentation of this file.
1 #ifndef SLIC_LCIOEVENTSOURCE_HH_
2 #define SLIC_LCIOEVENTSOURCE_HH_ 1
3 
4 // SLIC
6 #include "MCParticleGenerator.hh"
7 #include "LcioManager.hh"
8 
9 // LCIO
10 #include "EVENT/LCEvent.h"
11 #include "EVENT/LCCollection.h"
12 #include "IOIMPL/LCFactory.h"
13 #include "IO/LCReader.h"
14 
15 namespace slic {
16 
22 
23  public:
24 
28  LcioEventSource(const std::string& fname = "");
29 
33  virtual ~LcioEventSource();
34 
35  public:
36 
40  void open();
41 
45  void close();
46 
50  void readNextEvent();
51 
55  void printCurrentEvent();
56 
60  void generate(G4Event* anEvent);
61 
65  void beginRun(const G4Run* aRun);
66 
70  void beginEvent(const G4Event* anEvent);
71 
72  private:
73  IO::LCReader* m_reader;
75 };
76 }
77 
78 #endif
An EventSource with an associated input file, such as StdHep or LCIO event files.
Generates events from the MCParticle collection of an LCIO file.
IO::LCReader * m_reader
void generate(G4Event *anEvent)
void beginEvent(const G4Event *anEvent)
LcioEventSource(const std::string &fname="")
void beginRun(const G4Run *aRun)
MCParticleGenerator * m_eventGenerator
Converts from MCParticle collection into a G4Event.