--- yoda/event/EventCounter.h 2004/07/06 12:20:23 1.1.1.1 +++ yoda/event/EventCounter.h 2006/02/07 17:11:07 6.0 @@ -1,7 +1,7 @@ -/** @file - * $Source: /home/cvspamela/yoda/event/EventCounter.h,v $ - * $Id: EventCounter.h,v 1.7 2004/04/22 15:51:03 nagni Exp $ - * $Author: nagni $ +/** @file + * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $ + * $Id: EventCounter.h,v 5.1 2006/02/04 12:37:43 kusanagi Exp $ + * $Author: kusanagi $ * * Header file for the EventCounter class. */ @@ -9,10 +9,9 @@ #define EVENTCOUNTER_H #include -//#include -#include //Substituted by Maurizio 05 Feb 2004 - -#include "PscuHeader.h" +#include "Exception.h" +#include "PacketType.h" +#include namespace pamela { /** @@ -22,42 +21,70 @@ class EventCounter : public TObject { private: int RunNumber; /**< Run number */ - - // New Packets. + int Pscu; + int PhysEndRun; + int CalibCalPulse1; + int CalibCalPulse2; int Physics; - int Forced_Pkt; - int Calib_Trk; - int Calib_Trg; - int Calib_Cal; - int Calib_Trd; - int Calib_Tof; - int Calib_S4; - int Run_Header; - int Run_Trailer; - int Alarm; - int Khb; + int CalibTrk1; + int CalibTrk2; + int CalibCal; + int CalibTof; + int CalibS4; + int CalibCalPed; + int Calib1_Ac1; + int Calib1_Ac2; + int Calib2_Ac1; + int Calib2_Ac2; + int RunHeader; + int RunTrailer; + int CalibHeader; + int CalibTrailer; + int InitHeader; + int InitTrailer; int Log; int VarDump; int ArrDump; int TabDump; int Tmtc; int Mcmd; - int HA_Header_E5; + int ForcedFECmd; + int Ac1Init; + int CalInit; + int TrkInit; + int TofInit; + int TrgInit; + int NdInit; + int S4Init; + int Ac2Init; + int CalAlarm; + int AcAlarm; + int TrkAlarm; + int TrgAlarm; + int TofAlarm; + int S4Alarm; + int TsbT; + int TsbB; typedef std::map CounterMap; CounterMap CMap; //! + public: EventCounter(int = 0); /** Get the run number for the last read event of this type. */ - int Get(pamela::PacketType const *) const; + 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; + int Next(pamela::PacketType const *) const throw (NotExistingCounterException); int GetRunNumber(void) const { return RunNumber; } - void Increment(pamela::PacketType const *); + void Increment(pamela::PacketType const *) throw (NotExistingCounterException); void PrintCounters() const ; - ClassDef(EventCounter, 1) + ClassDef(EventCounter, 5) }; } #endif /* EVENTCOUNTER_H */ + +