/[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 1.3 by kusanagi, Tue Jul 6 14:07:27 2004 UTC revision 6.2 by kusanagi, Tue Apr 25 16:51:04 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/07/06 13:31:18 $   * $Date: 2006/02/15 15:47:14 $
4   * $Revision: 1.2 $   * $Revision: 6.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 12  Line 12 
12  #include "TechmodelAlgorithm.h"  #include "TechmodelAlgorithm.h"
13  #include "PscuEvent.h"  #include "PscuEvent.h"
14    
 #include "VarDumpEvent.h"  
 #include "ArrDumpEvent.h"  
 #include "TabDumpEvent.h"  
15    
16  #include "CalibCalEvent.h"  #include "endrun/PhysEndRunEvent.h"
17  #include "CalibCalPedEvent.h"  #include "CalibCalPulse1Event.h"
18    #include "CalibCalPulse2Event.h"
19    #include "physics/TrackerReader.h"
20    #include "physics/AnticounterReader.h"
21    #include "physics/CalorimeterReader.h"
22    #include "physics/NeutronDetectorReader.h"
23    #include "physics/S4Reader.h"
24    #include "physics/TofReader.h"
25    #include "physics/TriggerReader.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"
31    #include "Calib1_Ac1Event.h"
32    #include "Calib1_Ac2Event.h"
33    #include "Calib2_Ac1Event.h"
34    #include "Calib2_Ac2Event.h"
35  #include "RunHeaderEvent.h"  #include "RunHeaderEvent.h"
36  #include "RunTrailerEvent.h"  #include "RunTrailerEvent.h"
37  #include "ForcedPktEvent.h"  #include "CalibHeaderEvent.h"
38    #include "CalibTrailerEvent.h"
39    #include "InitHeaderEvent.h"
40    #include "InitTrailerEvent.h"
41    #include "EventTrkEvent.h"
42    #include "log/LogEvent.h"
43    #include "varDump/VarDumpEvent.h"
44    #include "arrDump/ArrDumpEvent.h"
45    #include "tabDump/TabDumpEvent.h"
46    #include "tsbt/TsbTEvent.h"
47    #include "tsbb/TsbBEvent.h"
48  #include "tmtc/TmtcEvent.h"  #include "tmtc/TmtcEvent.h"
49  #include "mcmd/McmdEvent.h"  #include "mcmd/McmdEvent.h"
50  #include "log/LogEvent.h"  #include "ForcedFECmdEvent.h"
51    #include "Ac1InitEvent.h"
52    #include "CalInitEvent.h"
53    #include "TrkInitEvent.h"
54    #include "TofInitEvent.h"
55    #include "TrgInitEvent.h"
56    #include "NdInitEvent.h"
57    #include "S4InitEvent.h"
58    #include "Ac2InitEvent.h"
59    #include "CalAlarmEvent.h"
60    #include "AcAlarmEvent.h"
61    #include "TrkAlarmEvent.h"
62    #include "TrgAlarmEvent.h"
63    #include "TofAlarmEvent.h"
64    #include "S4AlarmEvent.h"
65    #include <fstream>
66    #include <log4cxx/logger.h>
67    
68  #include "physics/TrackerReader.h"  extern "C" {
69            #include "CRC.h"
70  #define UINT32 unsigned int  }
 #define UINT16 unsigned short  
 #define BYTE   unsigned char  
71    
72  using namespace std;  using namespace std;
73    
74  namespace pamela {  namespace pamela {
75    namespace techmodel {    namespace techmodel {
76      /**  
77       * Event reader algorithm for physics events.  /**
78       */   Event reader algorithm for PhysEndRun events.
79     *
80     */
81        class PhysEndRunReader: public TechmodelAlgorithm {
82        private:
83          /** The PhysEndRun event that is created in the reader. */
84          PhysEndRunEvent* physEndRun;
85        public:
86          /**
87           * Constructor
88           * @param  
89           * @return
90           */
91          PhysEndRunReader(void);
92          virtual void Init(PamelaRun *);
93          virtual void RunEvent(int, long int) throw (WrongCRCException);
94          //this type of RUNEvent should be the future develop.
95          //Pass the buffer not the pointer to file
96          //virtual void RunEvent(int, long int, char[]);
97          virtual std::string GetVersionInfo(void) const;
98        };
99    
100    
101    /**********************************************
102    * Event reader algorithm for CalibCalPulse1 events.
103    **********************************************/
104        class CalibCalPulse1Reader: public TechmodelAlgorithm {
105        private:
106          /** The CalibCalPulse1 event that is created in the reader. */
107          CalibCalPulse1Event* calibCalPulse1;
108        public:
109          CalibCalPulse1Reader(void);
110          virtual void Init(PamelaRun *);
111          virtual void RunEvent(int, long int) throw (Exception);
112          //this type of RUNEvent should be the future develop.
113          //Pass the buffer not the pointer to file
114          //virtual void RunEvent(int, long int, char[]);
115          virtual std::string GetVersionInfo(void) const;
116        };
117    
118    
119    /**********************************************
120    * Event reader algorithm for CalibCalPulse2 events.
121    **********************************************/
122        class CalibCalPulse2Reader: public TechmodelAlgorithm {
123        private:
124          /** The CalibCalPulse2 event that is created in the reader. */
125          CalibCalPulse2Event* calibCalPulse2;
126        public:
127          CalibCalPulse2Reader(void);
128          virtual void Init(PamelaRun *);
129          virtual void RunEvent(int, long int) throw (Exception);
130          //this type of RUNEvent should be the future develop.
131          //Pass the buffer not the pointer to file
132          //virtual void RunEvent(int, long int, char[]);
133          virtual std::string GetVersionInfo(void) const;
134        };
135    
136    
137    /**********************************************
138    * Event reader algorithm for physics events.
139    **********************************************/
140      class PhysicsReader: public TechmodelAlgorithm {      class PhysicsReader: public TechmodelAlgorithm {
141      private:      private:
142        /** The reader for tracker physics events. */        /** The reader for tracker physics events. */
143        tracker::TrackerReader* trackerReader;        tracker::TrackerReader*           trackerReader;
144        /** The reader for anticoincidence physics events. */        anticounter::AnticounterReader*   anticounterReader;
145        //anticoinc::AnticounterReader* AcReader;        calorimeter::CalorimeterReader*   calorimeterReader;
146        /** The reader for calorimeter physics events. */        neutron::NeutronDetectorReader*   neutronReader;
147        //calorimeter::CalorimeterReader* CalorimeterReader;        S4::S4Reader*                     s4Reader;
148          tof::TofReader*                   tofReader;
149          trigger::TriggerReader*           triggerReader;
150      public:      public:
151        PhysicsReader(void);        PhysicsReader(void);
152        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
153        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
154        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
155      };      };
156    
157      /**  
158       * Event reader algorithm for housekeeping events.  /**********************************************
159       */  <<<<<<< ReaderAlgorithms.h
160      /*  * Event reader algorithm for CalibTrkBoth events.
161      class HousekeepingReader: public TechmodelAlgorithm {  **********************************************/
162      /*  class CalibTrkBothReader: public TechmodelAlgorithm {
163      private:      private:
164          // The CalibTrkBoth event that is created in the reader.
165          CalibTrkBothEvent* calibTrkBoth;
166      public:      public:
167        HousekeepingReader(void);        CalibTrkBothReader(void);
168        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
169        virtual void RunEvent(int);        virtual void RunEvent(int, long int) throw (Exception);
170        virtual string GetVersionInfo(void) const;        //this type of RUNEvent should be the future develop.
171          //Pass the buffer not the pointer to file
172          //virtual void RunEvent(int, long int, char[]);
173          virtual std::string GetVersionInfo(void) const;
174      };      };
175      */  */
176    
177    /**********************************************
178    =======
179    >>>>>>> 6.1
180    * Event reader algorithm for CalibTrk1 events.
181    **********************************************/
182        class CalibTrk1Reader: public TechmodelAlgorithm {
183        private:
184          /** The CalibTrk1 event that is created in the reader. */
185          CalibTrk1Event* calibTrk1;
186        public:
187          CalibTrk1Reader(void);
188          virtual void Init(PamelaRun *);
189          virtual void RunEvent(int, long int) throw (Exception);
190          //this type of RUNEvent should be the future develop.
191          //Pass the buffer not the pointer to file
192          //virtual void RunEvent(int, long int, char[]);
193          virtual std::string GetVersionInfo(void) const;
194        };
195    
196      /**  
197       * Event reader algorithm for TMTC events.  /**********************************************
198       */  * Event reader algorithm for CalibTrk2 events.
199      class TmtcReader: public TechmodelAlgorithm {  **********************************************/
200      //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)      class CalibTrk2Reader: public TechmodelAlgorithm {
     static const int TMTC_SUB_LENGTH = 57;  
     //Length in bytes of the subPacketCRC  
     static const int TMTC_SUBCRC_LENGTH = 1;  
     //Length in bytes of the PacketCRC  
     static const int TMTC_CRC_LENGTH = 2;  
201      private:      private:
202        /** The TMTC event that is created in the reader. */        /** The CalibTrk2 event that is created in the reader. */
203        TmtcEvent* Tmtc;        CalibTrk2Event* calibTrk2;
       float convert_th(int);  
204      public:      public:
205      TmtcReader(void);        CalibTrk2Reader(void);
206      virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
207      virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
208      virtual string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
209      };      };
210    
211    
212      /**  /**********************************************
213       * Event reader algorithm for PSCU events.  * Event reader algorithm for CalibTof events.
214       */  **********************************************/
215      class PscuReader: public TechmodelAlgorithm {      class CalibTofReader: public TechmodelAlgorithm {
216      private:      private:
217        /** The PSCU event that is created in the reader. */        /** The CalibTof event that is created in the reader. */
218        PscuEvent* Pscu;        CalibTofEvent* CalibTof;
219      public:      public:
220        PscuReader(void);        CalibTofReader(void);
221          virtual void Init(PamelaRun *);
222          virtual void RunEvent(int, long int) throw (Exception);
223          virtual std::string GetVersionInfo(void) const;
224        };
225    
226    
227    /**********************************************
228    * Event reader algorithm for CalibS4 events.
229    **********************************************/
230        class CalibS4Reader: public TechmodelAlgorithm {
231        private:
232          /** The CalibCal event that is created in the reader. */
233          CalibS4Event* calibS4;
234        public:
235          CalibS4Reader(void);
236          virtual void Init(PamelaRun *);
237          virtual void RunEvent(int, long int) throw (WrongCRCException);
238          virtual std::string GetVersionInfo(void) const;
239        };
240    
241    
242    /**********************************************
243    * Event reader algorithm for CalibCalPed events.
244    **********************************************/
245        class CalibCalPedReader: public TechmodelAlgorithm {
246        private:
247          /** The CalibCalPed event that is created in the reader. */
248          CalibCalPedEvent* calibCalPed;
249        public:
250          CalibCalPedReader(void);
251          virtual void Init(PamelaRun *);
252          virtual void RunEvent(int, long int) throw (Exception);
253          virtual std::string GetVersionInfo(void) const;
254        };
255    
256    
257    /***********************************************
258    * Event reader algorithm for Calib1_Ac1 events.
259    **********************************************/
260        class Calib1_Ac1Reader: public TechmodelAlgorithm {
261        private:
262          /** The CalibAc event that is created in the reader. */
263          Calib1_Ac1Event* calib1_Ac1;
264        public:
265          Calib1_Ac1Reader(void);
266          virtual void Init(PamelaRun *);
267          virtual void RunEvent(int, long int) throw (Exception);
268          virtual std::string GetVersionInfo(void) const;
269        };
270    
271    
272    /***********************************************
273    * Event reader algorithm for Calib1_Ac2 events.
274    **********************************************/
275        class Calib1_Ac2Reader: public TechmodelAlgorithm {
276        private:
277          /** The Calib1_Ac2 event that is created in the reader. */
278          Calib1_Ac2Event* calib1_Ac2;
279        public:
280          Calib1_Ac2Reader(void);
281          virtual void Init(PamelaRun *);
282          virtual void RunEvent(int, long int) throw (Exception);
283          virtual std::string GetVersionInfo(void) const;
284        };
285    
286    /***********************************************
287    * Event reader algorithm for Calib2_Ac1 events.
288    **********************************************/
289        class Calib2_Ac1Reader: public TechmodelAlgorithm {
290        private:
291          /** The Calib2_Ac1 event that is created in the reader. */
292          Calib2_Ac1Event* calib2_Ac1;
293        public:
294          Calib2_Ac1Reader(void);
295          virtual void Init(PamelaRun *);
296          virtual void RunEvent(int, long int) throw (Exception);
297          virtual std::string GetVersionInfo(void) const;
298        };
299    
300    /***********************************************
301    * Event reader algorithm for Calib2_Ac2 events.
302    **********************************************/
303        class Calib2_Ac2Reader: public TechmodelAlgorithm {
304        private:
305          /** The Calib2_Ac2 event that is created in the reader. */
306          Calib2_Ac2Event* calib2_Ac2;
307        public:
308          Calib2_Ac2Reader(void);
309          virtual void Init(PamelaRun *);
310          virtual void RunEvent(int, long int) throw (Exception);
311          virtual std::string GetVersionInfo(void) const;
312        };
313    
314    
315    /**********************************************
316    * Event reader algorithm for RunHeader events.
317    **********************************************/
318        class RunHeaderReader: public TechmodelAlgorithm {
319        private:
320          /** The RunHeader event that is created in the reader. */
321          RunHeaderEvent* RunHeader;
322        public:
323          RunHeaderReader(void);
324          virtual void Init(PamelaRun *);
325          virtual void RunEvent(int, long int) throw (WrongCRCException);
326          virtual std::string GetVersionInfo(void) const;
327        };
328    
329    
330    /**********************************************
331    * Event reader algorithm for RunTrailer events.
332    **********************************************/
333        class RunTrailerReader: public TechmodelAlgorithm {
334        private:
335          /** The RunTrailer event that is created in the reader. */
336          RunTrailerEvent* RunTrailer;
337        public:
338          RunTrailerReader(void);
339          virtual void Init(PamelaRun *);
340          virtual void RunEvent(int, long int) throw (WrongCRCException);
341          virtual std::string GetVersionInfo(void) const;
342        };
343    
344    
345    /**********************************************
346    * Event reader algorithm for CalibHeader events.
347    **********************************************/
348        class CalibHeaderReader: public TechmodelAlgorithm {
349        private:
350          /** The CalibHeader event that is created in the reader. */
351          CalibHeaderEvent* calibHeader;
352        public:
353          CalibHeaderReader(void);
354        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
355        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
356        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
357      };      };
358    
359      /**  
360       * Event reader algorithm for VarDump events.  /**********************************************
361       */  * Event reader algorithm for CalibTrailer events.
362    **********************************************/
363        class CalibTrailerReader: public TechmodelAlgorithm {
364        private:
365          /** The CalibTrailer event that is created in the reader. */
366          CalibTrailerEvent* calibTrailer;
367        public:
368          CalibTrailerReader(void);
369          virtual void Init(PamelaRun *);
370          virtual void RunEvent(int, long int) throw (WrongCRCException);
371          virtual std::string GetVersionInfo(void) const;
372        };
373    
374    
375    /**********************************************
376    * Event reader algorithm for InitHeader events.
377    **********************************************/
378        class InitHeaderReader: public TechmodelAlgorithm {
379        private:
380          /** The InitHeader event that is created in the reader. */
381          InitHeaderEvent* initHeader;
382        public:
383          InitHeaderReader(void);
384          virtual void Init(PamelaRun *);
385          virtual void RunEvent(int, long int) throw (WrongCRCException);
386          virtual std::string GetVersionInfo(void) const;
387        };
388    
389    
390    /**********************************************
391    * Event reader algorithm for InitTrailer events.
392    **********************************************/
393        class InitTrailerReader: public TechmodelAlgorithm {
394        private:
395          /** The InitTrailer event that is created in the reader. */
396          InitTrailerEvent* initTrailer;
397        public:
398          InitTrailerReader(void);
399          virtual void Init(PamelaRun *);
400          virtual void RunEvent(int, long int) throw (WrongCRCException);
401          virtual std::string GetVersionInfo(void) const;
402        };
403    
404    
405    /**********************************************
406    * Event reader algorithm for EventTrk events.
407    **********************************************/
408        class EventTrkReader: public TechmodelAlgorithm {
409        private:
410          /** The EventTrk event that is created in the reader. */
411          EventTrkEvent* eventTrk;
412        public:
413          EventTrkReader(void);
414          virtual void Init(PamelaRun *);
415          virtual void RunEvent(int, long int) throw (Exception);
416          virtual std::string GetVersionInfo(void) const;
417        };
418    
419    
420    /**********************************************
421    * Event reader algorithm for Log events.
422    **********************************************/
423        class LogReader: public TechmodelAlgorithm {
424        private:
425          /** The Log event that is created in the reader. */
426          LogEvent* Log;
427        public:
428          LogReader(void);
429          virtual void Init(PamelaRun *);
430          virtual void RunEvent(int, long int) throw (WrongCRCException);
431          virtual std::string GetVersionInfo(void) const;
432        };
433    
434    
435    /***********************************************
436    * Event reader algorithm for VarDump events.
437    **********************************************/
438      class VarDumpReader: public TechmodelAlgorithm {      class VarDumpReader: public TechmodelAlgorithm {
439      private:      private:
440        /** The VarDump event that is created in the reader. */        /** The VarDump event that is created in the reader. */
# Line 119  namespace pamela { Line 442  namespace pamela {
442      public:      public:
443        VarDumpReader(void);        VarDumpReader(void);
444        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
445        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
446        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
447      };      };
448    
449      /**  
450       * Event reader algorithm for ArrDump events.  /**********************************************
451       */  * Event reader algorithm for ArrDump events.
452    **********************************************/
453      class ArrDumpReader: public TechmodelAlgorithm {      class ArrDumpReader: public TechmodelAlgorithm {
454      private:      private:
455        /** The ArrDump event that is created in the reader. */        /** The ArrDump event that is created in the reader. */
# Line 133  namespace pamela { Line 457  namespace pamela {
457      public:      public:
458        ArrDumpReader(void);        ArrDumpReader(void);
459        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
460        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
461        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
462      };      };
463    
464      /**  
465       * Event reader algorithm for TabDump events.  /**********************************************
466       */  * Event reader algorithm for TabDump events.
467    **********************************************/
468      class TabDumpReader: public TechmodelAlgorithm {      class TabDumpReader: public TechmodelAlgorithm {
469      private:      private:
470        /** The TabDump event that is created in the reader. */        /** The TabDump event that is created in the reader. */
# Line 147  namespace pamela { Line 472  namespace pamela {
472      public:      public:
473        TabDumpReader(void);        TabDumpReader(void);
474        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
475        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
476        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
477      };      };
478    
479      /**  
480       * Event reader algorithm for Mcmd events.  /**********************************************
481       */  * Event reader algorithm for TMTC events.
482    **********************************************/
483        class TmtcReader: public TechmodelAlgorithm {
484        //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)
485        static const int TMTC_SUB_LENGTH = 44;
486        //Length in bytes of the subPacketCRC
487        static const int TMTC_SUBCRC_LENGTH = 1;
488        //Length in bytes of the PacketCRC
489        static const int TMTC_CRC_LENGTH = 2;
490        private:
491          /** The TMTC event that is created in the reader. */
492          TmtcEvent* Tmtc;
493          //float convert_th(int);
494        public:
495        TmtcReader(void);
496        virtual void Init(PamelaRun *);
497        virtual void RunEvent(int, long int) throw (WrongCRCException);
498        virtual string GetVersionInfo(void) const;
499        };
500    
501    
502    /**********************************************
503    * Event reader algorithm for Mcmd events.
504    **********************************************/
505      class McmdReader: public TechmodelAlgorithm {      class McmdReader: public TechmodelAlgorithm {
506      private:      private:
507        /** The Mcmd event that is created in the reader. */        /** The Mcmd event that is created in the reader. */
# Line 161  namespace pamela { Line 509  namespace pamela {
509      public:      public:
510        McmdReader(void);        McmdReader(void);
511        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
512        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
513        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
514      };      };
515    
516  /**  
517       * Event reader algorithm for Log events.  /**********************************************
518       */  * Event reader algorithm for ForcedFECmd events.
519      class LogReader: public TechmodelAlgorithm {  **********************************************/
520        class ForcedFECmdReader: public TechmodelAlgorithm {
521      private:      private:
522        /** The Log event that is created in the reader. */        /** The ForcedFECmd event that is created in the reader. */
523        LogEvent* Log;        ForcedFECmdEvent* forcedFECmd;
524      public:      public:
525        LogReader(void);        ForcedFECmdReader(void);
526        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
527        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
528        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
529      };      };
530    
531  /**  
532       * Event reader algorithm for CalibCal events.  /**********************************************
533       */  * Event reader algorithm for Ac1Init events.
534      class CalibCalReader: public TechmodelAlgorithm {  **********************************************/
535        class Ac1InitReader: public TechmodelAlgorithm {
536      private:      private:
537        /** The CalibCal event that is created in the reader. */        /** The Ac1Init event that is created in the reader. */
538        CalibCalEvent* CalibCal;        Ac1InitEvent* ac1Init;
539      public:      public:
540        CalibCalReader(void);        Ac1InitReader(void);
541        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
542        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
543        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
544      };      };
545    
546  /**  
547       * Event reader algorithm for CalibCalPed events.  /**********************************************
548       */  * Event reader algorithm for CalInit events.
549      class CalibCalPedReader: public TechmodelAlgorithm {  **********************************************/
550        class CalInitReader: public TechmodelAlgorithm {
551      private:      private:
552        /** The CalibCalPed event that is created in the reader. */        /** The CalInit event that is created in the reader. */
553        CalibCalPedEvent* CalibCalPed;        CalInitEvent* calInit;
554      public:      public:
555        CalibCalPedReader(void);        CalInitReader(void);
556        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
557        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
558        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
559      };      };
560    
561    
562  /**  /**********************************************
563       * Event reader algorithm for CalibTrk1 events.  * Event reader algorithm for TrkInit events.
564       */  **********************************************/
565      class CalibTrk1Reader: public TechmodelAlgorithm {      class TrkInitReader: public TechmodelAlgorithm {
566      private:      private:
567        /** The CalibTrk1 event that is created in the reader. */        /** The TrkInit event that is created in the reader. */
568        CalibTrk1Event* calibTrk1;        TrkInitEvent* trkInit;
569      public:      public:
570        CalibTrk1Reader(void);        TrkInitReader(void);
571        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
572        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
       //this type of RUNEvent should be the future develop.  
       //Pass the buffer not the pointer to file  
       //virtual void RunEvent(int, long int, char[]);  
573        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
574      };      };
575    
576  /**  
577       * Event reader algorithm for CalibTrk2 events.  /**********************************************
578       */  * Event reader algorithm for TofInit events.
579      class CalibTrk2Reader: public TechmodelAlgorithm {  **********************************************/
580        class TofInitReader: public TechmodelAlgorithm {
581      private:      private:
582        /** The CalibTrk2 event that is created in the reader. */        /** The TofInit event that is created in the reader. */
583        CalibTrk2Event* calibTrk2;        TofInitEvent* tofInit;
584      public:      public:
585        CalibTrk2Reader(void);        TofInitReader(void);
586        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
587        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
588        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
589      };      };
590    
591  /**  
592       * Event reader algorithm for CalibTrd events.  /**********************************************
593       */  * Event reader algorithm for TrgInit events.
594      class CalibTrdReader: public TechmodelAlgorithm {  **********************************************/
595        class TrgInitReader: public TechmodelAlgorithm {
596      private:      private:
597        /** The CalibTrd event that is created in the reader. */        /** The TrgInit event that is created in the reader. */
598        CalibTrdEvent* CalibTrd;        TrgInitEvent* trgInit;
599      public:      public:
600        CalibTrdReader(void);        TrgInitReader(void);
601        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
602        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
603        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
604      };      };
605    
606  /**  /**********************************************
607       * Event reader algorithm for CalibTof events.  * Event reader algorithm for NdInit events.
608       */  **********************************************/
609      class CalibTofReader: public TechmodelAlgorithm {      class NdInitReader: public TechmodelAlgorithm {
610      private:      private:
611        /** The CalibTof event that is created in the reader. */        /** The NdInit event that is created in the reader. */
612        CalibTofEvent* CalibTof;        NdInitEvent* ndInit;
613      public:      public:
614        CalibTofReader(void);        NdInitReader(void);
615        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
616        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
617        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
618      };      };
619    
620  /**  /**********************************************
621       * Event reader algorithm for CalibS4 events.  * Event reader algorithm for S4Init events.
622       */  **********************************************/
623      class CalibS4Reader: public TechmodelAlgorithm {      class S4InitReader: public TechmodelAlgorithm {
624      private:      private:
625        /** The CalibCal event that is created in the reader. */        /** The S4Init event that is created in the reader. */
626        CalibS4Event* CalibS4;        S4InitEvent* s4Init;
627      public:      public:
628        CalibS4Reader(void);        S4InitReader(void);
629        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
630        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
631        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
632      };      };
633    
634    
635  /**  /**********************************************
636       * Event reader algorithm for RunTrailer events.  * Event reader algorithm for Ac2Init events.
637       */  **********************************************/
638      class RunTrailerReader: public TechmodelAlgorithm {      class Ac2InitReader: public TechmodelAlgorithm {
639      private:      private:
640        /** The RunTrailer event that is created in the reader. */        /** The Ac2Init event that is created in the reader. */
641        RunTrailerEvent* RunTrailer;        Ac2InitEvent* ac2Init;
642      public:      public:
643        RunTrailerReader(void);        Ac2InitReader(void);
644        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
645        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
646        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
647      };      };
648    
649  /**  
650       * Event reader algorithm for RunHeader events.  /**********************************************
651       */  * Event reader algorithm for CalAlarm events.
652      class RunHeaderReader: public TechmodelAlgorithm {  **********************************************/
653        class CalAlarmReader: public TechmodelAlgorithm {
654      private:      private:
655        /** The RunHeader event that is created in the reader. */        /** The CalAlarm event that is created in the reader. */
656        RunHeaderEvent* RunHeader;        CalAlarmEvent* calAlarm;
657      public:      public:
658        RunHeaderReader(void);        CalAlarmReader(void);
659        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
660        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
661        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
662      };      };
663    
664  /**  /**********************************************
665       * Event reader algorithm for ForcedPkt events.  * Event reader algorithm for AcAlarm events.
666       */  **********************************************/
667      class ForcedPktReader: public TechmodelAlgorithm {      class AcAlarmReader: public TechmodelAlgorithm {
668      private:      private:
669        /** The ForcedPkt event that is created in the reader. */        /** The AcAlarm event that is created in the reader. */
670        ForcedPktEvent* ForcedPkt;        AcAlarmEvent* acAlarm;
671      public:      public:
672        ForcedPktReader(void);        AcAlarmReader(void);
673        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
674        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
675        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
676      };      };
677    
678    /**********************************************
679    * Event reader algorithm for TrkAlarm events.
680    **********************************************/
681        class TrkAlarmReader: public TechmodelAlgorithm {
682        private:
683          /** The TrkAlarm event that is created in the reader. */
684          TrkAlarmEvent* trkAlarm;
685        public:
686          TrkAlarmReader(void);
687          virtual void Init(PamelaRun *);
688          virtual void RunEvent(int, long int) throw (WrongCRCException);
689          virtual std::string GetVersionInfo(void) const;
690        };
691    
692    /**********************************************
693    * Event reader algorithm for TrgAlarm events.
694    **********************************************/
695        class TrgAlarmReader: public TechmodelAlgorithm {
696        private:
697          /** The TrgAlarm event that is created in the reader. */
698          TrgAlarmEvent* trgAlarm;
699        public:
700          TrgAlarmReader(void);
701          virtual void Init(PamelaRun *);
702          virtual void RunEvent(int, long int) throw (WrongCRCException);
703          virtual std::string GetVersionInfo(void) const;
704        };
705    
706    /**********************************************
707    * Event reader algorithm for TofAlarm events.
708    **********************************************/
709        class TofAlarmReader: public TechmodelAlgorithm {
710        private:
711          /** The TofAlarm event that is created in the reader. */
712          TofAlarmEvent* tofAlarm;
713        public:
714          TofAlarmReader(void);
715          virtual void Init(PamelaRun *);
716          virtual void RunEvent(int, long int) throw (WrongCRCException);
717          virtual std::string GetVersionInfo(void) const;
718        };
719    
720    /**********************************************
721    * Event reader algorithm for S4Alarm events.
722    **********************************************/
723        class S4AlarmReader: public TechmodelAlgorithm {
724        private:
725          /** The S4Alarm event that is created in the reader. */
726          S4AlarmEvent* s4Alarm;
727        public:
728          S4AlarmReader(void);
729          virtual void Init(PamelaRun *);
730          virtual void RunEvent(int, long int) throw (WrongCRCException);
731          virtual std::string GetVersionInfo(void) const;
732        };
733    
734    /**********************************************
735    * Event reader algorithm for TsbT events.
736    **********************************************/
737        class TsbTReader: public TechmodelAlgorithm {
738        private:
739          /** The TsbT event that is created in the reader. */
740          TsbTEvent* TsbT;
741        public:
742          TsbTReader(void);
743          virtual void Init(PamelaRun *);
744          virtual void RunEvent(int, long int) throw (WrongCRCException);
745          virtual std::string GetVersionInfo(void) const;
746        };
747    
748    /**********************************************
749    * Event reader algorithm for TsbB events.
750    **********************************************/
751        class TsbBReader: public TechmodelAlgorithm {
752        private:
753          /** The TsbB event that is created in the reader. */
754          TsbBEvent* TsbB;
755        public:
756          TsbBReader(void);
757          virtual void Init(PamelaRun *);
758          virtual void RunEvent(int, long int) throw (WrongCRCException);
759          virtual std::string GetVersionInfo(void) const;
760        };
761    
762    /**********************************************
763    * Event reader algorithm for PSCU events.
764    **********************************************/
765        class PscuReader: public TechmodelAlgorithm {
766        private:
767          /** The PSCU event that is created in the reader. */
768          PscuEvent* Pscu;
769        public:
770          PscuReader(void);
771          virtual void Init(PamelaRun *);
772          virtual void RunEvent(int, long int) throw (WrongCRCException);
773          virtual std::string GetVersionInfo(void) const;
774        };
775    
776    
777    }    }
778  }  }
779    
780  #endif /* READER_ALGORITHM_H */  #endif /* READER_ALGORITHM_H */
781    
782    
783    
784    

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

  ViewVC Help
Powered by ViewVC 1.1.23