| 1 |
/** @file |
| 2 |
* $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/PacketType.h,v $ |
| 3 |
* $Id: PacketType.h,v 1.3 2009/07/29 15:47:22 mocchiut Exp $ |
| 4 |
* $Author: mocchiut $ |
| 5 |
* |
| 6 |
* Header file for the PacketType class. |
| 7 |
*/ |
| 8 |
#ifndef PACKETTYPE_H |
| 9 |
#define PACKETTYPE_H |
| 10 |
#include <string> |
| 11 |
#include <sstream> |
| 12 |
#include <TObject.h> |
| 13 |
#include <Rtypes.h> //Substituted by Maurizio 05 Feb 2004 |
| 14 |
|
| 15 |
namespace pamela { |
| 16 |
/** |
| 17 |
* The type of a packet type. |
| 18 |
*/ |
| 19 |
class PacketType: public TObject{ |
| 20 |
private: |
| 21 |
/** |
| 22 |
* A magic number to distinguish between the Packets. A "packet |
| 23 |
* type" is central for the whole YODA analysis package. The data |
| 24 |
* flow within YODA is organized within different streams which |
| 25 |
* are distinguished by their "packet type". The main data stream |
| 26 |
* has the package type "Physics" that handles all physics |
| 27 |
* events. Other important types are "Housekeeping" and |
| 28 |
* "Calibration". The different package type originate in the |
| 29 |
* differnet package types in the raw data file and correspond to |
| 30 |
* them. |
| 31 |
*/ |
| 32 |
int Magic; |
| 33 |
/** |
| 34 |
* The name of the packet type. |
| 35 |
*/ |
| 36 |
std::string Name; |
| 37 |
protected: |
| 38 |
PacketType(int, std::string); |
| 39 |
virtual const char* Print() const { return "Packet Type"; } |
| 40 |
virtual void Print(Option_t *option="") const { option="";}; |
| 41 |
// void Print(Option_t *option){ return "Packet Type";}; |
| 42 |
virtual ~PacketType(); |
| 43 |
public: |
| 44 |
/** |
| 45 |
* Get the name of the packet type |
| 46 |
*/ |
| 47 |
// const std::string GetName(void) const { return Name; } |
| 48 |
const char* GetName(void) const { return Name.c_str(); } |
| 49 |
// const char * Get_Name() const {return (Name.c_str());}; |
| 50 |
/** |
| 51 |
* Get the magic number of the packet type |
| 52 |
*/ |
| 53 |
const int GetMagic(void) const { return Magic; } |
| 54 |
|
| 55 |
|
| 56 |
PacketType(); |
| 57 |
|
| 58 |
static const PacketType* Pscu; /**< Pscu event packets */ |
| 59 |
static const PacketType* PhysEndRun; |
| 60 |
static const PacketType* CalibCalPulse1; |
| 61 |
static const PacketType* CalibCalPulse2; |
| 62 |
static const PacketType* Physics; |
| 63 |
static const PacketType* CalibTrkBoth; |
| 64 |
static const PacketType* CalibTrk1; |
| 65 |
static const PacketType* CalibTrk2; |
| 66 |
static const PacketType* CalibTof; |
| 67 |
static const PacketType* CalibS4; |
| 68 |
static const PacketType* CalibCalPed; |
| 69 |
static const PacketType* Calib1_Ac1; |
| 70 |
static const PacketType* Calib2_Ac1; |
| 71 |
static const PacketType* Calib1_Ac2; |
| 72 |
static const PacketType* Calib2_Ac2; |
| 73 |
static const PacketType* CalibCal; |
| 74 |
static const PacketType* RunHeader; |
| 75 |
static const PacketType* RunTrailer; |
| 76 |
static const PacketType* CalibHeader; |
| 77 |
static const PacketType* CalibTrailer; |
| 78 |
static const PacketType* InitHeader; |
| 79 |
static const PacketType* InitTrailer; |
| 80 |
static const PacketType* EventTrk; |
| 81 |
static const PacketType* Log; |
| 82 |
static const PacketType* VarDump; |
| 83 |
static const PacketType* ArrDump; |
| 84 |
static const PacketType* TabDump; |
| 85 |
static const PacketType* Tmtc; |
| 86 |
static const PacketType* Mcmd; |
| 87 |
static const PacketType* ForcedFECmd; |
| 88 |
static const PacketType* Ac1Init; |
| 89 |
static const PacketType* CalInit; |
| 90 |
static const PacketType* TrkInit; |
| 91 |
static const PacketType* TofInit; |
| 92 |
static const PacketType* TrgInit; |
| 93 |
static const PacketType* NdInit; |
| 94 |
static const PacketType* S4Init; |
| 95 |
static const PacketType* Ac2Init; |
| 96 |
static const PacketType* CalAlarm; |
| 97 |
static const PacketType* Ac1Alarm; |
| 98 |
static const PacketType* TrkAlarm; |
| 99 |
static const PacketType* TrgAlarm; |
| 100 |
static const PacketType* TofAlarm; |
| 101 |
static const PacketType* S4Alarm; |
| 102 |
static const PacketType* Ac2Alarm; |
| 103 |
static const PacketType* TsbT; |
| 104 |
static const PacketType* TsbB; |
| 105 |
static const PacketType* Invalid; |
| 106 |
|
| 107 |
ClassDef(PacketType, 8) |
| 108 |
}; |
| 109 |
} |
| 110 |
|
| 111 |
#endif /* PACKETTYPE_H */ |