]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDcalibDB.h
Merge with TRDdev.2.0
[u/mrichter/AliRoot.git] / TRD / AliTRDcalibDB.h
index 1049e8dddd4c3917124e0719d1489f45e5447410..449821aa614000baf21771a4a8f6e963d426cb3f 100644 (file)
 #include "AliTRDpidUtil.h"
 #endif
 
+#ifndef ALITRDPIDRESPONSE_H
+#include "AliTRDPIDResponse.h"
+#endif
+
+#include "AliTRDCalTrapConfig.h"
+#include "AliTRDtrapConfig.h"
+
+class TString;
+
 class AliCDBEntry;
 
 class AliTRDrecoParam;
+class AliTRDCalTrkAttach;
 class AliTRDCalPID;
 class AliTRDCalMonitoring;
 class AliTRDCalROC;
 class AliTRDCalDet;
 class AliTRDCalSingleChamberStatus;
-class TString;
+class AliTRDCalOnlineGainTableROC;
+
 class AliTRDcalibDB : public TObject {
 
  public:
@@ -37,6 +48,13 @@ class AliTRDcalibDB : public TObject {
        , kNsector =  18
        , kNdet    = 540 };
   
+  enum { kFltrSet = 1
+       , kReadout
+       , kTimebin
+       , kTrkMode
+       , kTrigSet
+       , kAddOpti };
+
   static AliTRDcalibDB               *Instance();
   static void                         Terminate();
 
@@ -51,6 +69,8 @@ class AliTRDcalibDB : public TObject {
   Float_t                             GetVdriftAverage(Int_t det);
         AliTRDCalROC                 *GetVdriftROC(Int_t det);
   const AliTRDCalDet                 *GetVdriftDet();
+  TObjArray                          *GetPHQ();
+  const AliTRDCalDet                 *GetExBDet();
 
   Float_t                             GetT0(Int_t det, Int_t col, Int_t row);
   Float_t                             GetT0Average(Int_t det);
@@ -62,6 +82,9 @@ class AliTRDcalibDB : public TObject {
   AliTRDCalROC                       *GetGainFactorROC(Int_t det);
   const AliTRDCalDet                 *GetGainFactorDet();
 
+  Float_t                             GetOnlineGainFactor(Int_t det, Int_t col, Int_t row);
+  AliTRDCalOnlineGainTableROC        *GetOnlineGainTableROC(Int_t det);
+
   AliTRDCalROC                       *GetPRFROC(Int_t det);
   Float_t                             GetPRFWidth(Int_t det, Int_t col, Int_t row);
 
@@ -70,13 +93,25 @@ class AliTRDcalibDB : public TObject {
   Float_t                             GetPRFlo() const      { return fPRFlo;  };
   Float_t                             GetPRFhi() const      { return fPRFhi;  };
 
-  Int_t                               GetNumberOfTimeBins();
+  Int_t                               ExtractTimeBinsFromString(TString tbstr);
   Int_t                               GetNumberOfTimeBinsDCS();
   void                                GetFilterType(TString &filterType);
+  void                                GetGlobalConfiguration(TString &config);
+  void                                GetGlobalConfigurationVersion(TString &version);
+  Int_t                               GetNumberOfParsDCS(TString cname, Char_t delimiter='_');
+  Int_t                               GetNumberOfOptsDCS(TString cname, Int_t cfgType);
+  void                                GetDCSConfigParOption(TString cname, Int_t cfgType, Int_t option, TString &cfgo);
+
+  Int_t                               GetOnlineGainTableID();
+
+  Bool_t                              HasOnlineFilterPedestal();
+  Bool_t                              HasOnlineFilterGain();
+  Bool_t                              HasOnlineTailCancellation();
 
   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);
 
   Char_t                              GetChamberStatus(Int_t det);
 
@@ -85,40 +120,57 @@ class AliTRDcalibDB : public TObject {
   Bool_t                              IsPadBridgedRight(Int_t det, Int_t col, Int_t row);
   Bool_t                              IsPadNotConnected(Int_t det, Int_t col, Int_t row);
   
-  Bool_t                              IsChamberInstalled(Int_t det);
-  Bool_t                              IsChamberMasked(Int_t det);
+  Bool_t                              IsChamberGood(Int_t det);
+  Bool_t                              IsChamberNoData(Int_t det);
+  Bool_t                              IsHalfChamberNoData(Int_t det, Int_t side);
+  Bool_t                              IsChamberBadCalibrated(Int_t det);
+  Bool_t                              IsChamberNotCalibrated(Int_t det);
 
   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                               PadResponse(Double_t signal, Double_t dist
                                                 , Int_t layer, Double_t *pad) const;
 
+  AliTRDtrapConfig*                   GetTrapConfig();
+  void                                GetTrapConfig(TString &name, TString &version) { name = fTrapConfigName; version = fTrapConfigVersion; }
+  void                                SetTrapConfig(const TString name, const TString version) { fTrapConfigName = name; fTrapConfigVersion = version; }
+  void                                SetTrapConfig(AliTRDtrapConfig *trapcfg) { fTrapConfig = trapcfg; }
+
  protected:
 
+  AliTRDtrapConfig*                   LoadTrapConfig(const TString &name = "", const TString &version = "");
+
   // For caching see also implentation of GetCachedCDBObject in the .cxx file
-  enum { kCDBCacheSize = 20 };   // Number of cached objects
   enum { kIDVdriftPad = 0
        , kIDVdriftChamber
+       , kIDExBChamber
        , kIDT0Pad
        , kIDT0Chamber
        , kIDGainFactorPad
        , kIDGainFactorChamber
+       , kIDOnlineGainFactor
        , kIDNoiseChamber
        , kIDNoisePad
        , kIDPRFWidth
        , kIDFEE
+       , kIDTrapConfig
        , kIDChamberPos
        , kIDStackPos
        , kIDSuperModulePos
        , kIDPIDNN
        , kIDPIDLQ
+       , kIDPIDLQ1D
        , kIDRecoParam
        , kIDMonitoringData
        , kIDChamberStatus
        , kIDPadStatus
-       , kIDDCS };         // IDs of cached objects
+       , kIDDCS
+       , kIDAttach
+       , kIDPHQ
+       , kCDBCacheSize };         // IDs of cached objects
 
   const TObject *GetCachedCDBObject(Int_t id);
   
@@ -135,13 +187,21 @@ class AliTRDcalibDB : public TObject {
   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 
+
+  AliTRDtrapConfig*     fTrapConfig;                //  TRAP configuration
+  TString               fTrapConfigName;            //  name of the TRAPconfig
+  TString               fTrapConfigVersion;         //  version of the TRAPconfig
   
  private:
 
@@ -150,8 +210,9 @@ class AliTRDcalibDB : public TObject {
   AliTRDcalibDB &operator=(const AliTRDcalibDB &c); 
   virtual ~AliTRDcalibDB();
 
-  ClassDef(AliTRDcalibDB, 4)                         //  Provides central access to the CDB
+  ClassDef(AliTRDcalibDB, 8)                        //  Provides central access to the CDB
 
 };
 
 #endif
+