00001 #ifndef ROOT_MTDif 00002 #define ROOT_MTDif 00003 00004 00005 #include "TObject.h" 00006 #include "TClonesArray.h" 00007 #include "TRefArray.h" 00008 #include "TRef.h" 00009 #include "TH1.h" 00010 #include "TMath.h" 00011 #include <vector> 00012 #include <map> 00013 00014 //#include "geometry/Dif.hh" 00015 class Dif; 00016 00017 //////////////////////////////////////////////////////////////////////////////////////// 00018 /// CLASS MTDIF(containing dif configuration) 00019 /////////////////////////////////////////////////////////////////////////////////////// 00020 class MTDif : public TObject { 00021 00022 public: 00023 MTDif(UInt_t _id = 0); 00024 MTDif(const Dif& aDif); 00025 virtual ~MTDif(); 00026 MTDif& operator=(const Dif& aDif); 00027 void Info(void) const; 00028 00029 private: 00030 00031 // Dif information // For Hardroc and Dirac. Infos from raw data 00032 Int_t id; 00033 bool configured; 00034 Int_t low_register; //8 bits 00035 Int_t high_register; //8 bits 00036 Int_t before_register; //6 bits 00037 Int_t after_register ; //6 bits 00038 Int_t acqMode; // 4 bits acquisition mode 00039 Int_t difFirmware; // Dif firmware version 8 bits 00040 Int_t difConfig; // Dif config 8 bits 00041 Int_t asicType; // Code to describe front-end electronic device: 00042 // 01 Hardroc1 00043 // 02 Hardroc2 00044 // 03 Hardroc2b 00045 // 11 Dirac1 00046 // 12 Dirac2 00047 // 31 Microroc1 00048 Int_t asu1Id; // First Slab ASU number 00049 Int_t asu2Id; 00050 00051 public: 00052 void SetRegister(Char_t low, Char_t high, Char_t before, Char_t after); 00053 void SetAcqMiode(Short_t _acqMode) { acqMode = _acqMode;}; 00054 Int_t GetDifBunchCrossing(void) const { return low_register + high_register; }; // 64 bits 00055 00056 Int_t GetId() const { return id; } ; 00057 Char_t GetLowRegister() const { return low_register; } ; 00058 Char_t GetHighRegister()const { return high_register; } ; 00059 Char_t GetBeforeRegister()const { return before_register; } ; 00060 Char_t GetAfterRegister()const { return after_register; } ; 00061 Short_t GetAcqMode()const { return acqMode; } ; 00062 00063 void SetId(UInt_t value) { id =value; }; 00064 void SetLowRegister(Char_t value) { low_register =value; }; 00065 void SetHighRegister(Char_t value) { high_register =value; }; 00066 void SetBeforeRegister(Char_t value) { before_register =value; }; 00067 void SetAfterRegister(Char_t value) { after_register =value; }; 00068 void SetAcqMode(Short_t value) { acqMode = value; } ; 00069 00070 00071 inline Char_t GetDifFirmware() const { return difFirmware; } ; 00072 void SetDifFirmware(Char_t value) { difFirmware = value; } ; 00073 00074 inline Char_t GetDifConfig() const { return difConfig; } ; 00075 void SetDifConfig(Char_t value) { difConfig = value; } ; 00076 00077 inline Char_t GetAsicType() const { return asicType; } ; 00078 TString GetStringAsicType() const; 00079 void SetAsicType(Char_t value) { asicType = value; } ; 00080 00081 inline Char_t GetAsu1Id() const { return asu1Id; } ; 00082 void SetAsu1Id(Char_t value) { asu1Id = value; } ; 00083 00084 inline Char_t GetAsu2Id() const { return asu2Id; } ; 00085 void SetAsu2Id(Char_t value) { asu2Id = value; } ; 00086 00087 00088 void SetConfigured(bool value) { configured = value; }; 00089 bool IsConfigured(void) const { return configured;}; 00090 00091 ClassDef(MTDif, 34) //MTDif structure 00092 }; 00093 00094 #endif