1 |
kusanagi |
1.1 |
/** @file |
2 |
kusanagi |
1.2 |
* $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $ |
3 |
kusanagi |
1.4 |
* $Id: EventCounter.h,v 1.3 2004/07/06 14:07:24 kusanagi Exp $ |
4 |
kusanagi |
1.2 |
* $Author: kusanagi $ |
5 |
kusanagi |
1.1 |
* |
6 |
|
|
* Header file for the EventCounter class. |
7 |
|
|
*/ |
8 |
|
|
#ifndef EVENTCOUNTER_H |
9 |
|
|
#define EVENTCOUNTER_H |
10 |
|
|
|
11 |
|
|
#include <map> |
12 |
|
|
//#include <root/TObject.h> |
13 |
|
|
#include <TObject.h> //Substituted by Maurizio 05 Feb 2004 |
14 |
|
|
|
15 |
|
|
#include "PscuHeader.h" |
16 |
|
|
|
17 |
|
|
namespace pamela { |
18 |
|
|
/** |
19 |
|
|
* Event counter. Contains the event numbers of the last read event of |
20 |
|
|
* each event type. |
21 |
|
|
*/ |
22 |
|
|
class EventCounter : public TObject { |
23 |
|
|
private: |
24 |
|
|
int RunNumber; /**< Run number */ |
25 |
|
|
|
26 |
|
|
// New Packets. |
27 |
|
|
int Pscu; |
28 |
|
|
int Physics; |
29 |
|
|
int Forced_Pkt; |
30 |
kusanagi |
1.2 |
int Calib_Trk1; |
31 |
|
|
int Calib_Trk2; |
32 |
kusanagi |
1.1 |
int Calib_Cal; |
33 |
kusanagi |
1.3 |
int Calib_CalPed; |
34 |
kusanagi |
1.4 |
int Calib_Ac; |
35 |
kusanagi |
1.1 |
int Calib_Trd; |
36 |
|
|
int Calib_Tof; |
37 |
|
|
int Calib_S4; |
38 |
|
|
int Run_Header; |
39 |
|
|
int Run_Trailer; |
40 |
|
|
int Alarm; |
41 |
|
|
int Khb; |
42 |
|
|
int Log; |
43 |
|
|
int VarDump; |
44 |
|
|
int ArrDump; |
45 |
|
|
int TabDump; |
46 |
|
|
int Tmtc; |
47 |
|
|
int Mcmd; |
48 |
|
|
int HA_Header_E5; |
49 |
|
|
|
50 |
|
|
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
51 |
|
|
CounterMap CMap; //! |
52 |
|
|
public: |
53 |
|
|
EventCounter(int = 0); |
54 |
|
|
/** Get the run number for the last read event of this type. */ |
55 |
|
|
int Get(pamela::PacketType const *) const; |
56 |
|
|
/** Get the run number for the next event of this type. */ |
57 |
|
|
int Next(pamela::PacketType const *) const; |
58 |
|
|
int GetRunNumber(void) const { return RunNumber; } |
59 |
|
|
void Increment(pamela::PacketType const *); |
60 |
|
|
void PrintCounters() const ; |
61 |
|
|
ClassDef(EventCounter, 1) |
62 |
|
|
}; |
63 |
|
|
} |
64 |
|
|
|
65 |
|
|
#endif /* EVENTCOUNTER_H */ |