/* $Id$ */
-#include <iostream>
#include "TObject.h"
-#include "AliLog.h"
-#include "AliTRDgeometry.h"
-
-#include <AliCDBStorage.h>
-#include <AliCDBEntry.h>
+class AliCDBEntry;
class AliTRDCalPIDLQ;
class AliTRDCalMonitoring;
-class AliTRDcalibDB : public TObject
-{
-public:
+class AliTRDcalibDB : public TObject {
+
+ public:
+
enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
- static AliTRDcalibDB* Instance();
- static void Terminate();
+ static AliTRDcalibDB *Instance();
+ static void Terminate();
- void SetRun(Long64_t run);
+ void SetRun(Long64_t run);
Long64_t GetRun() { return fRun; }
- Bool_t GetChamberPos(Int_t det, Float_t* xyz);
- Bool_t GetChamberRot(Int_t det, Float_t* xyz);
+ Float_t GetVdrift(Int_t det, Int_t col, Int_t row);
+ Float_t GetVdriftAverage(Int_t det);
- 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 GetT0(Int_t det, Int_t col, Int_t row);
+ Float_t GetT0Average(Int_t det);
- Bool_t GetSuperModulePos(Int_t sm, Float_t* xyz);
- Bool_t GetSuperModuleRot(Int_t sm, Float_t* xyz);
+ Float_t GetGainFactor(Int_t det, Int_t col, Int_t row);
+ Float_t GetGainFactorAverage(Int_t det);
- Float_t GetVdrift(Int_t det, Int_t col, Int_t row);
- Float_t GetVdriftAverage(Int_t det);
+ Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row);
- Float_t GetT0(Int_t det, Int_t col, Int_t row);
- Float_t GetT0Average(Int_t det);
+ Float_t GetSamplingFrequency();
+ Int_t GetNumberOfTimeBins();
- Float_t GetGainFactor(Int_t det, Int_t col, Int_t row);
- Float_t GetGainFactorAverage(Int_t det);
+ Char_t GetPadStatus(Int_t det, Int_t col, Int_t row);
+ Char_t GetChamberStatus(Int_t det);
- Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row);
+ 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 IsChamberInstalled(Int_t det);
+ Bool_t IsChamberMasked(Int_t det);
- Float_t GetSamplingFrequency();
- Int_t GetNumberOfTimeBins();
+ const AliTRDCalMonitoring *GetMonitoringObject();
+ const AliTRDCalPIDLQ *GetPIDLQObject();
- 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);
+ // Related functions, these depend on calibration data
+ static Float_t GetOmegaTau(Float_t vdrift, Float_t bz);
- 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);
+ Int_t PadResponse(Double_t signal, Double_t dist, Int_t plane, Double_t *pad) const;
- Bool_t IsSuperModuleInstalled(Int_t det);
- Bool_t IsSuperModuleMasked(Int_t det);
+ protected:
- const AliTRDCalMonitoring* GetMonitoringObject();
- const AliTRDCalPIDLQ* GetPIDLQObject();
-
- //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;
-
-protected:
- // for caching see also implentation of GetCachedCDBObject in the .cxx file
- enum { kCDBCacheSize = 17 }; // Number of cached objects
+ // For caching see also implentation of GetCachedCDBObject in the .cxx file
+ enum { kCDBCacheSize = 15 }; // Number of cached objects
enum { kIDVdriftPad = 0, kIDVdriftChamber,
kIDT0Pad, kIDT0Chamber,
kIDGainFactorPad, kIDGainFactorChamber,
kIDGlobals,
kIDChamberPos, kIDStackPos, kIDSuperModulePos,
kIDPIDLQ, kIDMonitoringData,
- kIDSuperModuleStatus, kIDChamberStatus, kIDMCMStatus, kIDPadStatus }; // IDs of cached objects
+ kIDChamberStatus, kIDPadStatus }; // 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* cdbPath);
+ const TObject *CacheCDBEntry(Int_t id, const char* 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;
+ AliCDBEntry *fCDBEntries[kCDBCacheSize]; // Cache for CDB entries
+ TObject *fCDBCache[kCDBCacheSize]; // Cache for calibration objects.
+
+ Long64_t fRun; // Run Number
- 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;
+ 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
-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,3) // Provides central access to the CDB
+
};
#endif