1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $ |
* $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $ |
3 |
* $Id: EventCounter.h,v 1.2 2004/07/06 13:31:14 kusanagi Exp $ |
* $Id: EventCounter.h,v 2.1 2004/09/24 11:57:32 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Header file for the EventCounter class. |
* Header file for the EventCounter class. |
9 |
#define EVENTCOUNTER_H |
#define EVENTCOUNTER_H |
10 |
|
|
11 |
#include <map> |
#include <map> |
12 |
//#include <root/TObject.h> |
#include "Exception.h" |
|
#include <TObject.h> //Substituted by Maurizio 05 Feb 2004 |
|
|
|
|
13 |
#include "PscuHeader.h" |
#include "PscuHeader.h" |
14 |
|
|
15 |
namespace pamela { |
namespace pamela { |
20 |
class EventCounter : public TObject { |
class EventCounter : public TObject { |
21 |
private: |
private: |
22 |
int RunNumber; /**< Run number */ |
int RunNumber; /**< Run number */ |
23 |
|
|
|
// New Packets. |
|
24 |
int Pscu; |
int Pscu; |
25 |
|
int PhysEndRun; |
26 |
|
int CalibCalPulse1; |
27 |
|
int CalibCalPulse2; |
28 |
int Physics; |
int Physics; |
29 |
int Forced_Pkt; |
int CalibTrkBoth; |
30 |
int Calib_Trk1; |
int Calib_Trk1; |
31 |
int Calib_Trk2; |
int Calib_Trk2; |
32 |
int Calib_Cal; |
int Calib_Cal; |
|
int Calib_CalPed; |
|
33 |
int Calib_Trd; |
int Calib_Trd; |
34 |
int Calib_Tof; |
int Calib_Tof; |
35 |
int Calib_S4; |
int Calib_S4; |
36 |
|
int Calib_CalPed; |
37 |
|
int Calib_Ac; |
38 |
int Run_Header; |
int Run_Header; |
39 |
int Run_Trailer; |
int Run_Trailer; |
40 |
int Alarm; |
int CalibHeader; |
41 |
int Khb; |
int CalibTrailer; |
42 |
|
int InitHeader; |
43 |
|
int InitTrailer; |
44 |
|
int EventTrk; |
45 |
|
int TestTrk; |
46 |
|
int TestTof; |
47 |
int Log; |
int Log; |
48 |
int VarDump; |
int VarDump; |
49 |
int ArrDump; |
int ArrDump; |
50 |
int TabDump; |
int TabDump; |
51 |
int Tmtc; |
int Tmtc; |
52 |
int Mcmd; |
int Mcmd; |
53 |
int HA_Header_E5; |
int ForcedFECmd; |
54 |
|
int AcInit; |
55 |
|
int CalInit; |
56 |
|
int TrkInit; |
57 |
|
int TofInit; |
58 |
|
int TrgInit; |
59 |
|
int NdInit; |
60 |
|
int CalAlarm; |
61 |
|
int AcAlarm; |
62 |
|
int TrkAlarm; |
63 |
|
int TrgAlarm; |
64 |
|
int TofAlarm; |
65 |
|
|
66 |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
67 |
CounterMap CMap; //! |
CounterMap CMap; //! |
68 |
|
|
69 |
public: |
public: |
70 |
EventCounter(int = 0); |
EventCounter(int = 0); |
71 |
/** Get the run number for the last read event of this type. */ |
/** Get the run number for the last read event of this type. */ |
72 |
int Get(pamela::PacketType const *) const; |
int getPscu() const { return Pscu; }; |
73 |
|
/** Get the run number for the last read event of this type. */ |
74 |
|
int Get(pamela::PacketType const *) const throw (NotExistingCounterException); |
75 |
/** Get the run number for the next event of this type. */ |
/** Get the run number for the next event of this type. */ |
76 |
int Next(pamela::PacketType const *) const; |
int Next(pamela::PacketType const *) const throw (NotExistingCounterException); |
77 |
int GetRunNumber(void) const { return RunNumber; } |
int GetRunNumber(void) const { return RunNumber; } |
78 |
void Increment(pamela::PacketType const *); |
void Increment(pamela::PacketType const *) throw (NotExistingCounterException); |
79 |
void PrintCounters() const ; |
void PrintCounters() const ; |
80 |
ClassDef(EventCounter, 1) |
ClassDef(EventCounter, 1) |
81 |
}; |
}; |