/[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 5.0 by kusanagi, Mon Aug 29 09:46:13 2005 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/07/06 13:31:18 $   * $Date: 2005/05/28 10:44:11 $
4   * $Revision: 1.2 $   * $Revision: 4.4 $
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 "TestTrkEvent.h"
43    #include "TestTofEvent.h"
44    #include "log/LogEvent.h"
45    #include "varDump/VarDumpEvent.h"
46    #include "arrDump/ArrDumpEvent.h"
47    #include "tabDump/TabDumpEvent.h"
48    #include "tsbt/TsbTEvent.h"
49    #include "tsbb/TsbBEvent.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;        virtual std::string GetVersionInfo(void) const;
145      };      };
146    
147      /**  
148       * Event reader algorithm for housekeeping events.  /**********************************************
149       */  * Event reader algorithm for CalibTrk1 events.
150      /*  **********************************************/
151      class HousekeepingReader: public TechmodelAlgorithm {      class CalibTrk1Reader: public TechmodelAlgorithm {
152      private:      private:
153          /** The CalibTrk1 event that is created in the reader. */
154          CalibTrk1Event* calibTrk1;
155      public:      public:
156        HousekeepingReader(void);        CalibTrk1Reader(void);
157        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
158        virtual void RunEvent(int);        virtual void RunEvent(int, long int) throw (Exception);
159        virtual string GetVersionInfo(void) const;        //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;
163      };      };
     */  
164    
165    
166      /**  /**********************************************
167       * Event reader algorithm for TMTC events.  * Event reader algorithm for CalibTrk2 events.
168       */  **********************************************/
169      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;  
170      private:      private:
171        /** The TMTC event that is created in the reader. */        /** The CalibTrk2 event that is created in the reader. */
172        TmtcEvent* Tmtc;        CalibTrk2Event* calibTrk2;
       float convert_th(int);  
