/** @file * $Author: nagni $ * $Date: 2004/06/09 23:18:20 $ * $Revision: 1.9 $ * * Header file for the algorithms used to read the techmodel data file. */ #ifndef READER_ALGORITHM_H #define READER_ALGORITHM_H #include "TechmodelAlgorithm.h" #include "PscuEvent.h" #include "VarDumpEvent.h" #include "ArrDumpEvent.h" #include "TabDumpEvent.h" #include "CalibCalEvent.h" #include "CalibTrkEvent.h" #include "CalibTrgEvent.h" #include "CalibTrdEvent.h" #include "CalibTofEvent.h" #include "CalibS4Event.h" #include "RunHeaderEvent.h" #include "RunTrailerEvent.h" #include "ForcedPktEvent.h" #include "tmtc/TmtcEvent.h" #include "mcmd/McmdEvent.h" #include "log/LogEvent.h" #include "physics/TrackerReader.h" #define UINT32 unsigned int #define UINT16 unsigned short #define BYTE unsigned char using namespace std; namespace pamela { namespace techmodel { /** * Event reader algorithm for physics events. */ class PhysicsReader: public TechmodelAlgorithm { private: /** The reader for tracker physics events. */ tracker::TrackerReader* trackerReader; /** The reader for anticoincidence physics events. */ //anticoinc::AnticounterReader* AcReader; /** The reader for calorimeter physics events. */ //calorimeter::CalorimeterReader* CalorimeterReader; public: PhysicsReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for housekeeping events. */ /* class HousekeepingReader: public TechmodelAlgorithm { private: public: HousekeepingReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int); virtual string GetVersionInfo(void) const; }; */ /** * Event reader algorithm for TMTC events. */ class TmtcReader: public TechmodelAlgorithm { //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) static const int TMTC_SUB_LENGTH = 57; //Length in bytes of the subPacketCRC static const int TMTC_SUBCRC_LENGTH = 1; //Length in bytes of the PacketCRC static const int TMTC_CRC_LENGTH = 2; private: /** The TMTC event that is created in the reader. */ TmtcEvent* Tmtc; float convert_th(int); public: TmtcReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual string GetVersionInfo(void) const; }; /** * Event reader algorithm for PSCU events. */ class PscuReader: public TechmodelAlgorithm { private: /** The PSCU event that is created in the reader. */ PscuEvent* Pscu; public: PscuReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for VarDump events. */ class VarDumpReader: public TechmodelAlgorithm { private: /** The VarDump event that is created in the reader. */ VarDumpEvent* VarDump; public: VarDumpReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for ArrDump events. */ class ArrDumpReader: public TechmodelAlgorithm { private: /** The ArrDump event that is created in the reader. */ ArrDumpEvent* ArrDump; public: ArrDumpReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for TabDump events. */ class TabDumpReader: public TechmodelAlgorithm { private: /** The TabDump event that is created in the reader. */ TabDumpEvent* TabDump; public: TabDumpReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for Mcmd events. */ class McmdReader: public TechmodelAlgorithm { private: /** The Mcmd event that is created in the reader. */ McmdEvent* Mcmd; public: McmdReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for Log events. */ class LogReader: public TechmodelAlgorithm { private: /** The Log event that is created in the reader. */ LogEvent* Log; public: LogReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibCal events. */ class CalibCalReader: public TechmodelAlgorithm { private: /** The CalibCal event that is created in the reader. */ CalibCalEvent* CalibCal; public: CalibCalReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibTrk events. */ class CalibTrkReader: public TechmodelAlgorithm { private: /** The CalibTrk event that is created in the reader. */ CalibTrkEvent* calibTrk; public: CalibTrkReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); //this type of RUNEvent should be the future develop. //Pass the buffer not the pointer to file //virtual void RunEvent(int, long int, char[]); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibTrg events. */ class CalibTrgReader: public TechmodelAlgorithm { private: /** The CalibTrg event that is created in the reader. */ CalibTrgEvent* calibTrg; public: CalibTrgReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibTrd events. */ class CalibTrdReader: public TechmodelAlgorithm { private: /** The CalibTrd event that is created in the reader. */ CalibTrdEvent* CalibTrd; public: CalibTrdReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibTof events. */ class CalibTofReader: public TechmodelAlgorithm { private: /** The CalibTof event that is created in the reader. */ CalibTofEvent* CalibTof; public: CalibTofReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for CalibS4 events. */ class CalibS4Reader: public TechmodelAlgorithm { private: /** The CalibCal event that is created in the reader. */ CalibS4Event* CalibS4; public: CalibS4Reader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for RunTrailer events. */ class RunTrailerReader: public TechmodelAlgorithm { private: /** The RunTrailer event that is created in the reader. */ RunTrailerEvent* RunTrailer; public: RunTrailerReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for RunHeader events. */ class RunHeaderReader: public TechmodelAlgorithm { private: /** The RunHeader event that is created in the reader. */ RunHeaderEvent* RunHeader; public: RunHeaderReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; /** * Event reader algorithm for ForcedPkt events. */ class ForcedPktReader: public TechmodelAlgorithm { private: /** The ForcedPkt event that is created in the reader. */ ForcedPktEvent* ForcedPkt; public: ForcedPktReader(void); virtual void Init(PamelaRun *); virtual void RunEvent(int, long int); virtual std::string GetVersionInfo(void) const; }; } } #endif /* READER_ALGORITHM_H */