ROOT logo
AliRoot » TRD » AliTRDcalibDB

class AliTRDcalibDB: public TObject


Class providing the calibration parameters by accessing the CDB

Request an instance with AliTRDcalibDB::Instance()
If a new event is processed set the event number with SetRun
Then request the calibration data

Author:
Jan Fiete Grosse-Oetringhaus (Jan.Fiete.Grosse-Oetringhaus@cern.ch)


Function Members (Methods)

public:
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
Int_tExtractTimeBinsFromString(TString tbstr)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const AliTRDCalTrkAttach*GetAttachObject()
Char_tGetChamberStatus(Int_t det)
voidGetDCSConfigParOption(TString cname, Int_t cfgType, Int_t option, TString& cfgo)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
const AliTRDCalDet*GetExBDet()
voidGetFilterType(TString& filterType)
Float_tGetGainFactor(Int_t det, Int_t col, Int_t row)
Float_tGetGainFactorAverage(Int_t det)
const AliTRDCalDet*GetGainFactorDet()
AliTRDCalROC*GetGainFactorROC(Int_t det)
voidGetGlobalConfiguration(TString& config)
voidGetGlobalConfigurationByChamber(TString& config, Int_t par, Int_t opt = 0)
voidGetGlobalConfigurationVersion(TString& version)
virtual const char*TObject::GetIconName() const
const AliTRDCalMonitoring*GetMonitoringObject()
virtual const char*TObject::GetName() const
Float_tGetNoise(Int_t det, Int_t col, Int_t row)
const AliTRDCalDet*GetNoiseDet()
AliTRDCalROC*GetNoiseROC(Int_t det)
Int_tGetNumberOfOptsDCS(TString cname, Int_t cfgType)
Int_tGetNumberOfParsDCS(TString cname, Char_t delimiter = '_')
Int_tGetNumberOfTimeBinsDCS()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
Float_tGetOnlineGainFactor(Int_t det, Int_t col, Int_t row)
Int_tGetOnlineGainTableID()
AliTRDCalOnlineGainTableROC*GetOnlineGainTableROC(Int_t det)
virtual Option_t*TObject::GetOption() const
Char_tGetPadStatus(Int_t det, Int_t col, Int_t row)
AliTRDCalSingleChamberStatus*GetPadStatusROC(Int_t det)
TObjArray*GetPHQ()
const AliTRDCalPID*GetPIDObject(AliTRDpidUtil::ETRDPIDMethod m)
AliTRDPIDResponse*GetPIDResponse(AliTRDPIDResponse::ETRDPIDMethod m)
Int_tGetPRFbin() const
Float_tGetPRFhi() const
Float_tGetPRFlo() const
AliTRDCalROC*GetPRFROC(Int_t det)
Float_tGetPRFWidth(Int_t det, Int_t col, Int_t row)
AliTRDrecoParam*GetRecoParam(Int_t* eventtype)
Long64_tGetRun() const
Float_t*GetSampledPRF() const
Float_tGetT0(Int_t det, Int_t col, Int_t row)
Float_tGetT0Average(Int_t det)
const AliTRDCalDet*GetT0Det()
AliTRDCalROC*GetT0ROC(Int_t det)
virtual const char*TObject::GetTitle() const
AliTRDtrapConfig*GetTrapConfig()
voidGetTrapConfig(TString& name, TString& version)
virtual UInt_tTObject::GetUniqueID() const
Float_tGetVdrift(Int_t det, Int_t col, Int_t row)
Float_tGetVdriftAverage(Int_t det)
const AliTRDCalDet*GetVdriftDet()
AliTRDCalROC*GetVdriftROC(Int_t det)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tHasOnlineFilterGain()
Bool_tHasOnlineFilterPedestal()
Bool_tHasOnlineTailCancellation()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
static AliTRDcalibDB*Instance()
voidInvalidate()
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsChamberBadCalibrated(Int_t det)
Bool_tIsChamberGood(Int_t det)
Bool_tIsChamberNoData(Int_t det)
Bool_tIsChamberNotCalibrated(Int_t det)
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsHalfChamberNoData(Int_t det, Int_t side)
Bool_tTObject::IsOnHeap() const
Bool_tIsPadBridgedLeft(Int_t det, Int_t col, Int_t row)
Bool_tIsPadBridgedRight(Int_t det, Int_t col, Int_t row)
Bool_tIsPadMasked(Int_t det, Int_t col, Int_t row)
Bool_tIsPadNotConnected(Int_t det, Int_t col, Int_t row)
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
Int_tPadResponse(Double_t signal, Double_t dist, Int_t layer, Double_t* pad) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetRun(Long64_t run)
voidSetTrapConfig(AliTRDtrapConfig* trapcfg)
voidSetTrapConfig(const TString name, const TString version)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
static voidTerminate()
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
const TObject*CacheCDBEntry(Int_t id, const Char_t* cdbPath)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
const TObject*GetCachedCDBObject(Int_t id)
AliCDBEntry*GetCDBEntry(const Char_t* cdbPath)
Int_tGetNumberOfTimeBinsDCSBoard()
AliTRDtrapConfig*LoadTrapConfig(const TString& name = "", const TString& version = "")
voidTObject::MakeZombie()
voidSamplePRF()

