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

Annotation of /chewbacca/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Aug 4 13:58:16 2009 UTC (15 years, 3 months ago) by mocchiut
Branch: MAIN
Changes since 1.3: +45 -9 lines
File MIME type: text/plain
Changed to work with GCC 4.x (gfortran) + ROOT >= 5.24

1 mocchiut 1.1 /** @file
2 mocchiut 1.2 * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/EventCounter.h,v $
3 mocchiut 1.4 * $Id: EventCounter.h,v 1.3 2009/07/29 15:47:20 mocchiut Exp $
4 mocchiut 1.2 * $Author: mocchiut $
5 mocchiut 1.1 *
6     * Header file for the EventCounter class.
7     */
8     #ifndef EVENTCOUNTER_H
9     #define EVENTCOUNTER_H
10    
11     #include "Exception.h"
12     #include "PacketType.h"
13     #include <TObject.h>
14 mocchiut 1.4 #include <TClonesArray.h>
15 mocchiut 1.1
16     namespace pamela {
17 mocchiut 1.4
18     class mapval: public TObject {
19     private:
20    
21     public:
22     mapval();
23     mapval(TString n, Int_t *i);
24     mapval(const mapval &val);
25     // Int_t fN; //
26     Int_t *count; //!
27     TString name; //!
28     void Clear(Option_t *t="") { t="";};
29     mapval* GetMapVal(){return this;};
30     ClassDef(mapval, 0);
31     };
32    
33     class mappa: public TObject {
34     private:
35     Bool_t fend;
36     Int_t entries;
37     TClonesArray *val;
38    
39     public:
40     mappa();
41     void Clear(Option_t *t="");
42     void Delete(Option_t *t="");
43     //
44     int GetEntries(){ return val->GetEntries();};
45     void Insert(TString, Int_t *);
46     mapval* Find(TString);
47     mapval* Get(Int_t i){ return ((mapval*)val->At(i));};
48     Bool_t end(){ return fend;};
49     void Set();
50     ClassDef(mappa, 1);
51     };
52    
53    
54 mocchiut 1.1 /**
55     * Event counter. Contains the event numbers of the last read event of
56     * each event type.
57     */
58     class EventCounter : public TObject {
59     private:
60 mocchiut 1.2
61 mocchiut 1.3 int RunNumber; /**< Run number */
62 mocchiut 1.1 int Pscu;
63     int PhysEndRun;
64     int CalibCalPulse1;
65     int CalibCalPulse2;
66     int Physics;
67     int CalibTrkBoth;
68     int CalibTrk1;
69     int CalibTrk2;
70     int CalibCal;
71     int CalibTof;
72     int CalibS4;
73     int CalibCalPed;
74     int Calib1_Ac1;
75     int Calib1_Ac2;
76     int Calib2_Ac1;
77     int Calib2_Ac2;
78     int RunHeader;
79     int RunTrailer;
80     int CalibHeader;
81     int CalibTrailer;
82     int InitHeader;
83     int InitTrailer;
84     int EventTrk;
85     int Log;
86     int VarDump;
87     int ArrDump;
88     int TabDump;
89     int Tmtc;
90     int Mcmd;
91     int ForcedFECmd;
92     int Ac1Init;
93     int CalInit;
94     int TrkInit;
95     int TofInit;
96     int TrgInit;
97     int NdInit;
98     int S4Init;
99     int Ac2Init;
100     int CalAlarm;
101     int Ac1Alarm;
102     int TrkAlarm;
103     int TrgAlarm;
104     int TofAlarm;
105     int S4Alarm;
106     int Ac2Alarm;
107     int TsbT;
108     int TsbB;
109    
110 mocchiut 1.4 mappa CMap;
111    
112 mocchiut 1.1 public:
113     EventCounter(int = 0);
114     /** Get the run number for the last read event of this type. */
115     int getPscu() const { return Pscu; };
116     /** Get the run number for the last read event of this type. */
117 mocchiut 1.4 int Get(pamela::PacketType const *) throw (NotExistingCounterException);
118 mocchiut 1.1 /** Get the run number for the next event of this type. */
119 mocchiut 1.4 int Next(pamela::PacketType const *) throw (NotExistingCounterException);
120 mocchiut 1.1 int GetRunNumber(void) const { return RunNumber; }
121     void Increment(pamela::PacketType const *) throw (NotExistingCounterException);
122 mocchiut 1.4 void PrintCounters();
123     ClassDef(EventCounter, 9)
124 mocchiut 1.1 };
125     }
126    
127     #endif /* EVENTCOUNTER_H */
128    
129    

  ViewVC Help
Powered by ViewVC 1.1.23