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

Annotation of /yoda/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2.3 - (hide annotations) (download)
Thu Dec 9 08:47:42 2004 UTC (19 years, 11 months ago) by kusanagi
Branch: MAIN
Changes since 2.2: +5 -1 lines
File MIME type: text/plain
Fixed bug of Stack overflow in case of Log CRCError
Added S4Init & S4Alarm packets

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

  ViewVC Help
Powered by ViewVC 1.1.23