#include <TList.h>
#include <TTree.h>
#include <TClonesArray.h>
+#include <TParameter.h>
// --- Standard library ---
fOutput(0x0),
fDetectorDir(0x0),
fDetectorDirName(""),
- fCurrentCycle(-1),
+ fCurrentCycle(0),
fCycle(9999999),
fCycleCounter(0),
+ fWriteExpert(kFALSE),
+ fParameterList(0x0),
fRun(0)
{
// ctor
fCurrentCycle(qadm.fCurrentCycle),
fCycle(qadm.fCycle),
fCycleCounter(qadm.fCycleCounter),
+ fWriteExpert(qadm.fWriteExpert),
+ fParameterList(qadm.fParameterList),
fRun(qadm.fRun)
{
//copy ctor
}
//____________________________________________________________________________
-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() ;
+ }
}
//____________________________________________________________________________
return NULL ;
}
}
-
-//____________________________________________________________________________
-void AliQADataMaker::Reset(const Bool_t sameCycle)
-{
- // Resets defaut value of data members
- if (!sameCycle) {
- fCycleCounter = 0 ;
- }
-}