Data Members

public:
enum { kNlayer
kNstack
kNsector
kNdet
kFltrSet
kReadout
kTimebin
kTrkMode
kTrigSet
kAddOpti
kIDVdriftPad
kIDVdriftChamber
kIDExBChamber
kIDT0Pad
kIDT0Chamber
kIDGainFactorPad
kIDGainFactorChamber
kIDOnlineGainFactor
kIDNoiseChamber
kIDNoisePad
kIDPRFWidth
kIDFEE
kIDTrapConfig
kIDChamberPos
kIDStackPos
kIDSuperModulePos
kIDPIDNN
kIDPIDLQ
kIDPIDLQ1D
kIDRecoParam
kIDMonitoringData
kIDChamberStatus
kIDPadStatus
kIDDCS
kIDAttach
kIDPHQ
kCDBCacheSize
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TObject*fCDBCache[26]Cache for calibration objects.
AliCDBEntry*fCDBEntries[26]Cache for CDB entries
Int_tfOnlineGainTableIDID for online gain table
AliTRDPIDResponse*fPIDResponseTRD PID Response function
Int_tfPRFbinNumber of bins for the PRF
Float_tfPRFhiHigher boundary of the PRF
Float_tfPRFloLower boundary of the PRF
Int_tfPRFpadDistance to next pad in PRF
Float_t*fPRFsmp! Sampled pad response
Float_tfPRFwidBin width of the sampled PRF
Long64_tfRunRun Number
AliTRDtrapConfig*fTrapConfigTRAP configuration
TStringfTrapConfigNamename of the TRAPconfig
TStringfTrapConfigVersionversion of the TRAPconfig
static AliTRDcalibDB*fgInstanceInstance of this class (singleton implementation)
static Bool_tfgTerminatedDefines if this class has already been terminated

Class Charts

Inheritance Chart:
TObject
AliTRDcalibDB

Function documentation

AliTRDcalibDB* Instance()
 Singleton implementation
 Returns an instance of this class, it is created if neccessary

void Terminate()
 Singleton implementation
 Deletes the instance of this class and sets the terminated flag,
 instances cannot be requested anymore
 This function can be called several times.

AliTRDcalibDB()
 Default constructor

 TODO Default runnumber is set to 0, this should be changed later
      to an invalid value (e.g. -1) to prevent
 TODO invalid calibration data to be used.

AliTRDcalibDB(const AliTRDcalibDB& c)
 Copy constructor (not that it make any sense for a singleton...)

AliTRDcalibDB & operator=(const AliTRDcalibDB& c)
 Assignment operator (same as above ...)

const TObject * GetCachedCDBObject(Int_t id)
 Retrieves a cdb object with the given id. The objects are cached as
 long as the run number is not changed.

