DD4hep  1.36.0
Detector Description Toolkit for High Energy Physics
LCIOEventReader.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 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDG4_LCIO_LCIOEVENTREADER_H
14 #define DDG4_LCIO_LCIOEVENTREADER_H
15 
16 // Framework include files
17 #include <DDG4/Geant4InputAction.h>
18 #include <memory>
19 
20 // Forward declarations
21 namespace EVENT { class LCCollection; }
22 
24 namespace dd4hep {
25 
27  namespace sim {
28 
30 
37  public:
40  using CollectionOwner = std::unique_ptr<EVENT::LCCollection, void(*)(EVENT::LCCollection*)>;
41 
43  LCIOEventReader(const std::string& nam);
45  virtual ~LCIOEventReader();
46 
48  virtual EventReaderStatus readParticles(int event_number,
49  Vertices& vertices,
50  std::vector<Particle*>& particles);
55  virtual EventReaderStatus readParticleCollection(int event_number,
56  CollectionOwner& particles) = 0;
57  };
58 
59  } /* End namespace sim */
60 } /* End namespace dd4hep */
61 #endif // DDG4_LCIO_LCIOEVENTREADER_H
dd4hep::sim::LCIOEventReader::readParticles
virtual EventReaderStatus readParticles(int event_number, Vertices &vertices, std::vector< Particle * > &particles)
Read an event and fill a vector of MCParticles.
Definition: LCIOEventReader.cpp:62
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::LCIOEventReader
Base class to read lcio files.
Definition: LCIOEventReader.h:36
dd4hep::sim::LCIOEventReader::LCIOEventReader
LCIOEventReader(const std::string &nam)
Initializing constructor.
Definition: LCIOEventReader.cpp:50
EVENT
LCIO namespace. See http://lcio.desy.de.
Definition: LCIOEventReader.h:21
dd4hep::sim::LCIOEventReader::~LCIOEventReader
virtual ~LCIOEventReader()
Default destructor.
Definition: LCIOEventReader.cpp:56
dd4hep::sim::LCIOEventReader::CollectionOwner
std::unique_ptr< EVENT::LCCollection, void(*)(EVENT::LCCollection *)> CollectionOwner
Definition: LCIOEventReader.h:40
dd4hep::sim::Geant4EventReader
Basic geant4 event reader class. This interface/base-class must be implemented by concrete readers.
Definition: Geant4InputAction.h:60
dd4hep::sim::LCIOEventReader::readParticleCollection
virtual EventReaderStatus readParticleCollection(int event_number, CollectionOwner &particles)=0
Geant4InputAction.h
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::Geant4EventReader::Vertices
std::vector< Vertex * > Vertices
Definition: Geant4InputAction.h:66