Add ADCbaseline to AliTRDdigitsParam
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 12:00:47 +0000 (12:00 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 12:00:47 +0000 (12:00 +0000)
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsParam.cxx
TRD/AliTRDdigitsParam.h

index deb75da..50bf759 100644 (file)
@@ -240,6 +240,7 @@ void AliTRDdigitsManager::CreateArrays()
     }
   fDigitsParam = new AliTRDdigitsParam();
   fDigitsParam->SetNTimeBins(AliTRDSimParam::Instance()->GetNTimeBins());
+  fDigitsParam->SetADCbaseline(AliTRDSimParam::Instance()->GetADCbaseline());
 
 }
 
@@ -522,6 +523,7 @@ Bool_t AliTRDdigitsManager::ReadDigits(TTree * const tree)
                   ,AliTRDSimParam::Instance()->GetNTimeBins()));
     fDigitsParam = new AliTRDdigitsParam();
     fDigitsParam->SetNTimeBins(AliTRDSimParam::Instance()->GetNTimeBins());
+    fDigitsParam->SetADCbaseline(AliTRDSimParam::Instance()->GetADCbaseline());
   }
 
   return status;
index 52ac478..61e2d94 100644 (file)
@@ -33,6 +33,7 @@ AliTRDdigitsParam::AliTRDdigitsParam()
   :TObject()
   ,fCheckOCDB(kTRUE)
   ,fNTimeBins(0)
+  ,fADCbaseline(0)
 {
   //
   // Default constructor
@@ -58,6 +59,7 @@ AliTRDdigitsParam::AliTRDdigitsParam(const AliTRDdigitsParam &p)
   :TObject(p)
   ,fCheckOCDB(p.fCheckOCDB)
   ,fNTimeBins(p.fNTimeBins)
+  ,fADCbaseline(p.fADCbaseline)
 {
   //
   // Copy constructor
@@ -96,8 +98,9 @@ void AliTRDdigitsParam::Copy(TObject &p) const
     return;
   }  
 
-  target->fCheckOCDB = fCheckOCDB;
-  target->fNTimeBins = fNTimeBins;
+  target->fCheckOCDB   = fCheckOCDB;
+  target->fNTimeBins   = fNTimeBins;
+  target->fADCbaseline = fADCbaseline;
 
   for (Int_t i = 0; i < 540; i++) {
     target->fPretriggerPhase[i] = fPretriggerPhase[i];
index 3a8aa24..b7267fb 100644 (file)
@@ -25,21 +25,24 @@ class AliTRDdigitsParam : public TObject
 
     virtual void    Copy(TObject &p) const;
 
-            void    SetCheckOCDB(Bool_t check = kTRUE)         { fCheckOCDB = check;            }
+            void    SetCheckOCDB(Bool_t check = kTRUE)         { fCheckOCDB            = check;    }
             Bool_t  SetNTimeBins(Int_t ntb);
-            void    SetPretiggerPhase(Int_t det, UInt_t phase) { fPretriggerPhase[det] = phase; }
+            void    SetPretiggerPhase(Int_t det, UInt_t phase) { fPretriggerPhase[det] = phase;    }
+            void    SetADCbaseline(Int_t baseline)             { fADCbaseline          = baseline; }
 
-            Bool_t  CheckOCDB() const                          { return fCheckOCDB;             }
-            Int_t   GetNTimeBins() const                       { return fNTimeBins;             }
-            UInt_t  GetPretriggerPhase(Int_t det) const        { return fPretriggerPhase[det];  }
+            Bool_t  CheckOCDB() const                          { return fCheckOCDB;                }
+            Int_t   GetNTimeBins() const                       { return fNTimeBins;                }
+            UInt_t  GetPretriggerPhase(Int_t det) const        { return fPretriggerPhase[det];     }
+            Int_t   GetADCbaseline() const                     { return fADCbaseline;              }
 
   protected:
 
            Bool_t  fCheckOCDB;            //  Do a consistency check with the corresponding OCDB entry
             Int_t   fNTimeBins;            //  Number of timebins
             UInt_t  fPretriggerPhase[540]; //  Pretrigger phase for each detector
+            Int_t   fADCbaseline;          //  ADC baseline, given in ADC channels
 
-    ClassDef(AliTRDdigitsParam,2)          //  The parameters for digits
+    ClassDef(AliTRDdigitsParam,3)          //  The parameters for digits
 
 };
 #endif