File indexing completed on 2026-09-27 09:20:25
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef EVENT_READING_ALGORITHM_H
0009 #define EVENT_READING_ALGORITHM_H 1
0010
0011 #include "Pandora/ExternallyConfiguredAlgorithm.h"
0012
0013 #include "Pandora/PandoraInputTypes.h"
0014
0015 #include "Persistency/PandoraIO.h"
0016
0017 namespace pandora {class FileReader;}
0018
0019
0020
0021
0022
0023
0024 class EventReadingAlgorithm : public pandora::ExternallyConfiguredAlgorithm
0025 {
0026 public:
0027
0028
0029
0030 class Factory : public pandora::AlgorithmFactory
0031 {
0032 public:
0033 pandora::Algorithm *CreateAlgorithm() const;
0034 };
0035
0036
0037
0038
0039 EventReadingAlgorithm();
0040
0041
0042
0043
0044 ~EventReadingAlgorithm();
0045
0046
0047
0048
0049 class ExternalEventReadingParameters : public pandora::ExternalParameters
0050 {
0051 public:
0052 std::string m_geometryFileName;
0053 std::string m_eventFileNameList;
0054 pandora::InputUInt m_skipToEvent;
0055 };
0056
0057 protected:
0058 pandora::StatusCode Initialize();
0059 pandora::StatusCode Run();
0060
0061
0062
0063
0064 void MoveToNextEventFile();
0065
0066
0067
0068
0069
0070
0071 pandora::StatusCode ReplaceEventFileReader(const std::string &fileName);
0072
0073
0074
0075
0076
0077
0078
0079
0080 pandora::FileType GetFileType(const std::string &fileName) const;
0081
0082 pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
0083
0084 std::string m_geometryFileName;
0085 std::string m_eventFileName;
0086 pandora::StringVector m_eventFileNameVector;
0087
0088 unsigned int m_skipToEvent;
0089
0090 pandora::FileReader *m_pEventFileReader;
0091 };
0092
0093
0094
0095 inline pandora::Algorithm *EventReadingAlgorithm::Factory::CreateAlgorithm() const
0096 {
0097 return new EventReadingAlgorithm();
0098 }
0099
0100 #endif