| 1 |
kusanagi |
1.1 |
/** @file |
| 2 |
|
|
* $Author: nagni $ |
| 3 |
|
|
* $Date: 2004/03/16 10:18:28 $ |
| 4 |
|
|
* $Revision: 1.6 $ |
| 5 |
|
|
* |
| 6 |
|
|
* Header file for the algorithms used to read the techmodel data file. |
| 7 |
|
|
*/ |
| 8 |
|
|
|
| 9 |
|
|
#include "TechmodelPamelaRun.h" |
| 10 |
|
|
#include "TechmodelAlgorithm.h" |
| 11 |
|
|
|
| 12 |
|
|
namespace pamela { |
| 13 |
|
|
namespace techmodel { |
| 14 |
|
|
/** |
| 15 |
|
|
* Main event reader algorithm. It handles all other specific |
| 16 |
|
|
* reader algorithms. |
| 17 |
|
|
*/ |
| 18 |
|
|
class EventReader: public TechmodelAlgorithm { |
| 19 |
|
|
private: |
| 20 |
|
|
/** |
| 21 |
|
|
* A map with an algorithm to read the techmodel file with the packet |
| 22 |
|
|
* type as key. |
| 23 |
|
|
*/ |
| 24 |
|
|
typedef std::map<const PacketType *, TechmodelAlgorithm *> AlgorithmMap; |
| 25 |
|
|
/** |
| 26 |
|
|
* The map that links every packet type to an algorithm that reads it. |
| 27 |
|
|
*/ |
| 28 |
|
|
AlgorithmMap TechmodelAlgorithmMap; //! |
| 29 |
|
|
/** |
| 30 |
|
|
* The event header. |
| 31 |
|
|
*/ |
| 32 |
|
|
EventHeader* Header; //! |
| 33 |
|
|
/** |
| 34 |
|
|
* The Run that is processed. |
| 35 |
|
|
*/ |
| 36 |
|
|
TechmodelPamelaRun *Run; //! |
| 37 |
|
|
int UnpackPscuHeader(void) throw (std::exception); |
| 38 |
|
|
void UnpackPscuTrailer(void) throw (std::exception); |
| 39 |
|
|
public: |
| 40 |
|
|
EventReader(void); |
| 41 |
|
|
virtual void Init(PamelaRun *); |
| 42 |
|
|
virtual void RunEvent(int); |
| 43 |
|
|
virtual std::string GetVersionInfo(void) const; |
| 44 |
|
|
virtual int FindStart(void) throw (std::exception); |
| 45 |
|
|
ClassDef(EventReader, 1) |
| 46 |
|
|
}; |
| 47 |
|
|
} |
| 48 |
|
|
} |