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

Diff of /yoda/event/EventCounter.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by kusanagi, Tue Jul 6 13:31:14 2004 UTC revision 3.0 by kusanagi, Fri Mar 4 15:54:11 2005 UTC
# Line 1  Line 1 
1  /** @file  /**     @file
2   * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $   * $Source: /home/cvsmanager/yoda/event/EventCounter.h,v $
3   * $Id: EventCounter.h,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $   * $Id: EventCounter.h,v 2.6 2005/03/03 10:23:30 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Header file for the EventCounter class.   * Header file for the EventCounter class.
# Line 9  Line 9 
9  #define EVENTCOUNTER_H  #define EVENTCOUNTER_H
10    
11  #include <map>  #include <map>
12  //#include <root/TObject.h>  #include "Exception.h"
 #include <TObject.h> //Substituted by Maurizio 05 Feb 2004  
   
13  #include "PscuHeader.h"  #include "PscuHeader.h"
14    
15  namespace pamela {  namespace pamela {
# Line 22  namespace pamela { Line 20  namespace pamela {
20    class EventCounter : public TObject {    class EventCounter : public TObject {
21    private:    private:
22      int RunNumber;    /**< Run number */      int RunNumber;    /**< Run number */
23        
     // New Packets.  
24      int Pscu;      int Pscu;
25        int PhysEndRun;
26        int CalibCalPulse1;
27        int CalibCalPulse2;
28      int Physics;      int Physics;
29      int Forced_Pkt;      int CalibTrkBoth;
30      int Calib_Trk1;      int CalibTrk1;
31      int Calib_Trk2;      int CalibTrk2;
32      int Calib_Cal;      int CalibCal;
33      int Calib_Trd;      int CalibTrd;
34      int Calib_Tof;      int CalibTof;
35      int Calib_S4;      int CalibS4;
36      int Run_Header;      int CalibCalPed;
37      int Run_Trailer;      int Calib1_Ac1;
38      int Alarm;      int Calib1_Ac2;
39      int Khb;      int Calib2_Ac1;
40        int Calib2_Ac2;
41        int RunHeader;
42        int RunTrailer;
43        int CalibHeader;
44        int CalibTrailer;
45        int InitHeader;
46        int InitTrailer;
47        int EventTrk;
48        int TestTrk;
49        int TestTof;
50      int Log;      int Log;
51      int VarDump;      int VarDump;
52      int ArrDump;      int ArrDump;
53      int TabDump;      int TabDump;
54      int Tmtc;      int Tmtc;
55      int Mcmd;      int Mcmd;
56      int HA_Header_E5;      int ForcedFECmd;
57        int Ac1Init;
58        int CalInit;
59        int TrkInit;
60        int TofInit;
61        int TrgInit;
62        int NdInit;
63        int S4Init;
64        int Ac2Init;
65        int CalAlarm;
66        int AcAlarm;
67        int TrkAlarm;
68        int TrgAlarm;
69        int TofAlarm;
70        int S4Alarm;
71        int TsbT;
72        int TsbB;
73    
74      typedef std::map<const pamela::PacketType *, int *> CounterMap;      typedef std::map<const pamela::PacketType *, int *> CounterMap;
75      CounterMap CMap; //!      CounterMap CMap; //!
76        
77    public:    public:
78      EventCounter(int = 0);      EventCounter(int = 0);
79      /** Get the run number for the last read event of this type. */      /** Get the run number for the last read event of this type. */
80      int Get(pamela::PacketType const *) const;      int getPscu() const { return Pscu; };
81        /** Get the run number for the last read event of this type. */
82        int Get(pamela::PacketType const *) const throw (NotExistingCounterException);
83      /** Get the run number for the next event of this type. */      /** Get the run number for the next event of this type. */
84      int Next(pamela::PacketType const *) const;      int Next(pamela::PacketType const *) const throw (NotExistingCounterException);
85      int GetRunNumber(void) const { return RunNumber; }      int GetRunNumber(void) const { return RunNumber; }
86      void Increment(pamela::PacketType const *);      void Increment(pamela::PacketType const *) throw (NotExistingCounterException);
87      void PrintCounters() const ;      void PrintCounters() const ;
88      ClassDef(EventCounter, 1)      ClassDef(EventCounter, 3)
89    };    };
90  }  }
91    
92  #endif /* EVENTCOUNTER_H */  #endif /* EVENTCOUNTER_H */
93    
94    

Legend:
Removed from v.1.2  
changed lines
  Added in v.3.0

  ViewVC Help
Powered by ViewVC 1.1.23