//____________________________________________________________________________
AliCorrQADataMakerRec::AliCorrQADataMakerRec(AliQADataMaker ** qadm ) :
- AliQADataMakerRec("Corr", "Corr Quality Assurance Data Maker"),
+AliQADataMakerRec(AliQA::GetDetName(AliQA::kCORR), "Corr Quality Assurance Data Maker"),
fMaxRawVar(0),
fqadm(qadm)
{
const TString AliQA::fkgRefOCDBDirName = "Ref" ;
TString AliQA::fkgRefDataDirName = "" ;
const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20" ;
+const TString AliQA::fkgExpert = "QAExpErT" ;
//____________________________________________________________________________
AliQA::AliQA() :
const Bool_t CheckFatal() const ;
static void Close() ;
static const char * GetAliTaskName(ALITASK_t tsk) ;
+ static const TString GetExpert() { return fkgExpert ; }
static const TString GetLabLocalFile() { return fkgLabLocalFile ; }
static const TString GetLabLocalOCDB() { return fkgLabLocalOCDB ; }
static const TString GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; }
static TString fgQAResultFileName ; //! the output file where the QA results are stored
static TString fgRTNames[] ; //! list of Run Type names
static TString fgTaskNames[] ; //! list of tasks names
+ static const TString fkgExpert ; //! name for the expert directory
static const TString fkgLabLocalFile ; //! label to identify a file as local
static const TString fkgLabLocalOCDB ; //! label to identify a file as local OCDB
static const TString fkgLabAliEnOCDB ; //! label to identify a file as AliEn OCDB
}
//____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t saveForCorr)
+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
return -1 ;
} else {
hist->SetDirectory(0) ;
+ if (expert) {
+ TString name(hist->GetTitle()) ;
+ name.Append(AliQA::GetExpert()) ;
+ hist->SetTitle(name) ;
+ }
list->AddAtAndExpand(hist, index) ;
char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;
TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
AliQADataMaker(const AliQADataMaker& qadm) ;
virtual ~AliQADataMaker() {} // dtor
- virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index) = 0 ;
- virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index) = 0 ;
- virtual Int_t Add2HitsList(TH1 * hist, const Int_t index) = 0 ;
- virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index) = 0 ;
- virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t saveForCorr = kFALSE) = 0 ;
- virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index) = 0 ;
+ virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
+ virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
+ virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
+ virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
+ virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) = 0 ;
+ virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
virtual void Exec(AliQA::TASKINDEX_t, TObject * data) = 0 ;
virtual void EndOfCycle() = 0 ;
virtual void EndOfCycle(AliQA::TASKINDEX_t) = 0 ;
protected:
- Int_t Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t saveForCorr = kFALSE) ;
+ Int_t Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
virtual void DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ;
virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * obj ) = 0 ;
TObject * GetData(TObjArray * list, const Int_t index) ;
subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if ( subDir ) {
subDir->cd() ;
- if (list)
- list->Write() ;
- if (fObject) {
+ if (list) {
+ TIter next(list) ;
+ TH1 * obj ;
+ while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ TString name(obj->GetTitle()) ;
+ if (!name.Contains(AliQA::GetExpert())) {
+ obj->Write() ;
+ }
+ }
+ TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
+ if ( expertDir ) {
+ expertDir->cd() ;
+ next.Reset() ;
+ while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ TString name(obj->GetTitle()) ;
+ if (!name.Contains(AliQA::GetExpert()))
+ continue ;
+ name.ReplaceAll(AliQA::GetExpert(), "") ;
+ obj->SetTitle(name) ;
+ obj->Write() ;
+ }
+ }
+ }
+ if (fObject && GetName() == AliQA::kCORR) {
+ subDir->cd() ;
fObject->Write() ;
}
}
TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (!subDir)
subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;
+
+ TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
+ if (!expertDir)
+ expertDir = subDir->mkdir(AliQA::GetExpert()) ;
+
subDir->cd() ;
+
StartOfDetectorCycle() ;
}
AliQADataMakerRec& operator = (const AliQADataMakerRec& qadm) ;
virtual ~AliQADataMakerRec() ; // dtor
- virtual Int_t Add2DigitsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; }
- virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fESDsQAList) ; }
- virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; }
- virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
- virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t saveForCorr = kFALSE) { return Add2List(hist, index, fRawsQAList, saveForCorr) ; }
- virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; }
+ virtual Int_t Add2DigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; }
+ virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) { return Add2List(hist, index, fESDsQAList, expert) ; }
+ virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; }
+ virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) { return Add2List(hist, index, fRecPointsQAList, expert) ; }
+ virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) { return Add2List(hist, index, fRawsQAList, expert, saveForCorr) ; }
+ virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; }
virtual void Exec(AliQA::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQA::TASKINDEX_t task) ;
TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (subDir) {
subDir->cd() ;
- list->Write() ;
- }
+ TIter next(list) ;
+ TH1 * obj ;
+ while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ TString name(obj->GetTitle()) ;
+ if (name.Contains(AliQA::GetExpert())) {
+ name.ReplaceAll(AliQA::GetExpert(), "") ;
+ obj->SetTitle(name) ;
+ obj->Write() ;
+ }
+ }
+ TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
+ if ( expertDir ) {
+ expertDir->cd() ;
+ next.Reset() ;
+ while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ TString name(obj->GetTitle()) ;
+ if (name.Contains(AliQA::GetExpert()))
+ continue ;
+ name.ReplaceAll(AliQA::GetExpert(), "") ;
+ obj->SetTitle(name) ;
+ obj->Write() ;
+ }
+ }
+ }
ResetCycle() ;
}
TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (!subDir)
subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;
+
+ TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
+ if (!expertDir)
+ expertDir = subDir->mkdir(AliQA::GetExpert()) ;
+
subDir->cd() ;
StartOfDetectorCycle() ;
AliQADataMakerSim& operator = (const AliQADataMakerSim& qadm) ;
virtual ~AliQADataMakerSim() ; // dtor
- virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fDigitsQAList) ; }
- virtual Int_t Add2ESDsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; }
- virtual Int_t Add2HitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fHitsQAList) ; }
- virtual Int_t Add2RecPointsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; }
- virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t saveForCorr = kFALSE) { return -1 ; }
- virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fSDigitsQAList) ; }
+ virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) { return Add2List(hist, index, fDigitsQAList, expert) ; }
+ virtual Int_t Add2ESDsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; }
+ virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) { return Add2List(hist, index, fHitsQAList, expert) ; }
+ virtual Int_t Add2RecPointsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; }
+ virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*saveForCorr = kFALSE*/) { return -1 ; }
+ virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) { return Add2List(hist, index, fSDigitsQAList, expert) ; }
virtual void Exec(AliQA::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQA::TASKINDEX_t task) ;