]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMaker.cxx
removed the gcc4.3 warnings
[u/mrichter/AliRoot.git] / STEER / AliQADataMaker.cxx
index 18011327bfecc55be80fb37d9e9bb62b84219598..bbd3da17549de6d71eef01f35951835ff1be842b 100644 (file)
@@ -29,6 +29,7 @@
 #include <TList.h> 
 #include <TTree.h>
 #include <TClonesArray.h>
+#include <TParameter.h>
 
 // --- Standard library ---
 
@@ -47,9 +48,11 @@ AliQADataMaker::AliQADataMaker(const char * name, const char * title) :
   fOutput(0x0),
   fDetectorDir(0x0),
   fDetectorDirName(""), 
-  fCurrentCycle(-1), 
+  fCurrentCycle(0), 
   fCycle(9999999), 
   fCycleCounter(0), 
+  fWriteExpert(kFALSE),
+  fParameterList(0x0), 
   fRun(0)
 {
   // ctor
@@ -65,6 +68,8 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) :
   fCurrentCycle(qadm.fCurrentCycle), 
   fCycle(qadm.fCycle), 
   fCycleCounter(qadm.fCycleCounter), 
+  fWriteExpert(qadm.fWriteExpert),
+  fParameterList(qadm.fParameterList),  
   fRun(qadm.fRun)
 {
   //copy ctor
@@ -72,23 +77,34 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) :
 }
 
 //____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list) 
+Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert, const Bool_t saveForCorr
 { 
        // Set histograms memory resident and add to the list
        // Maximm allowed is 10000
         TString className(hist->ClassName()) ;
-        if( ! className.BeginsWith("TH") ) {
-               AliError(Form("QA data Object must be a generic TH1 ROOT object and not %s", className.Data())) ; 
-               return -1 ;
+        if( ! className.BeginsWith("T") ) {
+               AliError(Form("QA data Object must be a generic ROOT object and not %s", className.Data())) ; 
+//             return -1 ;
        }
        if ( index > 10000 ) {
                AliError("Max number of authorized QA objects is 10000") ; 
                return -1 ; 
        } else {
                hist->SetDirectory(0) ; 
-               list->AddAtAndExpand(hist, index) ; 
-               return list->GetLast() ;
-       }
+    
+    if (expert) 
+      hist->SetBit(AliQA::GetExpertBit()) ; 
+               
+    list->AddAtAndExpand(hist, index) ; 
+    char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;  
+    TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
+    if(saveForCorr) {  
+      if ( ! fParameterList )
+        fParameterList = new TList() ; 
+      fParameterList->Add(p) ;
+    }
+    return list->GetLast() ;
+  }
 }
 
 //____________________________________________________________________________
@@ -128,12 +144,3 @@ TObject * AliQADataMaker::GetData(TObjArray * list, const Int_t index)
                return NULL ;           
        }
 }
-
-//____________________________________________________________________________
-void AliQADataMaker::Reset(const Bool_t sameCycle) 
-{ 
-  // Resets defaut value of data members 
-       if (!sameCycle) {
-               fCycleCounter = 0 ; 
-       }
-}