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

Contents of /yoda/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2.1 - (show annotations) (download)
Fri Sep 24 11:57:32 2004 UTC (20 years, 2 months ago) by kusanagi
Branch: MAIN
Changes since 2.0: +2 -1 lines
File MIME type: text/plain
Added new NdInitEvent plus relative NdInitReader

1 /** @file
2 * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $
3 * $Id: EventCounter.h,v 2.0 2004/09/21 20:49:57 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
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 int Pscu;
27 int PhysEndRun;
28 int CalibCalPulse1;
29 int CalibCalPulse2;
30 int Physics;
31 int CalibTrkBoth;
32 int Calib_Trk1;
33 int Calib_Trk2;
34 int Calib_Cal;
35 int Calib_Trd;
36 int Calib_Tof;
37 int Calib_S4;
38 int Calib_CalPed;
39 int Calib_Ac;
40 int Run_Header;
41 int Run_Trailer;
42 int CalibHeader;
43 int CalibTrailer;
44 int InitHeader;
45 int InitTrailer;
46 int EventTrk;
47 int TestTrk;
48 int TestTof;
49 int Log;
50 int VarDump;
51 int ArrDump;
52 int TabDump;
53 int Tmtc;
54 int Mcmd;
55 int ForcedFECmd;
56 int AcInit;
57 int CalInit;
58 int TrkInit;
59 int TofInit;
60 int TrgInit;
61 int NdInit;
62 int CalAlarm;
63 int AcAlarm;
64 int TrkAlarm;
65 int TrgAlarm;
66 int TofAlarm;
67
68 typedef std::map<const pamela::PacketType *, int *> CounterMap;
69 CounterMap CMap; //!
70
71 public:
72 EventCounter(int = 0);
73 /** Get the run number for the last read event of this type. */
74 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;
77 /** Get the run number for the next event of this type. */
78 int Next(pamela::PacketType const *) const;
79 int GetRunNumber(void) const { return RunNumber; }
80 void Increment(pamela::PacketType const *);
81 void PrintCounters() const ;
82 ClassDef(EventCounter, 1)
83 };
84 }
85
86 #endif /* EVENTCOUNTER_H */

  ViewVC Help
Powered by ViewVC 1.1.23