/[PAMELA software]/yoda/event/EventCounter.h
ViewVC logotype

Contents of /yoda/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4.2 - (show annotations) (download)
Sat May 28 08:37:00 2005 UTC (19 years, 6 months ago) by kusanagi
Branch: MAIN
Changes since 4.1: +2 -2 lines
File MIME type: text/plain
Updated the ClassDef from 3 to 4

1 /** @file
2 * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $
3 * $Id: EventCounter.h,v 4.1 2005/05/28 08:30:01 kusanagi Exp $
4 * $Author: kusanagi $
5 *
6 * Header file for the EventCounter class.
7 */
8 #ifndef EVENTCOUNTER_H
9 #define EVENTCOUNTER_H
10
11 #include <map>
12 #include "Exception.h"
13 #include "PscuHeader.h"
14
15 namespace pamela {
16 /**
17 * Event counter. Contains the event numbers of the last read event of
18 * each event type.
19 */
20 class EventCounter : public TObject {
21 private:
22 int RunNumber; /**< Run number */
23
24 int Pscu;
25 int PhysEndRun;
26 int CalibCalPulse1;
27 int CalibCalPulse2;
28 int Physics;
29 int CalibTrk1;
30 int CalibTrk2;
31 int CalibCal;
32 int CalibTof;
33 int CalibS4;
34 int CalibCalPed;
35 int Calib1_Ac1;
36 int Calib1_Ac2;
37 int Calib2_Ac1;
38 int Calib2_Ac2;
39 int RunHeader;
40 int RunTrailer;
41 int CalibHeader;
42 int CalibTrailer;
43 int InitHeader;
44 int InitTrailer;
45 int EventTrk;
46 int TestTrk;
47 int TestTof;
48 int Log;
49 int VarDump;
50 int ArrDump;
51 int TabDump;
52 int Tmtc;
53 int Mcmd;
54 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 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;
73 CounterMap CMap; //!
74
75 public:
76 EventCounter(int = 0);
77 /** Get the run number for the last read event of this type. */
78 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. */
82 int Next(pamela::PacketType const *) const throw (NotExistingCounterException);
83 int GetRunNumber(void) const { return RunNumber; }
84 void Increment(pamela::PacketType const *) throw (NotExistingCounterException);
85 void PrintCounters() const ;
86 ClassDef(EventCounter, 4)
87 };
88 }
89
90 #endif /* EVENTCOUNTER_H */
91
92

  ViewVC Help
Powered by ViewVC 1.1.23