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.1.1.1 2004/07/06 12:20:23 kusanagi Exp $ |
* $Id: EventCounter.h,v 6.2 2006/05/30 19:10:01 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" |
13 |
#include <TObject.h> //Substituted by Maurizio 05 Feb 2004 |
#include "PacketType.h" |
14 |
|
#include <TObject.h> |
|
#include "PscuHeader.h" |
|
15 |
|
|
16 |
namespace pamela { |
namespace pamela { |
17 |
/** |
/** |
21 |
class EventCounter : public TObject { |
class EventCounter : public TObject { |
22 |
private: |
private: |
23 |
int RunNumber; /**< Run number */ |
int RunNumber; /**< Run number */ |
24 |
|
|
|
// New Packets. |
|
25 |
int Pscu; |
int Pscu; |
26 |
|
int PhysEndRun; |
27 |
|
int CalibCalPulse1; |
28 |
|
int CalibCalPulse2; |
29 |
int Physics; |
int Physics; |
30 |
int Forced_Pkt; |
int CalibTrkBoth; |
31 |
int Calib_Trk1; |
int CalibTrk1; |
32 |
int Calib_Trk2; |
int CalibTrk2; |
33 |
int Calib_Cal; |
int CalibCal; |
34 |
int Calib_Trd; |
int CalibTof; |
35 |
int Calib_Tof; |
int CalibS4; |
36 |
int Calib_S4; |
int CalibCalPed; |
37 |
int Run_Header; |
int Calib1_Ac1; |
38 |
int Run_Trailer; |
int Calib1_Ac2; |
39 |
int Alarm; |
int Calib2_Ac1; |
40 |
int Khb; |
int Calib2_Ac2; |
41 |
|
int RunHeader; |
42 |
|
int RunTrailer; |
43 |
|
int CalibHeader; |
44 |
|
int CalibTrailer; |
45 |
|
int InitHeader; |
46 |
|
int InitTrailer; |
47 |
|
int EventTrk; |
48 |
int Log; |
int Log; |
49 |
int VarDump; |
int VarDump; |
50 |
int ArrDump; |
int ArrDump; |
51 |
int TabDump; |
int TabDump; |
52 |
int Tmtc; |
int Tmtc; |
53 |
int Mcmd; |
int Mcmd; |
54 |
int HA_Header_E5; |
int ForcedFECmd; |
55 |
|
int Ac1Init; |
56 |
|
int CalInit; |
57 |
|
int TrkInit; |
58 |
|
int TofInit; |
59 |
|
int TrgInit; |
60 |
|
int NdInit; |
61 |
|
int S4Init; |
62 |
|
int Ac2Init; |
63 |
|
int CalAlarm; |
64 |
|
int Ac1Alarm; |
65 |
|
int TrkAlarm; |
66 |
|
int TrgAlarm; |
67 |
|
int TofAlarm; |
68 |
|
int S4Alarm; |
69 |
|
int Ac2Alarm; |
70 |
|
int TsbT; |
71 |
|
int TsbB; |
72 |
|
|
73 |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
74 |
CounterMap CMap; //! |
CounterMap CMap; //! |
75 |
|
|
76 |
public: |
public: |
77 |
EventCounter(int = 0); |
EventCounter(int = 0); |
78 |
/** Get the run number for the last read event of this type. */ |
/** Get the run number for the last read event of this type. */ |
79 |
int Get(pamela::PacketType const *) const; |
int getPscu() const { return Pscu; }; |
80 |
|
/** Get the run number for the last read event of this type. */ |
81 |
|
int Get(pamela::PacketType const *) const throw (NotExistingCounterException); |
82 |
/** Get the run number for the next event of this type. */ |
/** Get the run number for the next event of this type. */ |
83 |
int Next(pamela::PacketType const *) const; |
int Next(pamela::PacketType const *) const throw (NotExistingCounterException); |
84 |
int GetRunNumber(void) const { return RunNumber; } |
int GetRunNumber(void) const { return RunNumber; } |
85 |
void Increment(pamela::PacketType const *); |
void Increment(pamela::PacketType const *) throw (NotExistingCounterException); |
86 |
void PrintCounters() const ; |
void PrintCounters() const ; |
87 |
ClassDef(EventCounter, 1) |
ClassDef(EventCounter, 7) |
88 |
}; |
}; |
89 |
} |
} |
90 |
|
|
91 |
#endif /* EVENTCOUNTER_H */ |
#endif /* EVENTCOUNTER_H */ |
92 |
|
|
93 |
|
|