 Put together the available objects here by using the lines
   a) For usual calibration objects:
      case kID<Name> :
        return CacheCDBEntry(kID<Name>,"TRD/Calib/<Path>");
        break;
      See function CacheCDBEntry for details.
   and
   b) For calibration data which depends on two objects: One containing
      a value per detector and one the local fluctuations per pad:
      case kID<Name> :
        return CacheMergeCDBEntry(kID<Name>,"TRD/Calib/<padPath>","TRD/Calib/<chamberPath>");
        break;
      See function CacheMergeCDBEntry for details.

AliCDBEntry * GetCDBEntry(const Char_t* cdbPath)
 Retrieves an entry with path <cdbPath> from the CDB.

const TObject * CacheCDBEntry(Int_t id, const Char_t* cdbPath)
 Caches the entry <id> with cdb path <cdbPath>

void SetRun(Long64_t run)
 Sets current run number. Calibration data is read from the corresponding file.
 When the run number changes the caching is invalidated.

void Invalidate()
 Invalidates cache (when run number is changed).

Float_t GetNoise(Int_t det, Int_t col, Int_t row)
 Returns the noise level in ADC counts for the given pad.

AliTRDCalROC * GetNoiseROC(Int_t det)
 Returns the Vdrift calibration object for a given ROC
 containing one number per pad

const AliTRDCalDet * GetNoiseDet()
 Returns the Vdrift calibration object
 containing one number per detector

Float_t GetVdrift(Int_t det, Int_t col, Int_t row)
 Returns the drift velocity for the given pad.

AliTRDCalROC * GetVdriftROC(Int_t det)
 Returns the Vdrift calibration object for a given ROC
 containing one number per pad

const AliTRDCalDet * GetVdriftDet()
 Returns the Vdrift calibration object
 containing one number per detector

TObjArray * GetPHQ()
return PHQ calibration object

Float_t GetVdriftAverage(Int_t det)
 Returns the average drift velocity for the given detector

const AliTRDCalDet * GetExBDet()
 Returns the exB calibration object
 containing one number per detector

Float_t GetT0(Int_t det, Int_t col, Int_t row)
 Returns t0 for the given pad.

AliTRDCalROC * GetT0ROC(Int_t det)
 Returns the t0 calibration object for a given ROC
 containing one number per pad

const AliTRDCalDet * GetT0Det()
 Returns the t0 calibration object
 containing one number per detector

Float_t GetT0Average(Int_t det)
 Returns the average t0 for the given detector

AliTRDCalOnlineGainTableROC* GetOnlineGainTableROC(Int_t det)
 Returns the online gain factor table for a given ROC.

Float_t GetOnlineGainFactor(Int_t det, Int_t col, Int_t row)
 Returns the online gain factor for the given pad.

AliTRDCalROC * GetGainFactorROC(Int_t det)
 Returns the gain factor calibration object for a given ROC

Float_t GetGainFactor(Int_t det, Int_t col, Int_t row)
 Returns the gain factor for the given pad.

const AliTRDCalDet * GetGainFactorDet()
 Returns the gain factor calibration object
 containing one number per detector

Float_t GetGainFactorAverage(Int_t det)
 Returns the average gain factor for the given detector

AliTRDCalROC * GetPRFROC(Int_t det)
 Returns the PRF calibration object for a given ROC
 containing one number per pad

Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row)
 Returns the PRF width for the given pad.

Int_t ExtractTimeBinsFromString(TString tbstr)
 Check if there is any content in the string first
Int_t GetNumberOfTimeBinsDCSBoard()
 This is an old way to extract the number of time bins,
 only to be used as a fallback to see whether there's
 a patched OCDB object!
Int_t GetNumberOfTimeBinsDCS()
 Returns number of time bins from the DCS

void GetFilterType(TString& filterType)
 Returns the filter type

Int_t GetOnlineGainTableID()
 Get the gain table ID from the DCS

void GetGlobalConfiguration(TString& config)
 Get Configuration from the DCS

void GetGlobalConfigurationByChamber(TString& config, Int_t par, Int_t opt = 0)
 Get Configuration from the DCS

void GetGlobalConfigurationVersion(TString& version)
 Get Version of Configuration from the DCS

