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