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

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

  ViewVC Help
Powered by ViewVC 1.1.23