/[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.3 by kusanagi, Tue Jul 6 14:07:24 2004 UTC revision 6.1 by kusanagi, Wed Feb 15 15:47:14 2006 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.2 2004/07/06 13:31:14 kusanagi Exp $   * $Id: EventCounter.h,v 6.0 2006/02/07 17:11:07 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"
13  #include <TObject.h> //Substituted by Maurizio 05 Feb 2004  #include "PacketType.h"
14    #include <TObject.h>
 #include "PscuHeader.h"  
15    
16  namespace pamela {  namespace pamela {
17    /**    /**
# Line 22  namespace pamela { Line 21  namespace pamela {
21    class EventCounter : public TObject {    class EventCounter : public TObject {
22    private:    private:
23      int RunNumber;    /**< Run number */      int RunNumber;    /**< Run number */
24        
     // New Packets.  
25      int Pscu;      int Pscu;
26        int PhysEndRun;
27        int CalibCalPulse1;
28        int CalibCalPulse2;
29      int Physics;      int Physics;
30      int Forced_Pkt;      int CalibTrk1;
31      int Calib_Trk1;      int CalibTrk2;
32      int Calib_Trk2;      int CalibCal;
33      int Calib_Cal;      int CalibTof;
34      int Calib_CalPed;      int CalibS4;
35      int Calib_Trd;      int CalibCalPed;
36      int Calib_Tof;      int Calib1_Ac1;
37      int Calib_S4;      int Calib1_Ac2;
38      int Run_Header;      int Calib2_Ac1;
39      int Run_Trailer;      int Calib2_Ac2;
40      int Alarm;      int RunHeader;
41      int Khb;      int RunTrailer;
42        int CalibHeader;
43        int CalibTrailer;
44        int InitHeader;
45        int InitTrailer;
46        int EventTrk;
47      int Log;      int Log;
48      int VarDump;      int VarDump;
49      int ArrDump;      int ArrDump;
50      int TabDump;      int TabDump;
51      int Tmtc;      int Tmtc;
52      int Mcmd;      int Mcmd;
53      int HA_Header_E5;      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 AcAlarm;
64        int TrkAlarm;
65        int TrgAlarm;
66        int TofAlarm;
67        int S4Alarm;
68        int TsbT;
69        int TsbB;
70    
71      typedef std::map<const pamela::PacketType *, int *> CounterMap;      typedef std::map<const pamela::PacketType *, int *> CounterMap;
72      CounterMap CMap; //!      CounterMap CMap; //!
73        
74    public:    public:
75      EventCounter(int = 0);      EventCounter(int = 0);
76      /** Get the run number for the last read event of this type. */      /** Get the run number for the last read event of this type. */
77      int Get(pamela::PacketType const *) const;      int getPscu() const { return Pscu; };
78        /** Get the run number for the last read event of this type. */
79        int Get(pamela::PacketType const *) const throw (NotExistingCounterException);
80      /** Get the run number for the next event of this type. */      /** Get the run number for the next event of this type. */
81      int Next(pamela::PacketType const *) const;      int Next(pamela::PacketType const *) const throw (NotExistingCounterException);
82      int GetRunNumber(void) const { return RunNumber; }      int GetRunNumber(void) const { return RunNumber; }
83      void Increment(pamela::PacketType const *);      void Increment(pamela::PacketType const *) throw (NotExistingCounterException);
84      void PrintCounters() const ;      void PrintCounters() const ;
85      ClassDef(EventCounter, 1)      ClassDef(EventCounter, 6)
86    };    };
87  }  }
88    
89  #endif /* EVENTCOUNTER_H */  #endif /* EVENTCOUNTER_H */
90    
91    

Legend:
Removed from v.1.3  
changed lines
  Added in v.6.1

  ViewVC Help
Powered by ViewVC 1.1.23