/[PAMELA software]/yoda/techmodel/ReaderAlgorithms.h
ViewVC logotype

Diff of /yoda/techmodel/ReaderAlgorithms.h

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

revision 2.2 by kusanagi, Fri Dec 3 22:08:01 2004 UTC revision 2.7 by kusanagi, Sat Jan 29 00:26:55 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/09/24 11:57:49 $   * $Date: 2004/12/17 14:00:53 $
4   * $Revision: 2.1 $   * $Revision: 2.6 $
5   *   *
6   * Header file for the algorithms used to read the techmodel data file.   * Header file for the algorithms used to read the techmodel data file.
7   */   */
# Line 20  Line 20 
20  #include "physics/AnticounterReader.h"  #include "physics/AnticounterReader.h"
21  #include "physics/CalorimeterReader.h"  #include "physics/CalorimeterReader.h"
22  #include "physics/NeutronDetectorReader.h"  #include "physics/NeutronDetectorReader.h"
23    #include "physics/S4Reader.h"
24    #include "physics/TofReader.h"
25    #include "physics/TriggerReader.h"
26  #include "CalibTrkBothEvent.h"  #include "CalibTrkBothEvent.h"
27  #include "CalibTrk1Event.h"  #include "CalibTrk1Event.h"
28  #include "CalibTrk2Event.h"  #include "CalibTrk2Event.h"
# Line 27  Line 30 
30  #include "CalibTofEvent.h"  #include "CalibTofEvent.h"
31  #include "CalibS4Event.h"  #include "CalibS4Event.h"
32  #include "CalibCalPedEvent.h"  #include "CalibCalPedEvent.h"
33  #include "CalibAcEvent.h"  #include "Calib1_Ac1Event.h"
34    #include "Calib1_Ac2Event.h"
35    #include "Calib2_Ac1Event.h"
36    #include "Calib2_Ac2Event.h"
37  #include "RunHeaderEvent.h"  #include "RunHeaderEvent.h"
38  #include "RunTrailerEvent.h"  #include "RunTrailerEvent.h"
39  #include "CalibHeaderEvent.h"  #include "CalibHeaderEvent.h"
# Line 44  Line 50 
50  #include "tmtc/TmtcEvent.h"  #include "tmtc/TmtcEvent.h"
51  #include "mcmd/McmdEvent.h"  #include "mcmd/McmdEvent.h"
52  #include "ForcedFECmdEvent.h"  #include "ForcedFECmdEvent.h"
53  #include "AcInitEvent.h"  #include "Ac1InitEvent.h"
54  #include "CalInitEvent.h"  #include "CalInitEvent.h"
55  #include "TrkInitEvent.h"  #include "TrkInitEvent.h"
56  #include "TofInitEvent.h"  #include "TofInitEvent.h"
57  #include "TrgInitEvent.h"  #include "TrgInitEvent.h"
58  #include "NdInitEvent.h"  #include "NdInitEvent.h"
59    #include "S4InitEvent.h"
60    #include "Ac2InitEvent.h"
61  #include "CalAlarmEvent.h"  #include "CalAlarmEvent.h"
62  #include "AcAlarmEvent.h"  #include "AcAlarmEvent.h"
63  #include "TrkAlarmEvent.h"  #include "TrkAlarmEvent.h"
64  #include "TrgAlarmEvent.h"  #include "TrgAlarmEvent.h"
65  #include "TofAlarmEvent.h"  #include "TofAlarmEvent.h"
66    #include "S4AlarmEvent.h"
67    
68  using namespace std;  using namespace std;
69    
# Line 125  namespace pamela { Line 134  namespace pamela {
134        anticounter::AnticounterReader*   anticounterReader;        anticounter::AnticounterReader*   anticounterReader;
135        calorimeter::CalorimeterReader*   calorimeterReader;        calorimeter::CalorimeterReader*   calorimeterReader;
136        neutron::NeutronDetectorReader*   neutronReader;        neutron::NeutronDetectorReader*   neutronReader;
137          S4::S4Reader*                     s4Reader;
138          tof::TofReader*                   tofReader;
139          trigger::TriggerReader*           triggerReader;
140      public:      public:
141        PhysicsReader(void);        PhysicsReader(void);
142        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
# Line 220  namespace pamela { Line 232  namespace pamela {
232      class CalibS4Reader: public TechmodelAlgorithm {      class CalibS4Reader: public TechmodelAlgorithm {
233      private:      private:
234        /** The CalibCal event that is created in the reader. */        /** The CalibCal event that is created in the reader. */
235        CalibS4Event* CalibS4;        CalibS4Event* calibS4;
236      public:      public:
237        CalibS4Reader(void);        CalibS4Reader(void);
238        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
# Line 245  namespace pamela { Line 257  namespace pamela {
257    
258    
259  /***********************************************  /***********************************************
260  * Event reader algorithm for CalibAc events.  * Event reader algorithm for Calib1_Ac1 events.
261  **********************************************/  **********************************************/
262      class CalibAcReader: public TechmodelAlgorithm {      class Calib1_Ac1Reader: public TechmodelAlgorithm {
263      private:      private:
264        /** The CalibAc event that is created in the reader. */        /** The CalibAc event that is created in the reader. */
265        CalibAcEvent* CalibAc;        Calib1_Ac1Event* calib1_Ac1;
266      public:      public:
267        CalibAcReader(void);        Calib1_Ac1Reader(void);
268          virtual void Init(PamelaRun *);
269          virtual void RunEvent(int, long int) throw (Exception);
270          virtual std::string GetVersionInfo(void) const;
271        };
272    
273    
274    /***********************************************
275    * Event reader algorithm for Calib1_Ac2 events.
276    **********************************************/
277        class Calib1_Ac2Reader: public TechmodelAlgorithm {
278        private:
279          /** The Calib1_Ac2 event that is created in the reader. */
280          Calib1_Ac2Event* calib1_Ac2;
281        public:
282          Calib1_Ac2Reader(void);
283          virtual void Init(PamelaRun *);
284          virtual void RunEvent(int, long int) throw (Exception);
285          virtual std::string GetVersionInfo(void) const;
286        };
287    
288    /***********************************************
289    * Event reader algorithm for Calib2_Ac1 events.
290    **********************************************/
291        class Calib2_Ac1Reader: public TechmodelAlgorithm {
292        private:
293          /** The Calib2_Ac1 event that is created in the reader. */
294          Calib2_Ac1Event* calib2_Ac1;
295        public:
296          Calib2_Ac1Reader(void);
297          virtual void Init(PamelaRun *);
298          virtual void RunEvent(int, long int) throw (Exception);
299          virtual std::string GetVersionInfo(void) const;
300        };
301    
302    /***********************************************
303    * Event reader algorithm for Calib2_Ac2 events.
304    **********************************************/
305        class Calib2_Ac2Reader: public TechmodelAlgorithm {
306        private:
307          /** The Calib2_Ac2 event that is created in the reader. */
308          Calib2_Ac2Event* calib2_Ac2;
309        public:
310          Calib2_Ac2Reader(void);
311        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
312        virtual void RunEvent(int, long int) throw (Exception);        virtual void RunEvent(int, long int) throw (Exception);
313        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
# Line 457  namespace pamela { Line 512  namespace pamela {
512  **********************************************/  **********************************************/
513      class TmtcReader: public TechmodelAlgorithm {      class TmtcReader: public TechmodelAlgorithm {
514      //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)      //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)
515      static const int TMTC_SUB_LENGTH = 57;      static const int TMTC_SUB_LENGTH = 36;
516      //Length in bytes of the subPacketCRC      //Length in bytes of the subPacketCRC
517      static const int TMTC_SUBCRC_LENGTH = 1;      static const int TMTC_SUBCRC_LENGTH = 1;
518      //Length in bytes of the PacketCRC      //Length in bytes of the PacketCRC
# Line 465  namespace pamela { Line 520  namespace pamela {
520      private:      private:
521        /** The TMTC event that is created in the reader. */        /** The TMTC event that is created in the reader. */
522        TmtcEvent* Tmtc;        TmtcEvent* Tmtc;
523        float convert_th(int);        //float convert_th(int);
524      public:      public:
525      TmtcReader(void);      TmtcReader(void);
526      virtual void Init(PamelaRun *);      virtual void Init(PamelaRun *);
# Line 505  namespace pamela { Line 560  namespace pamela {
560    
561    
562  /**********************************************  /**********************************************
563  * Event reader algorithm for AcInit events.  * Event reader algorithm for Ac1Init events.
564  **********************************************/  **********************************************/
565      class AcInitReader: public TechmodelAlgorithm {      class Ac1InitReader: public TechmodelAlgorithm {
566      private:      private:
567        /** The AcInit event that is created in the reader. */        /** The Ac1Init event that is created in the reader. */
568        AcInitEvent* acInit;        Ac1InitEvent* ac1Init;
569      public:      public:
570        AcInitReader(void);        Ac1InitReader(void);
571        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
572        virtual void RunEvent(int, long int) throw (WrongCRCException);        virtual void RunEvent(int, long int) throw (WrongCRCException);
573        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
# Line 592  namespace pamela { Line 647  namespace pamela {
647        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
648      };      };
649    
650    /**********************************************
651    * Event reader algorithm for S4Init events.
652    **********************************************/
653        class S4InitReader: public TechmodelAlgorithm {
654        private:
655          /** The S4Init event that is created in the reader. */
656          S4InitEvent* s4Init;
657        public:
658          S4InitReader(void);
659          virtual void Init(PamelaRun *);
660          virtual void RunEvent(int, long int) throw (WrongCRCException);
661          virtual std::string GetVersionInfo(void) const;
662        };
663    
664    
665    /**********************************************
666    * Event reader algorithm for Ac2Init events.
667    **********************************************/
668        class Ac2InitReader: public TechmodelAlgorithm {
669        private:
670          /** The Ac2Init event that is created in the reader. */
671          Ac2InitEvent* ac2Init;
672        public:
673          Ac2InitReader(void);
674          virtual void Init(PamelaRun *);
675          virtual void RunEvent(int, long int) throw (WrongCRCException);
676          virtual std::string GetVersionInfo(void) const;
677        };
678    
679    
680  /**********************************************  /**********************************************
681  * Event reader algorithm for CalAlarm events.  * Event reader algorithm for CalAlarm events.
# Line 664  namespace pamela { Line 748  namespace pamela {
748      };      };
749    
750  /**********************************************  /**********************************************
751    * Event reader algorithm for S4Alarm events.
752    **********************************************/
753        class S4AlarmReader: public TechmodelAlgorithm {
754        private:
755          /** The S4Alarm event that is created in the reader. */
756          S4AlarmEvent* s4Alarm;
757        public:
758          S4AlarmReader(void);
759          virtual void Init(PamelaRun *);
760          virtual void RunEvent(int, long int) throw (WrongCRCException);
761          virtual std::string GetVersionInfo(void) const;
762        };
763    
764    /**********************************************
765  * Event reader algorithm for PSCU events.  * Event reader algorithm for PSCU events.
766  **********************************************/  **********************************************/
767      class PscuReader: public TechmodelAlgorithm {      class PscuReader: public TechmodelAlgorithm {
# Line 684  namespace pamela { Line 782  namespace pamela {
782  #endif /* READER_ALGORITHM_H */  #endif /* READER_ALGORITHM_H */
783    
784    
785    
786    

Legend:
Removed from v.2.2  
changed lines
  Added in v.2.7

  ViewVC Help
Powered by ViewVC 1.1.23