1 |
/** @file |
/** @file |
2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
3 |
* $Date: 2004/12/03 22:08:01 $ |
* $Date: 2005/01/29 00:26:55 $ |
4 |
* $Revision: 2.2 $ |
* $Revision: 2.7 $ |
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 |
*/ |
*/ |
13 |
#include "PscuEvent.h" |
#include "PscuEvent.h" |
14 |
|
|
15 |
|
|
16 |
#include "PhysEndRunEvent.h" |
#include "endrun/PhysEndRunEvent.h" |
17 |
#include "CalibCalPulse1Event.h" |
#include "CalibCalPulse1Event.h" |
18 |
#include "CalibCalPulse2Event.h" |
#include "CalibCalPulse2Event.h" |
19 |
#include "physics/TrackerReader.h" |
#include "physics/TrackerReader.h" |
21 |
#include "physics/CalorimeterReader.h" |
#include "physics/CalorimeterReader.h" |
22 |
#include "physics/NeutronDetectorReader.h" |
#include "physics/NeutronDetectorReader.h" |
23 |
#include "physics/S4Reader.h" |
#include "physics/S4Reader.h" |
24 |
|
#include "physics/TofReader.h" |
25 |
|
#include "physics/TriggerReader.h" |
26 |
#include "CalibTrkBothEvent.h" |
#include "CalibTrkBothEvent.h" |
27 |
#include "CalibTrk1Event.h" |
#include "CalibTrk1Event.h" |
28 |
#include "CalibTrk2Event.h" |
#include "CalibTrk2Event.h" |
30 |
#include "CalibTofEvent.h" |
#include "CalibTofEvent.h" |
31 |
#include "CalibS4Event.h" |
#include "CalibS4Event.h" |
32 |
#include "CalibCalPedEvent.h" |
#include "CalibCalPedEvent.h" |
33 |
#include "CalibAcEvent.h" |
#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 "CalibHeaderEvent.h" |
#include "CalibHeaderEvent.h" |
50 |
#include "tmtc/TmtcEvent.h" |
#include "tmtc/TmtcEvent.h" |
51 |
#include "mcmd/McmdEvent.h" |
#include "mcmd/McmdEvent.h" |
52 |
#include "ForcedFECmdEvent.h" |
#include "ForcedFECmdEvent.h" |
53 |
#include "AcInitEvent.h" |
#include "Ac1InitEvent.h" |
54 |
#include "CalInitEvent.h" |
#include "CalInitEvent.h" |
55 |
#include "TrkInitEvent.h" |
#include "TrkInitEvent.h" |
56 |
#include "TofInitEvent.h" |
#include "TofInitEvent.h" |
57 |
#include "TrgInitEvent.h" |
#include "TrgInitEvent.h" |
58 |
#include "NdInitEvent.h" |
#include "NdInitEvent.h" |
59 |
#include "S4InitEvent.h" |
#include "S4InitEvent.h" |
60 |
|
#include "Ac2InitEvent.h" |
61 |
#include "CalAlarmEvent.h" |
#include "CalAlarmEvent.h" |
62 |
#include "AcAlarmEvent.h" |
#include "AcAlarmEvent.h" |
63 |
#include "TrkAlarmEvent.h" |
#include "TrkAlarmEvent.h" |
64 |
#include "TrgAlarmEvent.h" |
#include "TrgAlarmEvent.h" |
65 |
#include "TofAlarmEvent.h" |
#include "TofAlarmEvent.h" |
66 |
#include "S4AlarmEvent.h" |
#include "S4AlarmEvent.h" |
67 |
|
#include "tsbt/TsbTEvent.h" |
68 |
|
#include "tsbb/TsbBEvent.h" |
69 |
|
|
70 |
using namespace std; |
using namespace std; |
71 |
|
|
137 |
calorimeter::CalorimeterReader* calorimeterReader; |
calorimeter::CalorimeterReader* calorimeterReader; |
138 |
neutron::NeutronDetectorReader* neutronReader; |
neutron::NeutronDetectorReader* neutronReader; |
139 |
S4::S4Reader* s4Reader; |
S4::S4Reader* s4Reader; |
140 |
|
tof::TofReader* tofReader; |
141 |
|
trigger::TriggerReader* triggerReader; |
142 |
public: |
public: |
143 |
PhysicsReader(void); |
PhysicsReader(void); |
144 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
234 |
class CalibS4Reader: public TechmodelAlgorithm { |
class CalibS4Reader: public TechmodelAlgorithm { |
235 |
private: |
private: |
236 |
/** The CalibCal event that is created in the reader. */ |
/** The CalibCal event that is created in the reader. */ |
237 |
CalibS4Event* CalibS4; |
CalibS4Event* calibS4; |
238 |
public: |
public: |
239 |
CalibS4Reader(void); |
CalibS4Reader(void); |
240 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
259 |
|
|
260 |
|
|
261 |
/*********************************************** |
/*********************************************** |
262 |
* Event reader algorithm for CalibAc events. |
* Event reader algorithm for Calib1_Ac1 events. |
263 |
**********************************************/ |
**********************************************/ |
264 |
class CalibAcReader: public TechmodelAlgorithm { |
class Calib1_Ac1Reader: public TechmodelAlgorithm { |
265 |
private: |
private: |
266 |
/** The CalibAc event that is created in the reader. */ |
/** The CalibAc event that is created in the reader. */ |
267 |
CalibAcEvent* CalibAc; |
Calib1_Ac1Event* calib1_Ac1; |
268 |
public: |
public: |
269 |
CalibAcReader(void); |
Calib1_Ac1Reader(void); |
270 |
|
virtual void Init(PamelaRun *); |
271 |
|
virtual void RunEvent(int, long int) throw (Exception); |
272 |
|
virtual std::string GetVersionInfo(void) const; |
273 |
|
}; |
274 |
|
|
275 |
|
|
276 |
|
/*********************************************** |
277 |
|
* Event reader algorithm for Calib1_Ac2 events. |
278 |
|
**********************************************/ |
279 |
|
class Calib1_Ac2Reader: public TechmodelAlgorithm { |
280 |
|
private: |
281 |
|
/** The Calib1_Ac2 event that is created in the reader. */ |
282 |
|
Calib1_Ac2Event* calib1_Ac2; |
283 |
|
public: |
284 |
|
Calib1_Ac2Reader(void); |
285 |
|
virtual void Init(PamelaRun *); |
286 |
|
virtual void RunEvent(int, long int) throw (Exception); |
287 |
|
virtual std::string GetVersionInfo(void) const; |
288 |
|
}; |
289 |
|
|
290 |
|
/*********************************************** |
291 |
|
* Event reader algorithm for Calib2_Ac1 events. |
292 |
|
**********************************************/ |
293 |
|
class Calib2_Ac1Reader: public TechmodelAlgorithm { |
294 |
|
private: |
295 |
|
/** The Calib2_Ac1 event that is created in the reader. */ |
296 |
|
Calib2_Ac1Event* calib2_Ac1; |
297 |
|
public: |
298 |
|
Calib2_Ac1Reader(void); |
299 |
|
virtual void Init(PamelaRun *); |
300 |
|
virtual void RunEvent(int, long int) throw (Exception); |
301 |
|
virtual std::string GetVersionInfo(void) const; |
302 |
|
}; |
303 |
|
|
304 |
|
/*********************************************** |
305 |
|
* Event reader algorithm for Calib2_Ac2 events. |
306 |
|
**********************************************/ |
307 |
|
class Calib2_Ac2Reader: public TechmodelAlgorithm { |
308 |
|
private: |
309 |
|
/** The Calib2_Ac2 event that is created in the reader. */ |
310 |
|
Calib2_Ac2Event* calib2_Ac2; |
311 |
|
public: |
312 |
|
Calib2_Ac2Reader(void); |
313 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
314 |
virtual void RunEvent(int, long int) throw (Exception); |
virtual void RunEvent(int, long int) throw (Exception); |
315 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
514 |
**********************************************/ |
**********************************************/ |
515 |
class TmtcReader: public TechmodelAlgorithm { |
class TmtcReader: public TechmodelAlgorithm { |
516 |
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
//Length in bytes of the subPacket (that is te TmtcRecord excluded subCRC) |
517 |
static const int TMTC_SUB_LENGTH = 57; |
static const int TMTC_SUB_LENGTH = 36; |
518 |
//Length in bytes of the subPacketCRC |
//Length in bytes of the subPacketCRC |
519 |
static const int TMTC_SUBCRC_LENGTH = 1; |
static const int TMTC_SUBCRC_LENGTH = 1; |
520 |
//Length in bytes of the PacketCRC |
//Length in bytes of the PacketCRC |
522 |
private: |
private: |
523 |
/** The TMTC event that is created in the reader. */ |
/** The TMTC event that is created in the reader. */ |
524 |
TmtcEvent* Tmtc; |
TmtcEvent* Tmtc; |
525 |
float convert_th(int); |
//float convert_th(int); |
526 |
public: |
public: |
527 |
TmtcReader(void); |
TmtcReader(void); |
528 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
562 |
|
|
563 |
|
|
564 |
/********************************************** |
/********************************************** |
565 |
* Event reader algorithm for AcInit events. |
* Event reader algorithm for Ac1Init events. |
566 |
**********************************************/ |
**********************************************/ |
567 |
class AcInitReader: public TechmodelAlgorithm { |
class Ac1InitReader: public TechmodelAlgorithm { |
568 |
private: |
private: |
569 |
/** The AcInit event that is created in the reader. */ |
/** The Ac1Init event that is created in the reader. */ |
570 |
AcInitEvent* acInit; |
Ac1InitEvent* ac1Init; |
571 |
public: |
public: |
572 |
AcInitReader(void); |
Ac1InitReader(void); |
573 |
virtual void Init(PamelaRun *); |
virtual void Init(PamelaRun *); |
574 |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
575 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
665 |
|
|
666 |
|
|
667 |
/********************************************** |
/********************************************** |
668 |
|
* Event reader algorithm for Ac2Init events. |
669 |
|
**********************************************/ |
670 |
|
class Ac2InitReader: public TechmodelAlgorithm { |
671 |
|
private: |
672 |
|
/** The Ac2Init event that is created in the reader. */ |
673 |
|
Ac2InitEvent* ac2Init; |
674 |
|
public: |
675 |
|
Ac2InitReader(void); |
676 |
|
virtual void Init(PamelaRun *); |
677 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
678 |
|
virtual std::string GetVersionInfo(void) const; |
679 |
|
}; |
680 |
|
|
681 |
|
|
682 |
|
/********************************************** |
683 |
* Event reader algorithm for CalAlarm events. |
* Event reader algorithm for CalAlarm events. |
684 |
**********************************************/ |
**********************************************/ |
685 |
class CalAlarmReader: public TechmodelAlgorithm { |
class CalAlarmReader: public TechmodelAlgorithm { |
764 |
}; |
}; |
765 |
|
|
766 |
/********************************************** |
/********************************************** |
767 |
|
* Event reader algorithm for TsbT events. |
768 |
|
**********************************************/ |
769 |
|
class TsbTReader: public TechmodelAlgorithm { |
770 |
|
private: |
771 |
|
/** The TsbT event that is created in the reader. */ |
772 |
|
TsbTEvent* TsbT; |
773 |
|
public: |
774 |
|
TsbTReader(void); |
775 |
|
virtual void Init(PamelaRun *); |
776 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
777 |
|
virtual std::string GetVersionInfo(void) const; |
778 |
|
}; |
779 |
|
|
780 |
|
/********************************************** |
781 |
|
* Event reader algorithm for TsbB events. |
782 |
|
**********************************************/ |
783 |
|
class TsbBReader: public TechmodelAlgorithm { |
784 |
|
private: |
785 |
|
/** The TsbB event that is created in the reader. */ |
786 |
|
TsbBEvent* TsbB; |
787 |
|
public: |
788 |
|
TsbBReader(void); |
789 |
|
virtual void Init(PamelaRun *); |
790 |
|
virtual void RunEvent(int, long int) throw (WrongCRCException); |
791 |
|
virtual std::string GetVersionInfo(void) const; |
792 |
|
}; |
793 |
|
|
794 |
|
/********************************************** |
795 |
* Event reader algorithm for PSCU events. |
* Event reader algorithm for PSCU events. |
796 |
**********************************************/ |
**********************************************/ |
797 |
class PscuReader: public TechmodelAlgorithm { |
class PscuReader: public TechmodelAlgorithm { |
804 |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
virtual void RunEvent(int, long int) throw (WrongCRCException); |
805 |
virtual std::string GetVersionInfo(void) const; |
virtual std::string GetVersionInfo(void) const; |
806 |
}; |
}; |
|
|
|
|
|
|
807 |
} |
} |
808 |
} |
} |
809 |
|
|
811 |
|
|
812 |
|
|
813 |
|
|
814 |
|
|