LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EventReadingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_EVENT_READING_ALGORITHM_H
9 #define LAR_EVENT_READING_ALGORITHM_H 1
10 
11 #include "Pandora/ExternallyConfiguredAlgorithm.h"
12 
13 #include "Pandora/PandoraInputTypes.h"
14 
15 #include "Persistency/PandoraIO.h"
16 
17 namespace pandora
18 {
19 class FileReader;
20 }
21 
22 //------------------------------------------------------------------------------------------------------------------------------------------
23 
24 namespace lar_content
25 {
26 
30 class EventReadingAlgorithm : public pandora::ExternallyConfiguredAlgorithm
31 {
32 public:
37 
42 
46  class ExternalEventReadingParameters : public pandora::ExternalParameters
47  {
48  public:
49  std::string m_geometryFileName;
50  std::string m_eventFileNameList;
51  pandora::InputUInt m_skipToEvent;
52  };
53 
54 private:
55  pandora::StatusCode Initialize();
56  pandora::StatusCode Run();
57 
61  void MoveToNextEventFile();
62 
68  pandora::StatusCode ReplaceEventFileReader(const std::string &fileName);
69 
77  pandora::FileType GetFileType(const std::string &fileName) const;
78 
79  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
80 
81  std::string m_geometryFileName;
82  std::string m_eventFileName;
83  pandora::StringVector m_eventFileNameVector;
84 
85  unsigned int m_skipToEvent;
87  unsigned int m_larCaloHitVersion;
89  unsigned int m_larMCParticleVersion;
90 
91  pandora::FileReader *m_pEventFileReader;
92 };
93 
94 } // namespace lar_content
95 
96 #endif // #ifndef LAR_EVENT_READING_ALGORITHM_H
std::string m_geometryFileName
Name of the file containing geometry information.
bool m_useLArMCParticles
Whether to read lar mc particles, or standard pandora mc particles.
void Initialize()
Definition: errprop.cc:100
unsigned int m_larCaloHitVersion
LArCaloHit version for LArCaloHitFactory.
EventReadingAlgorithm class.
pandora::StringVector m_eventFileNameVector
Vector of file names to be processed.
unsigned int m_skipToEvent
Index of first event to consider in first input file.
pandora::InputUInt m_skipToEvent
Index of first event to consider in input file.
std::string m_geometryFileName
Name of the file containing geometry information.
bool m_useLArCaloHits
Whether to read lar calo hits, or standard pandora calo hits.
std::string m_eventFileNameList
Colon-separated list of file names to be processed.
pandora::FileReader * m_pEventFileReader
Address of the event file reader.
unsigned int m_larMCParticleVersion
LArMCParticle version for LArMCParticleFactory.
std::string m_eventFileName
Name of the current file containing event information.