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