|
|
|||
File indexing completed on 2026-09-10 08:23:28
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DDG4_LCIO_LCIOEVENTREADER_H 0014 #define DDG4_LCIO_LCIOEVENTREADER_H 0015 0016 // Framework include files 0017 #include <DDG4/Geant4InputAction.h> 0018 #include <memory> 0019 0020 // Forward declarations 0021 namespace EVENT { class LCCollection; } 0022 0023 /// Namespace for the AIDA detector description toolkit 0024 namespace dd4hep { 0025 0026 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0027 namespace sim { 0028 0029 /// Base class to read lcio files. 0030 /** 0031 * \author P.Kostka (main author) 0032 * \author M.Frank (code reshuffeling into new DDG4 scheme) 0033 * \version 1.0 0034 * \ingroup DD4HEP_SIMULATION 0035 */ 0036 class LCIOEventReader : public Geant4EventReader { 0037 public: 0038 /// unique_ptr type for a particle collection. The deleter is either a no-op 0039 /// (collection owned by the reader) or calls delete (caller-owned collection) 0040 using CollectionOwner = std::unique_ptr<EVENT::LCCollection, void(*)(EVENT::LCCollection*)>; 0041 0042 /// Initializing constructor 0043 LCIOEventReader(const std::string& nam); 0044 /// Default destructor 0045 virtual ~LCIOEventReader(); 0046 0047 /// Read an event and fill a vector of MCParticles. 0048 virtual EventReaderStatus readParticles(int event_number, 0049 Vertices& vertices, 0050 std::vector<Particle*>& particles); 0051 /// Read an event and return a LCCollectionVec of MCParticles. 0052 /// Implementations set particles to a CollectionOwner whose deleter reflects 0053 /// ownership: a no-op if the collection is owned by the reader, or delete if 0054 /// it is caller-owned. 0055 virtual EventReaderStatus readParticleCollection(int event_number, 0056 CollectionOwner& particles) = 0; 0057 }; 0058 0059 } /* End namespace sim */ 0060 } /* End namespace dd4hep */ 0061 #endif // DDG4_LCIO_LCIOEVENTREADER_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|