+ //_____________________________________________________________________________
+void AliQACheckerBase::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB)
+{
+ // Opens and returns the file with the reference data
+ dirFile = NULL ;
+ TString refStorage(AliQAv1::GetQARefStorage()) ;
+ if (!refStorage.Contains(AliQAv1::GetLabLocalOCDB()) && !refStorage.Contains(AliQAv1::GetLabAliEnOCDB())) {
+ AliError(Form("%s is not a valid location for reference data", refStorage.Data())) ;
+ return ;
+ } else {
+ AliQAManager* manQA = AliQAManager::QAManager(AliQAv1::GetTaskIndex(task)) ;
+ dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ dirOCDB[specie] = NULL ;
+ if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ AliQAv1::SetQARefDataDirName(specie) ;
+ if ( ! manQA->GetLock() ) {
+ manQA->SetDefaultStorage(AliQAv1::GetQARefStorage()) ;
+ manQA->SetSpecificStorage("*", AliQAv1::GetQARefStorage()) ;
+ manQA->SetRun(AliCDBManager::Instance()->GetRun()) ;
+ manQA->SetLock() ;
+ }
+ char * detOCDBDir = Form("%s/%s/%s", det, AliQAv1::GetRefOCDBDirName(), AliQAv1::GetRefDataDirName()) ;
+ AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ;
+ if (entry) {
+ TList * listDetQAD =static_cast<TList *>(entry->GetObject()) ;
+ if ( strcmp(listDetQAD->ClassName(), "TList") != 0 ) {
+ AliError(Form("Expected a Tlist and found a %s for detector %s", listDetQAD->ClassName(), det)) ;
+ listDetQAD = NULL ;
+ continue ;
+ }
+ if ( listDetQAD ) {
+ TIter next(listDetQAD) ;
+ TObjArray * ar ;
+ while ( (ar = (TObjArray*)next()) )
+ dirOCDB[specie] = static_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
+ }
+ }
+ }
+ }
+}
+
+//____________________________________________________________________________
+void AliQACheckerBase::PrintExternParam()
+{
+ // Print the list of external parameter list
+ TIter next(fExternParamList) ;
+ TParameter<double> *pp ;
+ TString printit("\n") ;
+ while( (pp = (TParameter<double>*)next()) )
+ printit += Form("%s = %f\n", pp->GetName(), pp->GetVal());
+ AliInfo(Form("%s", printit.Data())) ;
+}
+
+//____________________________________________________________________________
+void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, AliDetectorRecoParam * recoParam)
+{
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Processing %s", AliQAv1::GetAliTaskName(index))) ;
+
+ Double_t * rv = NULL ;
+ rv = Check(index, recoParam) ;
+ SetQA(index, rv) ;
+
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Test result of %s", AliQAv1::GetAliTaskName(index))) ;
+
+ if (rv)
+ delete [] rv ;
+ Finish() ;
+}
+