/** @file * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $ * $Id: EventCounter.h,v 2.1 2004/09/24 11:57:32 kusanagi Exp $ * $Author: kusanagi $ * * Header file for the EventCounter class. */ #ifndef EVENTCOUNTER_H #define EVENTCOUNTER_H #include #include "Exception.h" #include "PscuHeader.h" namespace pamela { /** * Event counter. Contains the event numbers of the last read event of * each event type. */ class EventCounter : public TObject { private: int RunNumber; /**< Run number */ int Pscu; int PhysEndRun; int CalibCalPulse1; int CalibCalPulse2; int Physics; int CalibTrkBoth; int Calib_Trk1; int Calib_Trk2; int Calib_Cal; int Calib_Trd; int Calib_Tof; int Calib_S4; int Calib_CalPed; int Calib_Ac; int Run_Header; int Run_Trailer; int CalibHeader; int CalibTrailer; int InitHeader; int InitTrailer; int EventTrk; int TestTrk; int TestTof; int Log; int VarDump; int ArrDump; int TabDump; int Tmtc; int Mcmd; int ForcedFECmd; int AcInit; int CalInit; int TrkInit; int TofInit; int TrgInit; int NdInit; int CalAlarm; int AcAlarm; int TrkAlarm; int TrgAlarm; int TofAlarm; typedef std::map CounterMap; CounterMap CMap; //! public: EventCounter(int = 0); /** Get the run number for the last read event of this type. */ int getPscu() const { return Pscu; }; /** Get the run number for the last read event of this type. */ int Get(pamela::PacketType const *) const throw (NotExistingCounterException); /** Get the run number for the next event of this type. */ int Next(pamela::PacketType const *) const throw (NotExistingCounterException); int GetRunNumber(void) const { return RunNumber; } void Increment(pamela::PacketType const *) throw (NotExistingCounterException); void PrintCounters() const ; ClassDef(EventCounter, 1) }; } #endif /* EVENTCOUNTER_H */