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

Diff of /yoda/techmodel/ReaderAlgorithms.h

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

revision 2.0 by kusanagi, Tue Sep 21 20:50:54 2004 UTC revision 2.3 by kusanagi, Thu Dec 9 08:48:41 2004 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2004/09/21 20:24:33 $   * $Date: 2004/12/03 22:08:01 $
4   * $Revision: 1.8 $   * $Revision: 2.2 $
5   *   *
6   * Header file for the algorithms used to read the techmodel data file.   * Header file for the algorithms used to read the techmodel data file.
7   */   */
# Line 20  Line 20 
20  #include "physics/AnticounterReader.h"  #include "physics/AnticounterReader.h"
21  #include "physics/CalorimeterReader.h"  #include "physics/CalorimeterReader.h"
22  #include "physics/NeutronDetectorReader.h"  #include "physics/NeutronDetectorReader.h"
23    #include "physics/S4Reader.h"
24  #include "CalibTrkBothEvent.h"  #include "CalibTrkBothEvent.h"
25  #include "CalibTrk1Event.h"  #include "CalibTrk1Event.h"
26  #include "CalibTrk2Event.h"  #include "CalibTrk2Event.h"
# Line 49  Line 50 
50  #include "TrkInitEvent.h"  #include "TrkInitEvent.h"
51  #include "TofInitEvent.h"  #include "TofInitEvent.h"
52  #include "TrgInitEvent.h"  #include "TrgInitEvent.h"
53    #include "NdInitEvent.h"
54    #include "S4InitEvent.h"
55  #include "CalAlarmEvent.h"  #include "CalAlarmEvent.h"
56  #include "AcAlarmEvent.h"  #include "AcAlarmEvent.h"
57  #include "TrkAlarmEvent.h"  #include "TrkAlarmEvent.h"
58  #include "TrgAlarmEvent.h"  #include "TrgAlarmEvent.h"
59  #include "TofAlarmEvent.h"  #include "TofAlarmEvent.h"
60    #include "S4AlarmEvent.h"
   
   
 #define UINT32 unsigned int  
 #define UINT16 unsigned short  
 #define BYTE   unsigned char  
