fRunInfoOwner(kFALSE),
fRefFile(0x0),
fFoundDetectors("."),
- fEventSpecie(AliRecoParam::kDefault)
+ fEventSpecie(AliRecoParam::kDefault),
+ fRun(0)
{
// ctor: initialise checkers and open the data file
for (Int_t det = 0 ; det < AliQAv1::kNDET ; det++)
fRunInfoOwner(kFALSE),
fRefFile(qac.fRefFile),
fFoundDetectors(qac.fFoundDetectors),
- fEventSpecie(qac.fEventSpecie)
+ fEventSpecie(qac.fEventSpecie),
+ fRun(qac.fRun)
{
// copy constructor
} else if (det == AliQAv1::kCORR) {
qac = new AliCorrQAChecker() ;
} else {
- AliDebug(1, Form("Retrieving QA checker for %s", detName.Data())) ;
+ AliDebugClass(AliQAv1::GetQADebugLevel(), Form("Retrieving QA checker for %s", detName.Data())) ;
TPluginManager* pluginManager = gROOT->GetPluginManager() ;
TString qacName = "Ali" + detName + "QAChecker" ;
TPluginHandler* pluginHandler = pluginManager->FindHandler("AliQAChecker", detName.Data());
// if not, add a plugin for it
if (!pluginHandler) {
- //AliInfo(Form("defining plugin for %s", qacName.Data()));
+ //AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qacName.Data()));
TString libs = gSystem->GetLibraries();
if (libs.Contains("lib" + detName + "base.so") || (gSystem->Load("lib" + detName + "base.so") >= 0))
AliError(Form("%s is not a valid location for reference data", refStorage.Data())) ;
return ;
} else {
- AliQAManager* manQA = AliQAManager::QAManager() ;
+ AliQAManager* manQA = AliQAManager::QAManager(AliQAv1::GetTaskIndex(task)) ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
continue ;
AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ;
if (entry) {
dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;
- TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ 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)) ;
+ continue ;
+ }
TIter next(listDetQAD) ;
TObjArray * ar ;
while ( (ar = (TObjArray*)next()) )
if ( listDetQAD )
- dirOCDB[specie] = dynamic_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
+ dirOCDB[specie] = static_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
}
}
}
AliGRPObject* grpObject = 0x0;
if (entry) {
- TMap* m = dynamic_cast<TMap*>(entry->GetObject()); // old GRP entry
+ TMap* m = static_cast<TMap*>(entry->GetObject()); // old GRP entry
if (m) {
- AliInfo("It is a map");
+ AliDebug(AliQAv1::GetQADebugLevel(), "It is a map");
//m->Print();
grpObject = new AliGRPObject();
grpObject->ReadValuesFromMap(m);
}
else {
- AliInfo("It is a new GRP object");
- grpObject = dynamic_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
+ AliDebug(AliQAv1::GetQADebugLevel(), "It is a new GRP object");
+ grpObject = static_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
}
entry->SetOwner(0);
//_____________________________________________________________________________
Bool_t AliQAChecker::Run(const char * fileName)
{
- // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, recpoints, tracksegments, recparticles and ESDs
+ // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, DigitsR, RecPoints, TrackSegments, RecParticles and ESDs
// starting from data in file
TStopwatch stopwatch;
stopwatch.Start();
TList * detKeyList = AliQAv1::GetQADataFile(fileName)->GetListOfKeys() ;
TIter nextd(detKeyList) ;
TKey * detKey ;
- while ( (detKey = dynamic_cast<TKey *>(nextd()) ) ) {
- AliDebug(1, Form("Found %s", detKey->GetName())) ;
+ while ( (detKey = static_cast<TKey *>(nextd()) ) ) {
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", detKey->GetName())) ;
//Check which detector
TString detName ;
TString detNameQA(detKey->GetName()) ;
// now search for the tasks dir
while ( (taskKey = static_cast<TKey *>(nextt()) ) ) {
TString taskName( taskKey->GetName() ) ;
- AliInfo(Form("Found %s", taskName.Data())) ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", taskName.Data())) ;
TDirectory * taskDir = detDir->GetDirectory(taskName.Data()) ;
taskDir->cd() ;
AliQACheckerBase * qac = GetDetQAChecker(det) ;
if (qac)
- AliInfo(Form("QA checker found for %s", detName.Data())) ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", detName.Data())) ;
if (!qac)
AliFatal(Form("QA checker not found for %s", detName.Data())) ;
AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ;
index = AliQAv1::kSIM ;
if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITS) )
index = AliQAv1::kSIM ;
+ if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITSR) )
+ index = AliQAv1::kREC ;
if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRECPOINTS) )
index = AliQAv1::kREC ;
if ( taskName == AliQAv1::GetTaskName(AliQAv1::kTRACKSEGMENTS) )
AliInfo("QA performed for following detectors:") ;
for ( Int_t det = 0; det < AliQAv1::kNDET; det++) {
if (fFoundDetectors.Contains(AliQAv1::GetDetName(det))) {
- printf("%s, ",AliQAv1::GetDetName(det)) ;
+ AliInfoClass(Form("%s, ",AliQAv1::GetDetName(det))) ;
fFoundDetectors.ReplaceAll(AliQAv1::GetDetName(det), "") ;
}
}
AliQACheckerBase * qac = GetDetQAChecker(det) ;
if (qac)
- AliDebug(1, Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
if (!qac)
AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ;
index = AliQAv1::kSIM ;
else if ( task == AliQAv1::kDIGITS )
index = AliQAv1::kSIM ;
+ else if ( task == AliQAv1::kDIGITSR )
+ index = AliQAv1::kREC ;
else if ( task == AliQAv1::kRECPOINTS )
index = AliQAv1::kREC ;
else if ( task == AliQAv1::kTRACKSEGMENTS )
GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ;
qac->SetRefandData(refDir, refOCDBDir) ;
qac->Run(index, list) ;
+
+ // make the image
+ qac->MakeImage(list, task, AliQAv1::Mode(task)) ;
+
return kTRUE ;
}
AliQACheckerBase * qac = GetDetQAChecker(det) ;
if (qac)
- AliDebug(1, Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
if (!qac)
AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ;
index = AliQAv1::kSIM ;
else if ( task == AliQAv1::kDIGITS )
index = AliQAv1::kSIM ;
+ else if ( task == AliQAv1::kDIGITSR )
+ index = AliQAv1::kREC ;
else if ( task == AliQAv1::kRECPOINTS )
index = AliQAv1::kREC ;
else if ( task == AliQAv1::kTRACKSEGMENTS )
GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ;
qac->SetRefandData(refDir, refOCDBDir) ;
qac->Run(index, list) ;
+
return kTRUE ;
}