00001 // -*- C++ -*- 00002 // AID-GENERATED 00003 // ========================================================================= 00004 // This class was generated by AID - Abstract Interface Definition 00005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 00006 // ========================================================================= 00007 #ifndef IO_LCREADER_H 00008 #define IO_LCREADER_H 1 00009 00010 #include <string> 00011 #include <vector> 00012 00013 #include "EVENT/LCEvent.h" 00014 #include "EVENT/LCRunHeader.h" 00015 #include "Exceptions.h" 00016 #include "LCIOSTLTypes.h" 00017 00018 namespace IO { 00019 00020 class LCEventListener; 00021 class LCRunListener; 00022 00032 class LCReader { 00033 00034 public: 00036 virtual ~LCReader() { /* nop */; } 00037 00041 static const int directAccess = 0x00000001 << 0 ; 00046 virtual void open(const std::string & filename) = 0; 00047 00055 virtual void open(const std::vector<std::string> & filenames) = 0; 00056 00062 virtual EVENT::LCRunHeader * readNextRunHeader() = 0; 00063 00069 virtual EVENT::LCRunHeader * readNextRunHeader(int accessMode) = 0; 00070 00076 virtual EVENT::LCEvent * readNextEvent() = 0; 00077 00083 virtual EVENT::LCEvent * readNextEvent(int accessMode) = 0; 00084 00089 virtual int getNumberOfEvents() = 0; 00090 00095 virtual int getNumberOfRuns() = 0; 00096 00101 virtual void getRuns(EVENT::IntVec & runs) = 0; 00102 00109 virtual void getEvents(EVENT::IntVec & events) = 0; 00110 00115 virtual void setReadCollectionNames(const std::vector<std::string> & colnames) = 0; 00116 00120 virtual void skipNEvents(int n) = 0; 00121 00127 virtual EVENT::LCRunHeader * readRunHeader(int runNumber) = 0; 00128 00134 virtual EVENT::LCRunHeader * readRunHeader(int runNumber, int accessMode) = 0; 00135 00141 virtual EVENT::LCEvent * readEvent(int runNumber, int evtNumber) = 0; 00142 00148 virtual EVENT::LCEvent * readEvent(int runNumber, int evtNumber, int accessMode) = 0; 00149 00154 virtual void close() = 0; 00155 00158 virtual void registerLCEventListener(LCEventListener * ls) = 0; 00159 00162 virtual void removeLCEventListener(LCEventListener * ls) = 0; 00163 00166 virtual void registerLCRunListener(LCRunListener * ls) = 0; 00167 00170 virtual void removeLCRunListener(LCRunListener * ls) = 0; 00171 00178 virtual void readStream() = 0; 00179 00186 virtual void readStream(int maxRecord) = 0; 00187 }; // class 00188 } // namespace IO 00189 #endif /* ifndef IO_LCREADER_H */