Int_t GetNumberOfParsDCS(TString cname, Char_t delimiter = '_')
 Get the number of configuration parameters from the DCS config
Int_t GetNumberOfOptsDCS(TString cname, Int_t cfgType)
 Get the number of options of a given configuration parameter from DCS
void GetDCSConfigParOption(TString cname, Int_t cfgType, Int_t option, TString& cfgo)
 Get a configuration (see enum in header file) or the options of a configuration
 option == 0 returns the configuration itself
 option >  0 returns the optional parameter Nr. (option) of the configuration (cfgType)

Bool_t HasOnlineFilterPedestal()
 Checks whether pedestal filter was applied online

Bool_t HasOnlineFilterGain()
 Checks whether online gain filter was applied

Bool_t HasOnlineTailCancellation()
 Checks whether online tail cancellation was applied

Char_t GetPadStatus(Int_t det, Int_t col, Int_t row)
 Returns the status of the given pad

AliTRDCalSingleChamberStatus* GetPadStatusROC(Int_t det)
 Returns the pad status calibration object for a given ROC

Char_t GetChamberStatus(Int_t det)
 Returns the status of the given chamber

AliTRDrecoParam* GetRecoParam(Int_t* eventtype)
 Returns the TRD reconstruction parameters from the OCDB

Bool_t IsPadMasked(Int_t det, Int_t col, Int_t row)
 Returns status, see name of functions for details ;-)

Bool_t IsPadBridgedLeft(Int_t det, Int_t col, Int_t row)
 Returns status, see name of functions for details ;-)

Bool_t IsPadBridgedRight(Int_t det, Int_t col, Int_t row)
 Returns status, see name of functions for details ;-)

Bool_t IsPadNotConnected(Int_t det, Int_t col, Int_t row)
 Returns status, see name of functions for details ;-)

Bool_t IsChamberGood(Int_t det)
 Returns status, see name of functions for details ;-)

Bool_t IsChamberNoData(Int_t det)
 Returns status, see name of functions for details ;-)

Bool_t IsHalfChamberNoData(Int_t det, Int_t side)
 Returns status, see name of functions for details ;-)

Bool_t IsChamberBadCalibrated(Int_t det)
 Returns status, see name of functions for details ;-)

Bool_t IsChamberNotCalibrated(Int_t det)
 Returns status, see name of functions for details ;-)

const AliTRDCalPID * GetPIDObject(AliTRDpidUtil::ETRDPIDMethod m)
 Returns the object storing the distributions for PID with likelihood

AliTRDPIDResponse * GetPIDResponse(AliTRDPIDResponse::ETRDPIDMethod m)
 Returns the PID response object for 1D-LQ

const AliTRDCalTrkAttach* GetAttachObject()
 Returns the object storing likelihood distributions for cluster to track attachment

const AliTRDCalMonitoring * GetMonitoringObject()
 Returns the object storing the monitoring data

void SamplePRF()
 Samples the pad response function (should maybe go somewhere else ...)

Int_t PadResponse(Double_t signal, Double_t dist, Int_t layer, Double_t* pad) const
 Applies the pad response
 So far this is the fixed parametrization and should be replaced by
 something dependent on calibration values

AliTRDtrapConfig* GetTrapConfig()
 return an existing TRAPconfig or load it from the OCDB
 in case of failure, a default TRAPconfig is created
AliTRDtrapConfig* LoadTrapConfig(const TString& name = "", const TString& version = "")
 try to load the specified configuration from the OCDB
 if it fails, or it does not exist, return null
Long64_t GetRun() const
{ return fRun; }
Float_t* GetSampledPRF() const
{ return fPRFsmp; }
Int_t GetPRFbin() const
{ return fPRFbin; }
Float_t GetPRFlo() const
{ return fPRFlo; }
Float_t GetPRFhi() const
{ return fPRFhi; }
AliTRDtrapConfig* GetTrapConfig()
void SetTrapConfig(const TString name, const TString version)
{ fTrapConfigName = name; fTrapConfigVersion = version; }
void SetTrapConfig(AliTRDtrapConfig* trapcfg)
{ fTrapConfig = trapcfg; }