00001 #ifndef ROOT_MTRun 00002 #define ROOT_MTRun 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 class MTChip; 00015 class MTDif; 00016 class MTDetector; 00017 class Run; 00018 00019 //////////////////////////////////////////////////////////////////////////// 00020 // CLASS MTRUN(containing constant run indormations) 00021 //- 1 Run correspond a 1 prise de donnée réel. 00022 // ou a une configuration chjip + dif en mode calibration 00023 //- Dans un Run il ne peut y avoir qu' une cofiguration de DIF et de Hardroc 00024 //////////////////////////////////////////////////////////////////////////// 00025 00026 00027 class MTRun : public TObject { 00028 00029 public: 00030 MTRun(); 00031 MTRun(const Run& aRun); 00032 virtual ~MTRun(); 00033 MTRun& operator=(const Run& aRun); 00034 private: 00035 // Run informations 00036 00037 UInt_t id; // XML or in filename for XDaq 00038 TString name; // XML 00039 TString date; // XML 00040 bool processed; // default false 00041 00042 bool calibrationRun; // Set by parser. Default is false; 00043 bool difSynchro; //set true for dif_synchro acquisition 00044 // Reconstruction information 00045 00046 time_t reconstructionDate ; // millisec from 1 janv 1970 */ 00047 TString rawDataFilename; // <- from XML 00048 TString svnrev; // <- from source code 00049 Char_t rawDataFormat; // Raw data format 00050 00051 //electronic 00052 Char_t daqSoftVersion; // DAQ software version 00053 Char_t cccFirmwareVersion; // CCC firmwareVersion 00054 Char_t sdccFirmwareVersion; // SDcc firmwareVersion 00055 Char_t difFirmwareVersion; // DIF firmwareVersion 00056 00057 00058 /* 00059 // Detector information 00060 TString detectorName; 00061 TString detectorDescription; 00062 00063 // Chamber configuration information 00064 std::map<UInt_t,MTChamber*> chamberConfig; // Map key is dif id 00065 // Dif configuration information 00066 std::map<UInt_t,MTDif*> difConfig; // Map key is dif id 00067 // Chip configuration information 00068 std::map<Long_t,MTChip*> chipConfig;// Map key is chip softId 00069 */ 00070 UShort_t delayTrigger; 00071 00072 // calibration only // Infos from calibration raw data file 00073 Float_t injectedCharge; // 16 bits 00074 UShort_t widthCtest; // 10 bit store in 16 bits 00075 UShort_t periodCtest; // 10 bit store in 16 bits 00076 UShort_t delayCtest; // 10 bit store in 16 bits 00077 00078 MTDetector *detector; 00079 00080 00081 00082 public: 00083 00084 time_t GetReconstructionDate(TString &dateToComplete) const; 00085 void SetRawDataFilename(TString value) { rawDataFilename = value;}; 00086 TString GetRawDataFilename(void) const { return rawDataFilename; }; 00087 TString GetRunName(void) const { return name; }; 00088 UInt_t GetRunId(void ) const { return id; } ; 00089 void SetRunId(UInt_t value ) { id = value ; } ; 00090 00091 bool GetProcessed(void) { return processed; } ; 00092 void SetProcessed(bool value) { processed = value; } ; 00093 00094 TString GetDate() {return date;}; 00095 void SetDate(TString aDate) { date = aDate; }; 00096 00097 TString GetSvnVersion() const { return svnrev; }; 00098 00099 bool IsCalibrationRun(void) const { return calibrationRun; }; 00100 void SetCalibrationRun(bool aValue) { calibrationRun = aValue; } 00101 00102 bool IsDifSynchro(void) const { return difSynchro; }; 00103 void SetDifSynchro(bool aValue) { difSynchro = aValue; } 00104 00105 void SetDectector(MTDetector *value) { detector = value; } ; 00106 MTDetector* GetDetector(void) const { return detector ; } ; 00107 00108 Char_t GetRawDataFormat() const { return rawDataFormat ; }; 00109 Char_t GetDaqSoftVersion() const { return daqSoftVersion ; }; 00110 Char_t GetCCCFirmwareVersion() const { return cccFirmwareVersion ; }; 00111 Char_t GetSDCCFirmwareVersion() const { return sdccFirmwareVersion ; }; 00112 Char_t GetDIFFirmwareVersion() const { return difFirmwareVersion ; }; 00113 00114 const MTChip& GetOneChip(void ) const ; 00115 00116 /* 00117 TString GetDetectorDescription(void) const{ return detectorDescription; }; 00118 void SetDetectorDescription(TString aValue){ detectorDescription = aValue;}; 00119 00120 */ 00121 /* 00122 // Chamber configuration information 00123 const std::map<UInt_t,MTChamber*>& GetChamberConfigs(void) 00124 { return chamberConfig; } ; 00125 const MTChamber& GetChamberConfig(UInt_t id) const 00126 { return *(chamberConfig.find(id)->second); }; 00127 00128 // Dif configuration information 00129 const std::map<UInt_t,MTDif*>& GetDifConfigs(void) 00130 { return difConfig; } ; 00131 const MTDif& GetDifConfig(UInt_t id) const 00132 { return *(difConfig.find(id)->second); }; 00133 00134 // Chip configuration information 00135 const std::map<Long_t,MTChip*>& GetChipConfigs(void) const 00136 {return chipConfig;}; 00137 const MTChip& GetChipConfig(Long_t chipId) const 00138 { return *(chipConfig.find(chipId)->second); }; 00139 void SetChipConfig(Long_t chipId, MTChip& chip) 00140 { chipConfig[chipId] = &chip;}; 00141 */ 00142 // calibration only // Infos from calibration raw data file 00143 Float_t GetInjectedCharge(void) const { return injectedCharge; } ; 00144 UShort_t GetWidthCtest(void) const { return widthCtest; } ; 00145 UShort_t GetPeriodCtest(void) const { return periodCtest; } ; 00146 UShort_t GetDelayCtest(void) const { return delayCtest; } ; 00147 UShort_t GetDelayTrigger(void) const { return delayTrigger; } ; 00148 00149 00150 //void SetInjectedCharge(UInt_t aValue) { injectedCharge = aValue; } ; 00151 void SetInjectedCharge(Float_t aValue) { injectedCharge = aValue; } ; 00152 void SetWidthCtest(UInt_t aValue) { widthCtest = aValue; } ; 00153 void SetPeriodCtest(UInt_t aValue) { periodCtest = aValue; } ; 00154 void SetDelayCtest(UInt_t aValue) { delayCtest = aValue; } ; 00155 void SetDelayTrigger(UInt_t aValue) { delayTrigger = aValue; } ; 00156 00157 void Info(void) const; 00158 00159 ClassDef(MTRun, 34) //MTRun structure 00160 }; 00161 00162 00163 #endif