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

Contents of /chewbacca/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jul 24 13:53:49 2009 UTC (15 years, 4 months ago) by mocchiut
Branch: MAIN
Changes since 1.1: +5 -5 lines
File MIME type: text/plain
Runtime error with ROOT 5.24 fixed, many small changes and warnings fixing

1 /** @file
2 * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/EventCounter.h,v $
3 * $Id: EventCounter.h,v 1.1.1.1 2008/09/23 07:19:51 mocchiut Exp $
4 * $Author: mocchiut $
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 "PacketType.h"
14 #include <TObject.h>
15
16 namespace pamela {
17 /**
18 * Event counter. Contains the event numbers of the last read event of
19 * each event type.
20 */
21 class EventCounter : public TObject {
22 private:
23
24 int Pscu;
25 int PhysEndRun;
26 int CalibCalPulse1;
27 int CalibCalPulse2;
28 int Physics;
29 int CalibTrkBoth;
30 int CalibTrk1;
31 int CalibTrk2;
32 int CalibCal;
33 int CalibTof;
34 int CalibS4;
35 int CalibCalPed;
36 int Calib1_Ac1;
37 int Calib1_Ac2;
38 int Calib2_Ac1;
39 int Calib2_Ac2;
40 int RunHeader;
41 int RunTrailer;
42 int CalibHeader;
43 int CalibTrailer;
44 int InitHeader;
45 int InitTrailer;
46 int EventTrk;
47 int Log;
48 int VarDump;
49 int ArrDump;
50 int TabDump;
51 int Tmtc;
52 int Mcmd;
53 int ForcedFECmd;
54 int Ac1Init;
55 int CalInit;
56 int TrkInit;
57 int TofInit;
58 int TrgInit;
59 int NdInit;
60 int S4Init;
61 int Ac2Init;
62 int CalAlarm;
63 int Ac1Alarm;
64 int TrkAlarm;
65 int TrgAlarm;
66 int TofAlarm;
67 int S4Alarm;
68 int Ac2Alarm;
69 int TsbT;
70 int TsbB;
71 int RunNumber; /**< Run number */
72
73 typedef std::map<const pamela::PacketType *, int *> CounterMap;
74 CounterMap CMap; //!
75
76 public:
77 EventCounter(int = 0);
78 /** Get the run number for the last read event of this type. */
79 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. */
83 int Next(pamela::PacketType const *) const throw (NotExistingCounterException);
84 int GetRunNumber(void) const { return RunNumber; }
85 void Increment(pamela::PacketType const *) throw (NotExistingCounterException);
86 void PrintCounters() const ;
87 ClassDef(EventCounter, 7)
88 };
89 }
90
91 #endif /* EVENTCOUNTER_H */
92
93

  ViewVC Help
Powered by ViewVC 1.1.23