DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
HepMC3EventReader.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 //
11 //==========================================================================
12 #ifndef DDG4_HEPMC_HEPMC3EVENTREADER_H
13 #define DDG4_HEPMC_HEPMC3EVENTREADER_H
14 
15 // Framework include files
16 #include <DDG4/Geant4InputAction.h>
17 
18 namespace HepMC3{ class GenEvent; }
19 
21 namespace dd4hep {
22 
24  namespace sim {
25 
27 
34  public:
36  explicit HEPMC3EventReader(const std::string& fileName);
38  virtual ~HEPMC3EventReader() = default;
39 
41  virtual EventReaderStatus readParticles(int event_number, Vertices& vertices, Particles& particles);
43  virtual EventReaderStatus readGenEvent(int event_number, HepMC3::GenEvent& genEvent) = 0;
44 
45  protected:
47  std::string m_flow1 = "flow1";
49  std::string m_flow2 = "flow2";
50 
51  };
52 
53  } /* End namespace sim */
54 } /* End namespace dd4hep */
55 #endif // DDG4_HEPMC_HEPMC3EVENTREADER_H
dd4hep::sim::Geant4EventReader::EventReaderStatus
EventReaderStatus
Status codes of the event reader object. Anything with NOT low-bit set is an error.
Definition: Geant4InputAction.h:68
dd4hep::sim::Geant4EventReader::Particles
std::vector< Particle * > Particles
Definition: Geant4InputAction.h:65
HepMC3
Definition: HepMC3EventReader.h:18
dd4hep::sim::HEPMC3EventReader
Definition: HepMC3EventReader.h:33
dd4hep::sim::HEPMC3EventReader::~HEPMC3EventReader
virtual ~HEPMC3EventReader()=default
Default destructor.
dd4hep::sim::HEPMC3EventReader::m_flow2
std::string m_flow2
name of the GenEvent Attribute storing the color flow2
Definition: HepMC3EventReader.h:49
dd4hep::sim::HEPMC3EventReader::HEPMC3EventReader
HEPMC3EventReader(const std::string &fileName)
Initializing constructor.
Definition: HepMC3EventReader.cpp:50
dd4hep::sim::HEPMC3EventReader::readGenEvent
virtual EventReaderStatus readGenEvent(int event_number, HepMC3::GenEvent &genEvent)=0
Read an event.
dd4hep::sim::Geant4EventReader
Basic geant4 event reader class. This interface/base-class must be implemented by concrete readers.
Definition: Geant4InputAction.h:60
dd4hep::sim::HEPMC3EventReader::m_flow1
std::string m_flow1
name of the GenEvent Attribute storing the color flow1
Definition: HepMC3EventReader.h:47
Geant4InputAction.h
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::HEPMC3EventReader::readParticles
virtual EventReaderStatus readParticles(int event_number, Vertices &vertices, Particles &particles)
Read an event and fill a vector of Particles and vertices.
Definition: HepMC3EventReader.cpp:54
dd4hep::sim::Geant4EventReader::Vertices
std::vector< Vertex * > Vertices
Definition: Geant4InputAction.h:66