/[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.7.2.1 by kusanagi, Fri Mar 4 10:30:07 2005 UTC revision 6.0 by kusanagi, Tue Feb 7 17:11:10 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2005/01/29 00:26:55 $   * $Date: 2006/02/04 12:37:45 $
4   * $Revision: 2.7 $   * $Revision: 5.1 $
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 23  Line 23 
23  #include "physics/S4Reader.h"  #include "physics/S4Reader.h"
24  #include "physics/TofReader.h"  #include "physics/TofReader.h"
25  #include "physics/TriggerReader.h"  #include "physics/TriggerReader.h"
 #include "CalibTrkBothEvent.h"  
26  #include "CalibTrk1Event.h"  #include "CalibTrk1Event.h"
27  #include "CalibTrk2Event.h"  #include "CalibTrk2Event.h"
 #include "CalibTrdEvent.h"  
28  #include "CalibTofEvent.h"  #include "CalibTofEvent.h"
29  #include "CalibS4Event.h"  #include "CalibS4Event.h"
30  #include "CalibCalPedEvent.h"  #include "CalibCalPedEvent.h"
# Line 40  Line 38 
38  #include "CalibTrailerEvent.h"  #include "CalibTrailerEvent.h"
39  #include "InitHeaderEvent.h"  #include "InitHeaderEvent.h"
40  #include "InitTrailerEvent.h"  #include "InitTrailerEvent.h"
 #include "EventTrkEvent.h"  
 #include "TestTrkEvent.h"  
 #include "TestTofEvent.h"  
41  #include "log/LogEvent.h"  #include "log/LogEvent.h"
42  #include "varDump/VarDumpEvent.h"  #include "varDump/VarDumpEvent.h"
43  #include "arrDump/ArrDumpEvent.h"  #include "arrDump/ArrDumpEvent.h"
44  #include "tabDump/TabDumpEvent.h"  #include "tabDump/TabDumpEvent.h"
45    #include "tsbt/TsbTEvent.h"
46    #include "tsbb/TsbBEvent.h"
47  #include "tmtc/TmtcEvent.h"  #include "tmtc/TmtcEvent.h"
48  #include "mcmd/McmdEvent.h"  #include "mcmd/McmdEvent.h"
49  #include "ForcedFECmdEvent.h"  #include "ForcedFECmdEvent.h"
# Line 64  Line 61 
61  #include "TrgAlarmEvent.h"  #include "TrgAlarmEvent.h"
62  #include "TofAlarmEvent.h"  #include "TofAlarmEvent.h"
63  #include "S4AlarmEvent.h"  #include "S4AlarmEvent.h"
64  #include "tsbt/TsbTEvent.h"  #include <fstream>
65  #include "tsbb/TsbBEvent.h"  #include <log4cxx/logger.h>
66    
67    extern "C" {
68            #include "CRC.h"
69    }
70    
71  using namespace std;  using namespace std;
72    
73  namespace pamela {  namespace pamela {
74    namespace techmodel {    namespace techmodel {
75    
76  /**********************************************  /**
77  * Event reader algorithm for PhysEndRun events.   Event reader algorithm for PhysEndRun events.
78  **********************************************/   *
79     */
80      class PhysEndRunReader: public TechmodelAlgorithm {      class PhysEndRunReader: public TechmodelAlgorithm {
81      private:      private:
82        /** The PhysEndRun event that is created in the reader. */        /** The PhysEndRun event that is created in the reader. */
83        PhysEndRunEvent* physEndRun;        PhysEndRunEvent* physEndRun;
84      public:      public:
85          /**
86           * Constructor
87           * @param  
88           * @return
89           */
90        PhysEndRunReader(void);        PhysEndRunReader(void);
91        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
92        virtual void RunEvent(int, long int) throw (WrongCRCException);        virtual void RunEvent(int, long int) throw (WrongCRCException);
# Line 148  namespace pamela { Line 155  namespace pamela {
155    
156    
157  /**********************************************  /**********************************************
 * Event reader algorithm for CalibTrkBoth events.  
 **********************************************/  
     class CalibTrkBothReader: public TechmodelAlgorithm {  
     private:  
       /** The CalibTrkBoth event that is created in the reader. */  
       CalibTrkBothEvent* calibTrkBoth;  
     public:  
       CalibTrkBothReader(void);  
       virtual void Init(PamelaRun *);  
       virtual void RunEvent(int, long int) throw (Exception);  
       //this type of RUNEvent should be the future develop.  
       //Pass the buffer not the pointer to file  
       //virtual void RunEvent(int, long int, char[]);  
       virtual std::string GetVersionInfo(void) const;  
     };  
   
   
 /**********************************************  
158  * Event reader algorithm for CalibTrk1 events.  * Event reader algorithm for CalibTrk1 events.
159  **********************************************/  **********************************************/
160      class CalibTrk1Reader: public TechmodelAlgorithm {      class CalibTrk1Reader: public TechmodelAlgorithm {
# Line 199  namespace pamela { Line 188  namespace pamela {
188    
189    
190  /**********************************************  /**********************************************
 * Event reader algorithm for CalibTrd events.  
 **********************************************/  
     class CalibTrdReader: public TechmodelAlgorithm {  
     private:  
       /** The CalibTrd event that is created in the reader. */  
       CalibTrdEvent* calibTrd;  
     public:  
       CalibTrdReader(void);  
       virtual void Init(PamelaRun *);  
       virtual void RunEvent(int, long int) throw (Exception);  
       virtual std::string GetVersionInfo(void) const;  
     };  
   
   
 /**********************************************  
191  * Event reader algorithm for CalibTof events.  * Event reader algorithm for CalibTof events.
192  **********************************************/  **********************************************/
193      class CalibTofReader: public TechmodelAlgorithm {      class CalibTofReader: public TechmodelAlgorithm {
# Line 238  namespace pamela { Line 212  namespace pamela {
212      public:      public:
213        CalibS4Reader(void);        CalibS4Reader(void);
214        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
215        virtual void RunEvent(int, long int) throw (Exception);        virtual void RunEvent(int, long int) throw (WrongCRCException);
216        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
217      };      };
218    
# Line 407  namespace pamela { Line 381  namespace pamela {
381    
382    
383  /**********************************************  /**********************************************
 * Event reader algorithm for EventTrk events.  
 **********************************************/  
     class EventTrkReader: public TechmodelAlgorithm {  
     private:  
       /** The EventTrk event that is created in the reader. */  
       EventTrkEvent* eventTrk;  
     public:  
       EventTrkReader(void);  
       virtual void Init(PamelaRun *);  
       virtual void RunEvent(int, long int) throw (Exception);  
       virtual std::string GetVersionInfo(void) const;  
     };  
   
   
 /**********************************************  
 * Event reader algorithm for TestTrk events.  
 **********************************************/  
     class TestTrkReader: public TechmodelAlgorithm {  
     private:  
       /** The TestTrk event that is created in the reader. */  
       TestTrkEvent* testTrk;  
     public:  
       TestTrkReader(void);  
       virtual void Init(PamelaRun *);  
       virtual void RunEvent(int, long int) throw (Exception);  
       virtual std::string GetVersionInfo(void) const;  
     };  
   
 /**********************************************  
 * Event reader algorithm for TestTof events.  
 **********************************************/  
     class TestTofReader: public TechmodelAlgorithm {  
     private:  
       /** The TestTof event that is created in the reader. */  
       TestTofEvent* testTof;  
     public:  
       TestTofReader(void);  
       virtual void Init(PamelaRun *);  
       virtual void RunEvent(int, long int) throw (Exception);  
       virtual std::string GetVersionInfo(void) const;  
     };  
   
 /**********************************************  
384  * Event reader algorithm for Log events.  * Event reader algorithm for Log events.
385  **********************************************/  **********************************************/
386      class LogReader: public TechmodelAlgorithm {      class LogReader: public TechmodelAlgorithm {
# Line 514  namespace pamela { Line 445  namespace pamela {
445  **********************************************/  **********************************************/
446      class TmtcReader: public TechmodelAlgorithm {      class TmtcReader: public TechmodelAlgorithm {
447      //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)      //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)
448      static const int TMTC_SUB_LENGTH = 36;      static const int TMTC_SUB_LENGTH = 44;
449      //Length in bytes of the subPacketCRC      //Length in bytes of the subPacketCRC
450      static const int TMTC_SUBCRC_LENGTH = 1;      static const int TMTC_SUBCRC_LENGTH = 1;
451      //Length in bytes of the PacketCRC      //Length in bytes of the PacketCRC
# Line 804  namespace pamela { Line 735  namespace pamela {
735        virtual void RunEvent(int, long int) throw (WrongCRCException);        virtual void RunEvent(int, long int) throw (WrongCRCException);
736        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
737      };      };
738    
739    
740    }    }
741  }  }
742    

Legend:
Removed from v.2.7.2.1  
changed lines
  Added in v.6.0

  ViewVC Help
Powered by ViewVC 1.1.23