]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add SetReference method
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 May 2010 12:44:10 +0000 (12:44 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 May 2010 12:44:10 +0000 (12:44 +0000)
EMCAL/AliCaloCalibPedestal.cxx
EMCAL/AliCaloCalibPedestal.h

index 8311741ce4cb38d61099cf4a89e688bac4a03424..b2f1cfc7b5d602d555ab5256d97736ac636e0255 100644 (file)
@@ -676,6 +676,24 @@ Bool_t AliCaloCalibPedestal::LoadReferenceCalib(TString fileName, TString object
   return kTRUE;//We succesfully loaded the object
 }
 
+
+//_____________________________________________________________________
+Bool_t AliCaloCalibPedestal::SetReference(AliCaloCalibPedestal *ref)
+{
+  if (fReference) delete fReference;//Delete the reference object, if it already exists
+  fReference = 0;
+  
+  fReference = ref;
+  if (!fReference || (fReference->GetDetectorType() != fDetType)) {
+    if (fReference) delete fReference;//Delete the object, in case we had an object of the wrong type
+    fReference = 0;
+    return kFALSE;
+  }
+
+  return kTRUE;//We succesfully loaded the object
+}
+
 //_____________________________________________________________________
 void AliCaloCalibPedestal::ValidateComparisonProfiles()
 {
@@ -758,7 +776,7 @@ void AliCaloCalibPedestal::ValidateComparisonProfiles()
                                              fRows, fRowMin, fRowMax,"s"));
 
     //LED Ref/Mon pedestals, low gain
-    name = "hPedestalLEDReflowgain";
+    name = "hPedestalLEDReflowgainRatio";
     name += i;
     title = "Pedestal ratio LEDRef, low gain, module ";
     title += i; 
index 14329c36192b14540eb96e2ebcee3b89efb43de6..74727634dbf7a4f9bfce43ded7725c4573c1f960 100644 (file)
@@ -153,6 +153,7 @@ class AliCaloCalibPedestal : public TObject {
   Bool_t LoadReferenceCalib(TString fileName, TString objectName); //Loads another AliCaloCalibPedestal by name "objectName" from the file "fileName", for reference
   void ComputeDiffAndRatio();//Actually computes the difference and ratio into the histo's in memory
   AliCaloCalibPedestal * GetReference() const {return fReference;}; //Get the reference object. Needed for debug, will probably be removed later
+  Bool_t SetReference(AliCaloCalibPedestal *ref);
   void ComputeDeadTowers(const char * deadMapFile = 0);//Computes the dead tower values
   void ComputeHotAndWarningTowers(const char * hotMapFile = 0);//Computes the hot tower values