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 2.2 2004/12/03 22:04:04 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 { |
43 |
int InitTrailer; |
int InitTrailer; |
44 |
int EventTrk; |
int EventTrk; |
45 |
int TestTrk; |
int TestTrk; |
46 |
|
int TestTof; |
47 |
int Log; |
int Log; |
48 |
int VarDump; |
int VarDump; |
49 |
int ArrDump; |
int ArrDump; |
56 |
int TrkInit; |
int TrkInit; |
57 |
int TofInit; |
int TofInit; |
58 |
int TrgInit; |
int TrgInit; |
59 |
|
int NdInit; |
60 |
|
int S4Init; |
61 |
|
int CalAlarm; |
62 |
|
int AcAlarm; |
63 |
|
int TrkAlarm; |
64 |
|
int TrgAlarm; |
65 |
|
int TofAlarm; |
66 |
|
int S4Alarm; |
67 |
|
|
68 |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
typedef std::map<const pamela::PacketType *, int *> CounterMap; |
69 |
CounterMap CMap; //! |
CounterMap CMap; //! |
70 |
|
|
71 |
public: |
public: |
72 |
EventCounter(int = 0); |
EventCounter(int = 0); |
73 |
/** Get the run number for the last read event of this type. */ |
/** Get the run number for the last read event of this type. */ |
74 |
int Get(pamela::PacketType const *) const; |
int getPscu() const { return Pscu; }; |
75 |
|
/** Get the run number for the last read event of this type. */ |
76 |
|
int Get(pamela::PacketType const *) const throw (NotExistingCounterException); |
77 |
/** Get the run number for the next event of this type. */ |
/** Get the run number for the next event of this type. */ |
78 |
int Next(pamela::PacketType const *) const; |
int Next(pamela::PacketType const *) const throw (NotExistingCounterException); |
79 |
int GetRunNumber(void) const { return RunNumber; } |
int GetRunNumber(void) const { return RunNumber; } |
80 |
void Increment(pamela::PacketType const *); |
void Increment(pamela::PacketType const *) throw (NotExistingCounterException); |
81 |
void PrintCounters() const ; |
void PrintCounters() const ; |
82 |
ClassDef(EventCounter, 1) |
ClassDef(EventCounter, 1) |
83 |
}; |
}; |
84 |
} |
} |
85 |
|
|
86 |
#endif /* EVENTCOUNTER_H */ |
#endif /* EVENTCOUNTER_H */ |
87 |
|
|
88 |
|
|