/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/include/root/MTRun.hh

Go to the documentation of this file.
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 
00055 
00056 /*
00057    // Detector information
00058    TString       detectorName;
00059    TString       detectorDescription;
00060 
00061    // Chamber configuration information
00062    std::map<UInt_t,MTChamber*>    chamberConfig; // Map key is dif id
00063    // Dif configuration information
00064    std::map<UInt_t,MTDif*>    difConfig; // Map key is dif id
00065    // Chip configuration information
00066    std::map<Long_t,MTChip*>   chipConfig;// Map key is chip softId
00067 */
00068    UShort_t delayTrigger;
00069 
00070    // calibration only    // Infos from calibration raw data file
00071    Float_t injectedCharge;      // 16 bits
00072    UShort_t widthCtest;     // 10 bit store in 16 bits
00073    UShort_t periodCtest;    // 10 bit store in 16 bits
00074    UShort_t delayCtest;     // 10 bit store in 16 bits
00075 
00076    MTDetector *detector;
00077 
00078    
00079 
00080 public:
00081 
00082    time_t   GetReconstructionDate(TString  &dateToComplete) const;
00083    void     SetRawDataFilename(TString   value) { rawDataFilename = value;};
00084    TString  GetRawDataFilename(void)  const     { return rawDataFilename; };
00085    TString  GetRunName(void)  const   { return name; };
00086    UInt_t   GetRunId(void ) const { return id; } ;
00087    void     SetRunId(UInt_t value ) { id = value ; } ;
00088 
00089    bool     GetProcessed(void) { return processed; } ;
00090    void     SetProcessed(bool value) { processed = value; } ;
00091 
00092    TString  GetDate() {return date;};
00093    void     SetDate(TString     aDate) { date = aDate; };
00094 
00095    TString  GetSvnVersion() const { return svnrev; }; 
00096 
00097    bool     IsCalibrationRun(void) const { return calibrationRun; };
00098    void     SetCalibrationRun(bool aValue) { calibrationRun = aValue; }
00099 
00100    bool     IsDifSynchro(void) const { return difSynchro; };
00101    void     SetDifSynchro(bool aValue) { difSynchro = aValue; }
00102 
00103    void       SetDectector(MTDetector *value) { detector = value; } ;
00104    MTDetector* GetDetector(void) const { return detector ; } ;
00105 
00106   Char_t   GetRawDataFormat() const { return rawDataFormat ; };
00107   Char_t   GetDaqSoftVersion() const { return daqSoftVersion ; };
00108   Char_t   GetCCCFirmwareVersion() const { return cccFirmwareVersion ; };
00109 
00110   const MTChip& GetOneChip(void ) const ;
00111 
00112 /*
00113 TString GetDetectorDescription(void) const{ return detectorDescription;  };
00114 void  SetDetectorDescription(TString  aValue){ detectorDescription = aValue;};
00115 
00116 */
00117 /*
00118 // Chamber configuration information
00119 const std::map<UInt_t,MTChamber*>& GetChamberConfigs(void)
00120 { return chamberConfig; } ;
00121 const MTChamber&  GetChamberConfig(UInt_t id) const
00122  { return *(chamberConfig.find(id)->second); };
00123 
00124 // Dif configuration information
00125 const std::map<UInt_t,MTDif*>& GetDifConfigs(void)
00126 { return difConfig; } ;
00127 const MTDif&                  GetDifConfig(UInt_t id) const
00128  { return *(difConfig.find(id)->second); };
00129 
00130 // Chip configuration information
00131 const std::map<Long_t,MTChip*>& GetChipConfigs(void) const
00132 {return chipConfig;};
00133 const MTChip& GetChipConfig(Long_t chipId) const
00134 { return *(chipConfig.find(chipId)->second); };
00135 void SetChipConfig(Long_t chipId, MTChip& chip)
00136 { chipConfig[chipId] = &chip;};
00137 */
00138    // calibration only    // Infos from calibration raw data file
00139    Float_t   GetInjectedCharge(void) const { return injectedCharge; } ;
00140    UShort_t GetWidthCtest(void) const   { return widthCtest;   } ;
00141    UShort_t GetPeriodCtest(void) const  { return periodCtest;  } ;
00142    UShort_t GetDelayCtest(void) const   { return delayCtest;   } ;
00143    UShort_t GetDelayTrigger(void) const { return delayTrigger;  } ;
00144 
00145 
00146    //void SetInjectedCharge(UInt_t aValue) {  injectedCharge = aValue; } ;
00147    void SetInjectedCharge(Float_t aValue) {  injectedCharge = aValue; } ;
00148    void SetWidthCtest(UInt_t aValue)   {  widthCtest = aValue;   } ;
00149    void SetPeriodCtest(UInt_t aValue)  {  periodCtest = aValue;  } ;
00150    void SetDelayCtest(UInt_t aValue)   {  delayCtest = aValue;   } ;
00151    void SetDelayTrigger(UInt_t aValue) {  delayTrigger = aValue;   } ;
00152 
00153          void  Info(void) const;
00154 
00155    ClassDef(MTRun, 30)  //MTRun structure
00156 };
00157 
00158 
00159 #endif

Generated on Mon Jun 11 16:55:45 2012 for MicromegasFramework by  doxygen 1.4.7