61    
62  using namespace std;  using namespace std;
63    
# Line 76  namespace pamela { Line 74  namespace pamela {
74      public:      public:
75        PhysEndRunReader(void);        PhysEndRunReader(void);
76        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
77        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
78        //this type of RUNEvent should be the future develop.        //this type of RUNEvent should be the future develop.
79        //Pass the buffer not the pointer to file        //Pass the buffer not the pointer to file
80        //virtual void RunEvent(int, long int, char[]);        //virtual void RunEvent(int, long int, char[]);
# Line 94  namespace pamela { Line 92  namespace pamela {
92      public:      public:
93        CalibCalPulse1Reader(void);        CalibCalPulse1Reader(void);
94        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
95        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
96        //this type of RUNEvent should be the future develop.        //this type of RUNEvent should be the future develop.
97        //Pass the buffer not the pointer to file        //Pass the buffer not the pointer to file
98        //virtual void RunEvent(int, long int, char[]);        //virtual void RunEvent(int, long int, char[]);
# Line 112  namespace pamela { Line 110  namespace pamela {
110      public:      public:
111        CalibCalPulse2Reader(void);        CalibCalPulse2Reader(void);
112        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
113        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
114        //this type of RUNEvent should be the future develop.        //this type of RUNEvent should be the future develop.
115        //Pass the buffer not the pointer to file        //Pass the buffer not the pointer to file
116        //virtual void RunEvent(int, long int, char[]);        //virtual void RunEvent(int, long int, char[]);
# Line 130  namespace pamela { Line 128  namespace pamela {
128        anticounter::AnticounterReader*   anticounterReader;        anticounter::AnticounterReader*   anticounterReader;
129        calorimeter::CalorimeterReader*   calorimeterReader;        calorimeter::CalorimeterReader*   calorimeterReader;
130        neutron::NeutronDetectorReader*   neutronReader;        neutron::NeutronDetectorReader*   neutronReader;
131          S4::S4Reader*                     s4Reader;
132      public:      public:
133        PhysicsReader(void);        PhysicsReader(void);
134        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
135        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
136        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
137      };      };
138    
# Line 148  namespace pamela { Line 147  namespace pamela {
147      public:      public:
148        CalibTrkBothReader(void);        CalibTrkBothReader(void);
149        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
150        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
151        //this type of RUNEvent should be the future develop.        //this type of RUNEvent should be the future develop.
152        //Pass the buffer not the pointer to file        //Pass the buffer not the pointer to file
153        //virtual void RunEvent(int, long int, char[]);        //virtual void RunEvent(int, long int, char[]);
# Line 166  namespace pamela { Line 165  namespace pamela {
165      public:      public:
166        CalibTrk1Reader(void);        CalibTrk1Reader(void);
167        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
168        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
169        //this type of RUNEvent should be the future develop.        //this type of RUNEvent should be the future develop.
170        //Pass the buffer not the pointer to file        //Pass the buffer not the pointer to file
171        //virtual void RunEvent(int, long int, char[]);        //virtual void RunEvent(int, long int, char[]);
# Line 184  namespace pamela { Line 183  namespace pamela {
183      public:      public:
184        CalibTrk2Reader(void);        CalibTrk2Reader(void);
185        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
186        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
187        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
188      };      };
189    
# Line 199  namespace pamela { Line 198  namespace pamela {
198      public:      public:
199        CalibTrdReader(void);        CalibTrdReader(void);
200        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
201        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
202        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
203      };      };
204    
# Line 214  namespace pamela { Line 213  namespace pamela {
213      public:      public:
214        CalibTofReader(void);        CalibTofReader(void);
215        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
216        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
217        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
218      };      };
219    
# Line 229  namespace pamela { Line 228  namespace pamela {
228      public:      public:
229        CalibS4Reader(void);        CalibS4Reader(void);
230        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
231        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
232        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
233      };      };
234    
# Line 244  namespace pamela { Line 243  namespace pamela {
243      public:      public:
244        CalibCalPedReader(void);        CalibCalPedReader(void);
245        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
246        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
247        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
248      };      };
249    
# Line 259  namespace pamela { Line 258  namespace pamela {
258      public:      public:
259        CalibAcReader(void);        CalibAcReader(void);
260        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
261        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
262        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
263      };      };
264    
# Line 274  namespace pamela { Line 273  namespace pamela {
273      public:      public:
274        RunHeaderReader(void);        RunHeaderReader(void);
275        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
276        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
277        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
278      };      };
279    
# Line 289  namespace pamela { Line 288  namespace pamela {
288      public:      public:
289        RunTrailerReader(void);        RunTrailerReader(void);
290        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
291        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
292        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
293      };      };
294    
# Line 304  namespace pamela { Line 303  namespace pamela {
303      public:      public:
304        CalibHeaderReader(void);        CalibHeaderReader(void);
305        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
306        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
307        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
308      };      };
309    
# Line 319  namespace pamela { Line 318  namespace pamela {
318      public:      public:
319        CalibTrailerReader(void);        CalibTrailerReader(void);
320        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
321        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
322        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
323      };      };
324    
# Line 334  namespace pamela { Line 333  namespace pamela {
333      public:      public:
334        InitHeaderReader(void);        InitHeaderReader(void);
335        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
336        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
337        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
338      };      };
339    
# Line 349  namespace pamela { Line 348  namespace pamela {
348      public:      public:
349        InitTrailerReader(void);        InitTrailerReader(void);
350        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
351        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
352        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
353      };      };
354    
# Line 364  namespace pamela { Line 363  namespace pamela {
363      public:      public:
364        EventTrkReader(void);        EventTrkReader(void);
365        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
366        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
367        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
368      };      };
369    
# Line 379  namespace pamela { Line 378  namespace pamela {
378      public:      public:
379        TestTrkReader(void);        TestTrkReader(void);
380        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
381        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
382        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
383      };      };
384    
# Line 393  namespace pamela { Line 392  namespace pamela {
392      public:      public:
393        TestTofReader(void);        TestTofReader(void);
394        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
395        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (Exception);
396        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
397      };      };
398    
# Line 407  namespace pamela { Line 406  namespace pamela {
406      public:      public:
407        LogReader(void);        LogReader(void);
408        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
409        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
410        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
411      };      };
412    
# Line 422  namespace pamela { Line 421  namespace pamela {
421      public:      public:
422        VarDumpReader(void);        VarDumpReader(void);
423        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
424        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
425        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
426      };      };
427    
# Line 437  namespace pamela { Line 436  namespace pamela {
436      public:      public:
437        ArrDumpReader(void);        ArrDumpReader(void);
438        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
439        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
440        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
441      };      };
442    
# Line 452  namespace pamela { Line 451  namespace pamela {
451      public:      public:
452        TabDumpReader(void);        TabDumpReader(void);
453        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
454        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
455        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
456      };      };
457    
# Line 474  namespace pamela { Line 473  namespace pamela {
473      public:      public:
474      TmtcReader(void);      TmtcReader(void);
475      virtual void Init(PamelaRun *);      virtual void Init(PamelaRun *);
476      virtual void RunEvent(int, long int);      virtual void RunEvent(int, long int) throw (WrongCRCException);
477      virtual string GetVersionInfo(void) const;      virtual string GetVersionInfo(void) const;
478      };      };
479    
# Line 489  namespace pamela { Line 488  namespace pamela {
488      public:      public:
489        McmdReader(void);        McmdReader(void);
490        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
491        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
492        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
493      };      };
494    
# Line 504  namespace pamela { Line 503  namespace pamela {
503      public:      public:
504        ForcedFECmdReader(void);        ForcedFECmdReader(void);
505        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
506        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
507        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
508      };      };
509    
# Line 519  namespace pamela { Line 518  namespace pamela {
518      public:      public:
519        AcInitReader(void);        AcInitReader(void);
520        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
521        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
522        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
523      };      };
524    
# Line 534  namespace pamela { Line 533  namespace pamela {
533      public:      public:
534        CalInitReader(void);        CalInitReader(void);
535        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
536        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
537        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
538      };      };
539    
# Line 549  namespace pamela { Line 548  namespace pamela {
548      public:      public:
549        TrkInitReader(void);        TrkInitReader(void);
550        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
551        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
552        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
553      };      };
554    
# Line 564  namespace pamela { Line 563  namespace pamela {
563      public:      public:
564        TofInitReader(void);        TofInitReader(void);
565        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
566        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
567        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
568      };      };
569    
# Line 579  namespace pamela { Line 578  namespace pamela {
578      public:      public:
579        TrgInitReader(void);        TrgInitReader(void);
580        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
581        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
582        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
583      };      };
584    
585  /**********************************************  /**********************************************
586    * Event reader algorithm for NdInit events.
587    **********************************************/
588        class NdInitReader: public TechmodelAlgorithm {
589        private:
590          /** The NdInit event that is created in the reader. */
591          NdInitEvent* ndInit;
592        public:
593          NdInitReader(void);
594          virtual void Init(PamelaRun *);
595          virtual void RunEvent(int, long int) throw (WrongCRCException);
596          virtual std::string GetVersionInfo(void) const;
597        };
598    
599    /**********************************************
600    * Event reader algorithm for S4Init events.
601    **********************************************/
602        class S4InitReader: public TechmodelAlgorithm {
603        private:
604          /** The S4Init event that is created in the reader. */
605          S4InitEvent* s4Init;
606        public:
607          S4InitReader(void);
608          virtual void Init(PamelaRun *);
609          virtual void RunEvent(int, long int) throw (WrongCRCException);
610          virtual std::string GetVersionInfo(void) const;
611        };
612    
613    
614    /**********************************************
615  * Event reader algorithm for CalAlarm events.  * Event reader algorithm for CalAlarm events.
616  **********************************************/  **********************************************/
617      class CalAlarmReader: public TechmodelAlgorithm {      class CalAlarmReader: public TechmodelAlgorithm {
# Line 593  namespace pamela { Line 621  namespace pamela {
621      public:      public:
622        CalAlarmReader(void);        CalAlarmReader(void);
623        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
624        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
625        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
626      };      };
627    
# Line 607  namespace pamela { Line 635  namespace pamela {
635      public:      public:
636        AcAlarmReader(void);        AcAlarmReader(void);
637        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
638        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
639        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
640      };      };
641    
# Line 621  namespace pamela { Line 649  namespace pamela {
649      public:      public:
650        TrkAlarmReader(void);        TrkAlarmReader(void);
651        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
652        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
653        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
654      };      };
655    
# Line 635  namespace pamela { Line 663  namespace pamela {
663      public:      public:
664        TrgAlarmReader(void);        TrgAlarmReader(void);
665        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
666        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
667        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
668      };      };
669    
# Line 649  namespace pamela { Line 677  namespace pamela {
677      public:      public:
678        TofAlarmReader(void);        TofAlarmReader(void);
679        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
680        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
681          virtual std::string GetVersionInfo(void) const;
682        };
683    
684    /**********************************************
685    * Event reader algorithm for S4Alarm events.
686    **********************************************/
687        class S4AlarmReader: public TechmodelAlgorithm {
688        private:
689          /** The S4Alarm event that is created in the reader. */
690          S4AlarmEvent* s4Alarm;
691        public:
692          S4AlarmReader(void);
693          virtual void Init(PamelaRun *);
694          virtual void RunEvent(int, long int) throw (WrongCRCException);
695        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
696      };      };
697    
# Line 663  namespace pamela { Line 705  namespace pamela {
705      public:      public:
706        PscuReader(void);        PscuReader(void);
707        virtual void Init(PamelaRun *);        virtual void Init(PamelaRun *);
708        virtual void RunEvent(int, long int);        virtual void RunEvent(int, long int) throw (WrongCRCException);
709        virtual std::string GetVersionInfo(void) const;        virtual std::string GetVersionInfo(void) const;
710      };      };
711    
# Line 674  namespace pamela { Line 716  namespace pamela {
716  #endif /* READER_ALGORITHM_H */  #endif /* READER_ALGORITHM_H */
717    
718    
719    

Legend:
Removed from v.2.0  
changed lines
  Added in v.2.3

  ViewVC Help
Powered by ViewVC 1.1.23