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.4 2004/07/08 12:31:22 kusanagi Exp $ |
* $Id: EventCounter.h,v 4.2 2005/05/28 08:37:00 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 { |
26 |
int CalibCalPulse1; |
int CalibCalPulse1; |
27 |
int CalibCalPulse2; |
int CalibCalPulse2; |
28 |
int Physics; |
int Physics; |
29 |
int CalibTrkBoth; |
int CalibTrk1; |
30 |
int Calib_Trk1; |
int CalibTrk2; |
31 |
int Calib_Trk2; |
int CalibCal; |
32 |
int Calib_Cal; |
int CalibTof; |
33 |
int Calib_Trd; |
int CalibS4; |
34 |
int Calib_Tof; |
int CalibCalPed; |
35 |
int Calib_S4; |
int Calib1_Ac1; |
36 |
int Calib_CalPed; |
int Calib1_Ac2; |
37 |
int Calib_Ac; |
int Calib2_Ac1; |
38 |
int Run_Header; |
int Calib2_Ac2; |
39 |
int Run_Trailer; |
int RunHeader; |
40 |
|
int RunTrailer; |
41 |
int CalibHeader; |
int CalibHeader; |
42 |
int CalibTrailer; |
int CalibTrailer; |
43 |
int InitHeader; |
int InitHeader; |
44 |
int InitTrailer; |
int InitTrailer; |
45 |
int EventTrk; |
int EventTrk; |
46 |
int TestTrk; |
int TestTrk; |
47 |
|
int TestTof; |
48 |
int Log; |
int Log; |
49 |
int VarDump; |
int VarDump; |
50 |
int ArrDump; |
int ArrDump; |
52 |
int Tmtc; |
int Tmtc; |
53 |
int Mcmd; |
int Mcmd; |
54 |
int ForcedFECmd; |
int ForcedFECmd; |
55 |
int AcInit; |
int Ac1Init; |
56 |
int CalInit; |
int CalInit; |
57 |
int TrkInit; |
int TrkInit; |
58 |
int TofInit; |
int TofInit; |
59 |
int TrgInit; |
int TrgInit; |
60 |
|
int NdInit; |
61 |
|
int S4Init; |
62 |
|
int Ac2Init; |
63 |
|
int CalAlarm; |
64 |
|
int AcAlarm; |
65 |
|
int TrkAlarm; |
66 |
|
int TrgAlarm; |
67 |
|
int TofAlarm; |
68 |
|
int S4Alarm; |
69 |
|
int TsbT; |
70 |
|
int TsbB; |
71 |
|
|
72 |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
73 |
CounterMap CMap; //! |
CounterMap CMap; //! |
74 |
|
|
75 |
public: |
public: |
76 |
EventCounter(int = 0); |
EventCounter(int = 0); |
77 |
/** Get the run number for the last read event of this type. */ |
/** Get the run number for the last read event of this type. */ |
78 |
int Get(pamela::PacketType const *) const; |
int getPscu() const { return Pscu; }; |
79 |
|
/** Get the run number for the last read event of this type. */ |
80 |
|
int Get(pamela::PacketType const *) const throw (NotExistingCounterException); |
81 |
/** Get the run number for the next event of this type. */ |
/** Get the run number for the next event of this type. */ |
82 |
int Next(pamela::PacketType const *) const; |
int Next(pamela::PacketType const *) const throw (NotExistingCounterException); |
83 |
int GetRunNumber(void) const { return RunNumber; } |
int GetRunNumber(void) const { return RunNumber; } |
84 |
void Increment(pamela::PacketType const *); |
void Increment(pamela::PacketType const *) throw (NotExistingCounterException); |
85 |
void PrintCounters() const ; |
void PrintCounters() const ; |
86 |
ClassDef(EventCounter, 1) |
ClassDef(EventCounter, 4) |
87 |
}; |
}; |
88 |
} |
} |
89 |
|
|
90 |
#endif /* EVENTCOUNTER_H */ |
#endif /* EVENTCOUNTER_H */ |
91 |
|
|
92 |
|
|