X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDcalibDB.h;h=d47f4a0825cacdbfeb0dae70c0f7157922bc4a5d;hb=6aca0ab9c8ebc3600f83150e45f7bc843cbffc48;hp=ce308225f470cad145b33763b2e385660297434f;hpb=7754cd1f78851b92317ec92ab52e0124eee76da8;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDcalibDB.h b/TRD/AliTRDcalibDB.h index ce308225f47..d47f4a0825c 100644 --- a/TRD/AliTRDcalibDB.h +++ b/TRD/AliTRDcalibDB.h @@ -11,122 +11,175 @@ /* $Id$ */ -#include +#ifndef ROOT_TObject #include "TObject.h" +#endif + +#ifndef ALITRDPIDUTIL_H +#include "AliTRDpidUtil.h" +#endif + +#ifndef ALITRDPIDRESPONSE_H +#include "AliTRDPIDResponse.h" +#endif -#include "AliLog.h" -#include "AliTRDgeometry.h" +class TString; -#include -#include +class AliCDBEntry; -class AliTRDCalPIDLQ; +class AliTRDrecoParam; +class AliTRDCalTrkAttach; +class AliTRDCalPID; class AliTRDCalMonitoring; +class AliTRDCalROC; +class AliTRDCalDet; +class AliTRDCalSingleChamberStatus; +class AliTRDCalOnlineGainTableROC; -class AliTRDcalibDB : public TObject -{ -public: - enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 }; +class AliTRDcalibDB : public TObject { + + public: + + enum { kNlayer = 6 + , kNstack = 5 + , kNsector = 18 + , kNdet = 540 }; - static AliTRDcalibDB* Instance(); - static void Terminate(); + static AliTRDcalibDB *Instance(); + static void Terminate(); - void SetRun(Long64_t run); - Long64_t GetRun() { return fRun; } + void SetRun(Long64_t run); + Long64_t GetRun() const { return fRun; } - Bool_t GetChamberPos(Int_t det, Float_t* xyz); - Bool_t GetChamberRot(Int_t det, Float_t* xyz); + Float_t GetNoise(Int_t det, Int_t col, Int_t row); + AliTRDCalROC *GetNoiseROC(Int_t det); + const AliTRDCalDet *GetNoiseDet(); - Bool_t GetStackPos(Int_t chamber, Int_t sector, Float_t* xyz); - Bool_t GetStackRot(Int_t chamber, Int_t sector, Float_t* xyz); + Float_t GetVdrift(Int_t det, Int_t col, Int_t row); + Float_t GetVdriftAverage(Int_t det); + AliTRDCalROC *GetVdriftROC(Int_t det); + const AliTRDCalDet *GetVdriftDet(); - Bool_t GetSuperModulePos(Int_t sm, Float_t* xyz); - Bool_t GetSuperModuleRot(Int_t sm, Float_t* xyz); + Float_t GetT0(Int_t det, Int_t col, Int_t row); + Float_t GetT0Average(Int_t det); + AliTRDCalROC *GetT0ROC(Int_t det); + const AliTRDCalDet *GetT0Det(); - Float_t GetVdrift(Int_t det, Int_t col, Int_t row); - Float_t GetVdriftAverage(Int_t det); + Float_t GetGainFactor(Int_t det, Int_t col, Int_t row); + Float_t GetGainFactorAverage(Int_t det); + AliTRDCalROC *GetGainFactorROC(Int_t det); + const AliTRDCalDet *GetGainFactorDet(); - Float_t GetT0(Int_t det, Int_t col, Int_t row); - Float_t GetT0Average(Int_t det); + Float_t GetOnlineGainFactor(Int_t det, Int_t col, Int_t row); + AliTRDCalOnlineGainTableROC *GetOnlineGainTableROC(Int_t det); - Float_t GetGainFactor(Int_t det, Int_t col, Int_t row); - Float_t GetGainFactorAverage(Int_t det); + AliTRDCalROC *GetPRFROC(Int_t det); + Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row); - Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row); + Float_t* GetSampledPRF() const { return fPRFsmp; }; + Int_t GetPRFbin() const { return fPRFbin; }; + Float_t GetPRFlo() const { return fPRFlo; }; + Float_t GetPRFhi() const { return fPRFhi; }; - Float_t GetSamplingFrequency(); - Int_t GetNumberOfTimeBins(); + Int_t GetNumberOfTimeBinsDCS(); + void GetFilterType(TString &filterType); + void GetGlobalConfiguration(TString &config); - Char_t GetPadStatus(Int_t det, Int_t col, Int_t row); - Char_t GetMCMStatus(Int_t det, Int_t col, Int_t row); - Char_t GetChamberStatus(Int_t det); - Char_t GetSuperModuleStatus(Int_t sm); + Int_t GetOnlineGainTableID(); - Bool_t IsPadMasked(Int_t det, Int_t col, Int_t row); - Bool_t IsPadBridgedLeft(Int_t det, Int_t col, Int_t row); - Bool_t IsPadBridgedRight(Int_t det, Int_t col, Int_t row); - - Bool_t IsMCMMasked(Int_t det, Int_t col, Int_t row); - - Bool_t IsChamberInstalled(Int_t det); - Bool_t IsChamberMasked(Int_t det); - - Bool_t IsSuperModuleInstalled(Int_t det); - Bool_t IsSuperModuleMasked(Int_t det); + Bool_t HasOnlineFilterPedestal(); + Bool_t HasOnlineFilterGain(); + Bool_t HasOnlineTailCancellation(); - const AliTRDCalMonitoring* GetMonitoringObject(); - const AliTRDCalPIDLQ* GetPIDLQObject(); + Char_t GetPadStatus(Int_t det, Int_t col, Int_t row); + AliTRDCalSingleChamberStatus *GetPadStatusROC(Int_t det); + AliTRDrecoParam* GetRecoParam(Int_t *eventtype); + AliTRDPIDResponse *GetPIDResponse(AliTRDPIDResponse::ETRDPIDMethod m); - //Related functions, these depend on calibration data - static Float_t GetOmegaTau(Float_t vdrift); - Int_t PadResponse(Double_t signal, Double_t dist, Int_t plane, Double_t *pad) const; + Char_t GetChamberStatus(Int_t det); + + Bool_t IsPadMasked(Int_t det, Int_t col, Int_t row); + Bool_t IsPadBridgedLeft(Int_t det, Int_t col, Int_t row); + Bool_t IsPadBridgedRight(Int_t det, Int_t col, Int_t row); + Bool_t IsPadNotConnected(Int_t det, Int_t col, Int_t row); -protected: - // for caching see also implentation of GetCachedCDBObject in the .cxx file - enum { kCDBCacheSize = 17 }; // Number of cached objects - enum { kIDVdriftPad = 0, kIDVdriftChamber, - kIDT0Pad, kIDT0Chamber, - kIDGainFactorPad, kIDGainFactorChamber, - kIDPRFWidth, - kIDGlobals, - kIDChamberPos, kIDStackPos, kIDSuperModulePos, - kIDPIDLQ, kIDMonitoringData, - kIDSuperModuleStatus, kIDChamberStatus, kIDMCMStatus, kIDPadStatus }; // IDs of cached objects - - const TObject* GetCachedCDBObject(Int_t id); + Bool_t IsChamberInstalled(Int_t det); + Bool_t IsChamberMasked(Int_t det); + Bool_t IsHalfChamberMasked(Int_t det, Int_t side); + + const AliTRDCalMonitoring *GetMonitoringObject(); + const AliTRDCalPID *GetPIDObject(AliTRDpidUtil::ETRDPIDMethod m); + const AliTRDCalTrkAttach *GetAttachObject(); + + // Related functions, these depend on calibration data + Int_t PadResponse(Double_t signal, Double_t dist + , Int_t layer, Double_t *pad) const; + + protected: + + // For caching see also implentation of GetCachedCDBObject in the .cxx file + enum { kIDVdriftPad = 0 + , kIDVdriftChamber + , kIDT0Pad + , kIDT0Chamber + , kIDGainFactorPad + , kIDGainFactorChamber + , kIDOnlineGainFactor + , kIDNoiseChamber + , kIDNoisePad + , kIDPRFWidth + , kIDFEE + , kIDChamberPos + , kIDStackPos + , kIDSuperModulePos + , kIDPIDNN + , kIDPIDLQ + , kIDPIDLQ1D + , kIDRecoParam + , kIDMonitoringData + , kIDChamberStatus + , kIDPadStatus + , kIDDCS + , kIDAttach + , kCDBCacheSize }; // IDs of cached objects + + const TObject *GetCachedCDBObject(Int_t id); - void Invalidate(); - void SamplePRF(); + void Invalidate(); + void SamplePRF(); - AliCDBEntry* GetCDBEntry(const char* cdbPath); - const TObject* CacheCDBEntry(Int_t id, const char* cdbPath); + AliCDBEntry *GetCDBEntry(const Char_t *cdbPath); + const TObject *CacheCDBEntry(Int_t id, const Char_t *cdbPath); - static AliTRDcalibDB* fgInstance; // Instance of this class (singleton implementation) - static Bool_t fgTerminated; // Defines if this class has already been terminated and therefore does not return instances in GetInstance anymore + static AliTRDcalibDB *fgInstance; // Instance of this class (singleton implementation) + static Bool_t fgTerminated; // Defines if this class has already been terminated - AliCDBStorage* fLocator; // Storage locator retrieved from AliCDBManager - - AliCDBEntry* fCDBEntries[kCDBCacheSize]; // Cache for CDB entries - TObject* fCDBCache[kCDBCacheSize]; // Cache for calibration objects. - - Long64_t fRun; - - struct - { - Float_t *fPRFsmp; //! Sampled pad response - Int_t fPRFbin; // Number of bins for the PRF - Float_t fPRFlo; // Lower boundary of the PRF - Float_t fPRFhi; // Higher boundary of the PRF - Float_t fPRFwid; // Bin width of the sampled PRF - Int_t fPRFpad; // Distance to next pad in PRF - } fPadResponse; + AliCDBEntry *fCDBEntries[kCDBCacheSize]; // Cache for CDB entries + TObject *fCDBCache[kCDBCacheSize]; // Cache for calibration objects. + + Long64_t fRun; // Run Number + + Float_t *fPRFsmp; //! Sampled pad response + Int_t fPRFbin; // Number of bins for the PRF + Float_t fPRFlo; // Lower boundary of the PRF + Float_t fPRFhi; // Higher boundary of the PRF + Float_t fPRFwid; // Bin width of the sampled PRF + Int_t fPRFpad; // Distance to next pad in PRF + + AliTRDPIDResponse *fPIDResponse; // TRD PID Response function + + Int_t fOnlineGainTableID; // ID for online gain table -private: - // this is a singleton, constructor is private! - AliTRDcalibDB(); + private: + + AliTRDcalibDB(); // This is a singleton, constructor is private! + AliTRDcalibDB(const AliTRDcalibDB &c); + AliTRDcalibDB &operator=(const AliTRDcalibDB &c); virtual ~AliTRDcalibDB(); - ClassDef(AliTRDcalibDB, 1) + ClassDef(AliTRDcalibDB, 7) // Provides central access to the CDB + }; #endif +