173      public:      public:
174      TmtcReader(void);        CalibTrk2Reader(void);
175      virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
176      virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
177      virtual string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
178      };      };
179    
180    
181      /**  /**********************************************
182       * Event reader algorithm for PSCU events.  * Event reader algorithm for CalibTof events.
183       */  **********************************************/
184      class PscuReader: public TechmodelAlgorithm {      class CalibTofReader: public TechmodelAlgorithm {
185      private:      private:
186        /** The PSCU event that is created in the reader. */        /** The CalibTof event that is created in the reader. */
187        PscuEvent* Pscu;        CalibTofEvent* CalibTof;
188      public:      public:
189        PscuReader(void);        CalibTofReader(void);
190          virtual void Init(PamelaRun *);
191          virtual void RunEvent(int, long int) throw (Exception);
192          virtual std::string GetVersionInfo(void) const;
193        };
194    
195    
196    /**********************************************
197    * Event reader algorithm for CalibS4 events.
198    **********************************************/
199        class CalibS4Reader: public TechmodelAlgorithm {
200        private:
201          /** The CalibCal event that is created in the reader. */
202          CalibS4Event* calibS4;
203        public:
204          CalibS4Reader(void);
205          virtual void Init(PamelaRun *);
206          virtual void RunEvent(int, long int) throw (WrongCRCException);
207          virtual std::string GetVersionInfo(void) const;
208        };
209    
210    
211    /**********************************************
212    * Event reader algorithm for CalibCalPed events.
213    **********************************************/
214        class CalibCalPedReader: public TechmodelAlgorithm {
215        private:
216          /** The CalibCalPed event that is created in the reader. */
217          CalibCalPedEvent* calibCalPed;
218        public:
219          CalibCalPedReader(void);
220          virtual void Init(PamelaRun *);
221          virtual void RunEvent(int, long int) throw (Exception);
222          virtual std::string GetVersionInfo(void) const;
223        };
224    
225    
226    /***********************************************
227    * Event reader algorithm for Calib1_Ac1 events.
228    **********************************************/
229        class Calib1_Ac1Reader: public TechmodelAlgorithm {
230        private:
231          /** The CalibAc event that is created in the reader. */
232          Calib1_Ac1Event* calib1_Ac1;
233        public:
234          Calib1_Ac1Reader(void);
235          virtual void Init(PamelaRun *);
236          virtual void RunEvent(int, long int) throw (Exception);
237          virtual std::string GetVersionInfo(void) const;
238        };
239    
240    
241    /***********************************************
242    * Event reader algorithm for Calib1_Ac2 events.
243    **********************************************/
244        class Calib1_Ac2Reader: public TechmodelAlgorithm {
245        private:
246          /** The Calib1_Ac2 event that is created in the reader. */
247          Calib1_Ac2Event* calib1_Ac2;
248        public:
249          Calib1_Ac2Reader(void);
250          virtual void Init(PamelaRun *);
251          virtual void RunEvent(int, long int) throw (Exception);
252          virtual std::string GetVersionInfo(void) const;
253        };
254    
255    /***********************************************
256    * Event reader algorithm for Calib2_Ac1 events.
257    **********************************************/
258        class Calib2_Ac1Reader: public TechmodelAlgorithm {
259        private:
260          /** The Calib2_Ac1 event that is created in the reader. */
261          Calib2_Ac1Event* calib2_Ac1;
262        public:
263          Calib2_Ac1Reader(void);
264          virtual void Init(PamelaRun *);
265          virtual void RunEvent(int, long int) throw (Exception);
266          virtual std::string GetVersionInfo(void) const;
267        };
268    
269    /***********************************************
270    * Event reader algorithm for Calib2_Ac2 events.
271    **********************************************/
272        class Calib2_Ac2Reader: public TechmodelAlgorithm {
273        private:
274          /** The Calib2_Ac2 event that is created in the reader. */
275          Calib2_Ac2Event* calib2_Ac2;
276        public:
277          Calib2_Ac2Reader(void);
278          virtual void Init(PamelaRun *);
279          virtual void RunEvent(int, long int) throw (Exception);
280          virtual std::string GetVersionInfo(void) const;
281        };
282    
283    
284    /**********************************************
285    * Event reader algorithm for RunHeader events.
286    **********************************************/
287        class RunHeaderReader: public TechmodelAlgorithm {
288        private:
289          /** The RunHeader event that is created in the reader. */
290          RunHeaderEvent* RunHeader;
291        public:
292          RunHeaderReader(void);
293          virtual void Init(PamelaRun *);
294          virtual void RunEvent(int, long int) throw (WrongCRCException);
295          virtual std::string GetVersionInfo(void) const;
296        };
297    
298    
299    /**********************************************
300    * Event reader algorithm for RunTrailer events.
301    **********************************************/
302        class RunTrailerReader: public TechmodelAlgorithm {
303        private:
304          /** The RunTrailer event that is created in the reader. */
305          RunTrailerEvent* RunTrailer;
306        public:
307          RunTrailerReader(void);
308          virtual void Init(PamelaRun *);
309          virtual void RunEvent(int, long int) throw (WrongCRCException);
310          virtual std::string GetVersionInfo(void) const;
311        };
312    
313    
314    /**********************************************
315    * Event reader algorithm for CalibHeader events.
316    **********************************************/
317        class CalibHeaderReader: public TechmodelAlgorithm {
318        private:
319          /** The CalibHeader event that is created in the reader. */
320          CalibHeaderEvent* calibHeader;
321        public:
322          CalibHeaderReader(void);
323          virtual void Init(PamelaRun *);
324          virtual void RunEvent(int, long int) throw (WrongCRCException);
325          virtual std::string GetVersionInfo(void) const;
326        };
327    
328    
329    /**********************************************
330    * Event reader algorithm for CalibTrailer events.
331    **********************************************/
332        class CalibTrailerReader: public TechmodelAlgorithm {
333        private:
334          /** The CalibTrailer event that is created in the reader. */
335          CalibTrailerEvent* calibTrailer;
336        public:
337          CalibTrailerReader(void);
338          virtual void Init(PamelaRun *);
339          virtual void RunEvent(int, long int) throw (WrongCRCException);
340          virtual std::string GetVersionInfo(void) const;
341        };
342    
343    
344    /**********************************************
345    * Event reader algorithm for InitHeader events.
346    **********************************************/
347        class InitHeaderReader: public TechmodelAlgorithm {
348        private:
349          /** The InitHeader event that is created in the reader. */
350          InitHeaderEvent* initHeader;
351        public:
352          InitHeaderReader(void);
353          virtual void Init(PamelaRun *);
354          virtual void RunEvent(int, long int) throw (WrongCRCException);
355          virtual std::string GetVersionInfo(void) const;
356        };
357    
358    
359    /**********************************************
360    * Event reader algorithm for InitTrailer events.
361    **********************************************/
362        class InitTrailerReader: public TechmodelAlgorithm {
363        private:
364          /** The InitTrailer event that is created in the reader. */
365          InitTrailerEvent* initTrailer;
366        public:
367          InitTrailerReader(void);
368        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
369        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
370        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
371      };      };
372    
373      /**  
374       * Event reader algorithm for VarDump events.  /**********************************************
375       */  * Event reader algorithm for EventTrk events.
376    **********************************************/
377        class EventTrkReader: public TechmodelAlgorithm {
378        private:
379          /** The EventTrk event that is created in the reader. */
380          EventTrkEvent* eventTrk;
381        public:
382          EventTrkReader(void);
383          virtual void Init(PamelaRun *);
384          virtual void RunEvent(int, long int) throw (Exception);
385          virtual std::string GetVersionInfo(void) const;
386        };
387    
388    
389    /**********************************************
390    * Event reader algorithm for TestTrk events.
391    **********************************************/
392        class TestTrkReader: public TechmodelAlgorithm {
393        private:
394          /** The TestTrk event that is created in the reader. */
395          TestTrkEvent* testTrk;
396        public:
397          TestTrkReader(void);
398          virtual void Init(PamelaRun *);
399          virtual void RunEvent(int, long int) throw (Exception);
400          virtual std::string GetVersionInfo(void) const;
401        };
402    
403    /**********************************************
404    * Event reader algorithm for TestTof events.
405    **********************************************/
406        class TestTofReader: public TechmodelAlgorithm {
407        private:
408          /** The TestTof event that is created in the reader. */
409          TestTofEvent* testTof;
410        public:
411          TestTofReader(void);
412          virtual void Init(PamelaRun *);
413          virtual void RunEvent(int, long int) throw (Exception);
414          virtual std::string GetVersionInfo(void) const;
415        };
416    
417    /**********************************************
418    * Event reader algorithm for Log events.
419    **********************************************/
420        class LogReader: public TechmodelAlgorithm {
421        private:
422          /** The Log event that is created in the reader. */
423          LogEvent* Log;
424        public:
425          LogReader(void);
426          virtual void Init(PamelaRun *);
427          virtual void RunEvent(int, long int) throw (WrongCRCException);
428          virtual std::string GetVersionInfo(void) const;
429        };
430    
431    
432    /***********************************************
433    * Event reader algorithm for VarDump events.
434    **********************************************/
435      class VarDumpReader: public TechmodelAlgorithm {      class VarDumpReader: public TechmodelAlgorithm {
436      private:      private:
437        /** The VarDump event that is created in the reader. */        /** The VarDump event that is created in the reader. */
# Line 119  namespace pamela { Line 439  namespace pamela {
439      public:      public:
440        VarDumpReader(void);        VarDumpReader(void);
441        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
442        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
443        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
444      };      };
445    
446      /**  
447       * Event reader algorithm for ArrDump events.  /**********************************************
448       */  * Event reader algorithm for ArrDump events.
449    **********************************************/
450      class ArrDumpReader: public TechmodelAlgorithm {      class ArrDumpReader: public TechmodelAlgorithm {
451      private:      private:
452        /** The ArrDump event that is created in the reader. */        /** The ArrDump event that is created in the reader. */
# Line 133  namespace pamela { Line 454  namespace pamela {
454      public:      public:
455        ArrDumpReader(void);        ArrDumpReader(void);
456        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
457        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
458        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
459      };      };
460    
461      /**  
462       * Event reader algorithm for TabDump events.  /**********************************************
463       */  * Event reader algorithm for TabDump events.
464    **********************************************/
465      class TabDumpReader: public TechmodelAlgorithm {      class TabDumpReader: public TechmodelAlgorithm {
466      private:      private:
467        /** The TabDump event that is created in the reader. */        /** The TabDump event that is created in the reader. */
# Line 147  namespace pamela { Line 469  namespace pamela {
469      public:      public:
470        TabDumpReader(void);        TabDumpReader(void);
471        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
472        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
473        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
474      };      };
475    
476      /**  
477       * Event reader algorithm for Mcmd events.  /**********************************************
478       */  * Event reader algorithm for TMTC events.
479    **********************************************/
480        class TmtcReader: public TechmodelAlgorithm {
481        //Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC)
482        static const int TMTC_SUB_LENGTH = 44;
483        //Length in bytes of the subPacketCRC
484        static const int TMTC_SUBCRC_LENGTH = 1;
485        //Length in bytes of the PacketCRC
486        static const int TMTC_CRC_LENGTH = 2;
487        private:
488          /** The TMTC event that is created in the reader. */
489          TmtcEvent* Tmtc;
490          //float convert_th(int);
491        public:
492        TmtcReader(void);
493        virtual void Init(PamelaRun *);
494        virtual void RunEvent(int, long int) throw (WrongCRCException);
495        virtual string GetVersionInfo(void) const;
496        };
497    
498    
499    /**********************************************
500    * Event reader algorithm for Mcmd events.
501    **********************************************/
502      class McmdReader: public TechmodelAlgorithm {      class McmdReader: public TechmodelAlgorithm {
503      private:      private:
504        /** The Mcmd event that is created in the reader. */        /** The Mcmd event that is created in the reader. */
# Line 161  namespace pamela { Line 506  namespace pamela {
506      public:      public:
507        McmdReader(void);        McmdReader(void);
508        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
509        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
510        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
511      };      };
512    
513  /**  
514       * Event reader algorithm for Log events.  /**********************************************
515       */  * Event reader algorithm for ForcedFECmd events.
516      class LogReader: public TechmodelAlgorithm {  **********************************************/
517        class ForcedFECmdReader: public TechmodelAlgorithm {
518      private:      private:
519        /** The Log event that is created in the reader. */        /** The ForcedFECmd event that is created in the reader. */
520        LogEvent* Log;        ForcedFECmdEvent* forcedFECmd;
521      public:      public:
522        LogReader(void);        ForcedFECmdReader(void);
523        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
524        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
525        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
526      };      };
527    
528  /**  
529       * Event reader algorithm for CalibCal events.  /**********************************************
530       */  * Event reader algorithm for Ac1Init events.
531      class CalibCalReader: public TechmodelAlgorithm {  **********************************************/
532        class Ac1InitReader: public TechmodelAlgorithm {
533      private:      private:
534        /** The CalibCal event that is created in the reader. */        /** The Ac1Init event that is created in the reader. */
535        CalibCalEvent* CalibCal;        Ac1InitEvent* ac1Init;
536      public:      public:
537        CalibCalReader(void);        Ac1InitReader(void);
538        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
539        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
540        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
541      };      };
542    
543  /**  
544       * Event reader algorithm for CalibCalPed events.  /**********************************************
545       */  * Event reader algorithm for CalInit events.
546      class CalibCalPedReader: public TechmodelAlgorithm {  **********************************************/
547        class CalInitReader: public TechmodelAlgorithm {
548      private:      private:
549        /** The CalibCalPed event that is created in the reader. */        /** The CalInit event that is created in the reader. */
550        CalibCalPedEvent* CalibCalPed;        CalInitEvent* calInit;
551      public:      public:
552        CalibCalPedReader(void);        CalInitReader(void);
553        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
554        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
555        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
556      };      };
557    
558    
559  /**  /**********************************************
560       * Event reader algorithm for CalibTrk1 events.  * Event reader algorithm for TrkInit events.
561       */  **********************************************/
562      class CalibTrk1Reader: public TechmodelAlgorithm {      class TrkInitReader: public TechmodelAlgorithm {
563      private:      private:
564        /** The CalibTrk1 event that is created in the reader. */        /** The TrkInit event that is created in the reader. */
565        CalibTrk1Event* calibTrk1;        TrkInitEvent* trkInit;
566      public:      public:
567        CalibTrk1Reader(void);        TrkInitReader(void);
568        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
569        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[]);  
570        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
571      };      };
572    
573  /**  
574       * Event reader algorithm for CalibTrk2 events.  /**********************************************
575       */  * Event reader algorithm for TofInit events.
576      class CalibTrk2Reader: public TechmodelAlgorithm {  **********************************************/
577        class TofInitReader: public TechmodelAlgorithm {
578      private:      private:
579        /** The CalibTrk2 event that is created in the reader. */        /** The TofInit event that is created in the reader. */
580        CalibTrk2Event* calibTrk2;        TofInitEvent* tofInit;
581      public:      public:
582        CalibTrk2Reader(void);        TofInitReader(void);
583        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
584        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
585        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
586      };      };
587    
588  /**  
589       * Event reader algorithm for CalibTrd events.  /**********************************************
590       */  * Event reader algorithm for TrgInit events.
591      class CalibTrdReader: public TechmodelAlgorithm {  **********************************************/
592        class TrgInitReader: public TechmodelAlgorithm {
593      private:      private:
594        /** The CalibTrd event that is created in the reader. */        /** The TrgInit event that is created in the reader. */
595        CalibTrdEvent* CalibTrd;        TrgInitEvent* trgInit;
596      public:      public:
597        CalibTrdReader(void);        TrgInitReader(void);
598        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
599        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
600        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
601      };      };
602    
603  /**  /**********************************************
604       * Event reader algorithm for CalibTof events.  * Event reader algorithm for NdInit events.
605       */  **********************************************/
606      class CalibTofReader: public TechmodelAlgorithm {      class NdInitReader: public TechmodelAlgorithm {
607      private:      private:
608        /** The CalibTof event that is created in the reader. */        /** The NdInit event that is created in the reader. */
609        CalibTofEvent* CalibTof;        NdInitEvent* ndInit;
610      public:      public:
611        CalibTofReader(void);        NdInitReader(void);
612        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
613        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
614        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
615      };      };
616    
617  /**  /**********************************************
618       * Event reader algorithm for CalibS4 events.  * Event reader algorithm for S4Init events.
619       */  **********************************************/
620      class CalibS4Reader: public TechmodelAlgorithm {      class S4InitReader: public TechmodelAlgorithm {
621      private:      private:
622        /** The CalibCal event that is created in the reader. */        /** The S4Init event that is created in the reader. */
623        CalibS4Event* CalibS4;        S4InitEvent* s4Init;
624      public:      public:
625        CalibS4Reader(void);        S4InitReader(void);
626        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
627        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
628        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
629      };      };
630    
631    
632  /**  /**********************************************
633       * Event reader algorithm for RunTrailer events.  * Event reader algorithm for Ac2Init events.
634       */  **********************************************/
635      class RunTrailerReader: public TechmodelAlgorithm {      class Ac2InitReader: public TechmodelAlgorithm {
636      private:      private:
637        /** The RunTrailer event that is created in the reader. */        /** The Ac2Init event that is created in the reader. */
638        RunTrailerEvent* RunTrailer;        Ac2InitEvent* ac2Init;
639      public:      public:
640        RunTrailerReader(void);        Ac2InitReader(void);
641        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
642        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
643        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
644      };      };
645    
646  /**  
647       * Event reader algorithm for RunHeader events.  /**********************************************
648       */  * Event reader algorithm for CalAlarm events.
649      class RunHeaderReader: public TechmodelAlgorithm {  **********************************************/
650        class CalAlarmReader: public TechmodelAlgorithm {
651      private:      private:
652        /** The RunHeader event that is created in the reader. */        /** The CalAlarm event that is created in the reader. */
653        RunHeaderEvent* RunHeader;        CalAlarmEvent* calAlarm;
654      public:      public:
655        RunHeaderReader(void);        CalAlarmReader(void);
656        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
657        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
658        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
659      };      };
660    
661  /**  /**********************************************
662       * Event reader algorithm for ForcedPkt events.  * Event reader algorithm for AcAlarm events.
663       */  **********************************************/
664      class ForcedPktReader: public TechmodelAlgorithm {      class AcAlarmReader: public TechmodelAlgorithm {
665      private:      private:
666        /** The ForcedPkt event that is created in the reader. */        /** The AcAlarm event that is created in the reader. */
667        ForcedPktEvent* ForcedPkt;        AcAlarmEvent* acAlarm;
668      public:      public:
669        ForcedPktReader(void);        AcAlarmReader(void);
670        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
671        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
672        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
673      };      };
674    
675    /**********************************************
676    * Event reader algorithm for TrkAlarm events.
677    **********************************************/
678        class TrkAlarmReader: public TechmodelAlgorithm {
679        private:
680          /** The TrkAlarm event that is created in the reader. */
681          TrkAlarmEvent* trkAlarm;
682        public:
683          TrkAlarmReader(void);
684          virtual void Init(PamelaRun *);
685          virtual void RunEvent(int, long int) throw (WrongCRCException);
686          virtual std::string GetVersionInfo(void) const;
687        };
688    
689    /**********************************************
690    * Event reader algorithm for TrgAlarm events.
691    **********************************************/
692        class TrgAlarmReader: public TechmodelAlgorithm {
693        private:
694          /** The TrgAlarm event that is created in the reader. */
695          TrgAlarmEvent* trgAlarm;
696        public:
697          TrgAlarmReader(void);
698          virtual void Init(PamelaRun *);
699          virtual void RunEvent(int, long int) throw (WrongCRCException);
700          virtual std::string GetVersionInfo(void) const;
701        };
702    
703    /**********************************************
704    * Event reader algorithm for TofAlarm events.
705    **********************************************/
706        class TofAlarmReader: public TechmodelAlgorithm {
707        private:
708          /** The TofAlarm event that is created in the reader. */
709          TofAlarmEvent* tofAlarm;
710        public:
711          TofAlarmReader(void);
712          virtual void Init(PamelaRun *);
713          virtual void RunEvent(int, long int) throw (WrongCRCException);
714          virtual std::string GetVersionInfo(void) const;
715        };
716    
717    /**********************************************
718    * Event reader algorithm for S4Alarm events.
719    **********************************************/
720        class S4AlarmReader: public TechmodelAlgorithm {
721        private:
722          /** The S4Alarm event that is created in the reader. */
723          S4AlarmEvent* s4Alarm;
724        public:
725          S4AlarmReader(void);
726          virtual void Init(PamelaRun *);
727          virtual void RunEvent(int, long int) throw (WrongCRCException);
728          virtual std::string GetVersionInfo(void) const;
729        };
730    
731    /**********************************************
732    * Event reader algorithm for TsbT events.
733    **********************************************/
734        class TsbTReader: public TechmodelAlgorithm {
735        private:
736          /** The TsbT event that is created in the reader. */
737          TsbTEvent* TsbT;
738        public:
739          TsbTReader(void);
740          virtual void Init(PamelaRun *);
741          virtual void RunEvent(int, long int) throw (WrongCRCException);
742          virtual std::string GetVersionInfo(void) const;
743        };
744    
745    /**********************************************
746    * Event reader algorithm for TsbB events.
747    **********************************************/
748        class TsbBReader: public TechmodelAlgorithm {
749        private:
750          /** The TsbB event that is created in the reader. */
751          TsbBEvent* TsbB;
752        public:
753          TsbBReader(void);
754          virtual void Init(PamelaRun *);
755          virtual void RunEvent(int, long int) throw (WrongCRCException);
756          virtual std::string GetVersionInfo(void) const;
757        };
758    
759    /**********************************************
760    * Event reader algorithm for PSCU events.
761    **********************************************/
762        class PscuReader: public TechmodelAlgorithm {
763        private:
764          /** The PSCU event that is created in the reader. */
765          PscuEvent* Pscu;
766        public:
767          PscuReader(void);
768          virtual void Init(PamelaRun *);
769          virtual void RunEvent(int, long int) throw (WrongCRCException);
770          virtual std::string GetVersionInfo(void) const;
771        };
772    
773    
774    }    }
775  }  }
776    
777  #endif /* READER_ALGORITHM_H */  #endif /* READER_ALGORITHM_H */
778    
779    
780    
781    

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

  ViewVC Help
Powered by ViewVC 1.1.23