MakeImage is now a method of AliCheckerBase, was AliQADataMaker before. This will...
[u/mrichter/AliRoot.git] / STEER / AliQAChecker.cxx
CommitLineData
421ab0fb 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id: */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// class for running the Quality Assurance Checker
21// //
22///////////////////////////////////////////////////////////////////////////////
23
4edbc5bc 24#include "AliCDBEntry.h"
b03591ab 25#include "AliQAManager.h"
96d67a8d 26#include "AliCDBStorage.h"
1aaf4118 27#include "AliRunInfo.h"
421ab0fb 28#include "AliLog.h"
29#include "AliModule.h"
4e25ac79 30#include "AliQAv1.h"
2e42b4d4 31#include "AliQAChecker.h"
32#include "AliQACheckerBase.h"
a2b64fbd 33#include "AliCorrQAChecker.h"
401b84d6 34#include "AliGlobalQAChecker.h"
44e45fac 35#include "AliGRPObject.h"
421ab0fb 36
a5fa6165 37#include <TKey.h>
421ab0fb 38#include <TObjArray.h>
cbae8032 39#include <TObjString.h>
a5fa6165 40#include <TPluginManager.h>
41#include <TROOT.h>
421ab0fb 42#include <TStopwatch.h>
43#include <TString.h>
a5fa6165 44#include <TSystem.h>
a4976ef3 45#include <TList.h>
a2b64fbd 46#include <TNtupleD.h>
421ab0fb 47
2e42b4d4 48ClassImp(AliQAChecker)
49 AliQAChecker * AliQAChecker::fgQAChecker = 0x0 ;
421ab0fb 50
51//_____________________________________________________________________________
2e42b4d4 52AliQAChecker::AliQAChecker(const char* name, const char* title) :
421ab0fb 53 TNamed(name, title),
a5fa6165 54 fDataFile(0x0),
7e88424f 55 fRunInfo(0x0),
56 fRunInfoOwner(kFALSE),
4edbc5bc 57 fRefFile(0x0),
57acd2d2 58 fFoundDetectors("."),
634696f5 59 fEventSpecie(AliRecoParam::kDefault),
60 fRun(0)
421ab0fb 61{
a5fa6165 62 // ctor: initialise checkers and open the data file
4e25ac79 63 for (Int_t det = 0 ; det < AliQAv1::kNDET ; det++)
a5fa6165 64 fCheckers[det] = NULL ;
421ab0fb 65}
66
67//_____________________________________________________________________________
2e42b4d4 68AliQAChecker::AliQAChecker(const AliQAChecker& qac) :
421ab0fb 69 TNamed(qac),
a5fa6165 70 fDataFile(qac.fDataFile),
7e88424f 71 fRunInfo(qac.fRunInfo),
72 fRunInfoOwner(kFALSE),
4edbc5bc 73 fRefFile(qac.fRefFile),
57acd2d2 74 fFoundDetectors(qac.fFoundDetectors),
634696f5 75 fEventSpecie(qac.fEventSpecie),
76 fRun(qac.fRun)
421ab0fb 77{
a5fa6165 78 // copy constructor
79
4e25ac79 80 for (Int_t det = 0 ; det < AliQAv1::kNDET ; det++)
a5fa6165 81 fCheckers[det] = NULL ;
421ab0fb 82}
83
84//_____________________________________________________________________________
2e42b4d4 85AliQAChecker& AliQAChecker::operator = (const AliQAChecker& qac)
421ab0fb 86{
87// assignment operator
88
2e42b4d4 89 this->~AliQAChecker();
90 new(this) AliQAChecker(qac);
421ab0fb 91 return *this;
92}
93
94//_____________________________________________________________________________
2e42b4d4 95AliQAChecker::~AliQAChecker()
421ab0fb 96{
97// clean up
7e88424f 98 if (fRunInfo)
99 delete fRunInfo ;
a4976ef3 100 delete [] fCheckers ;
4e25ac79 101 AliQAv1::Close() ;
421ab0fb 102}
103
104//_____________________________________________________________________________
2e42b4d4 105 AliQACheckerBase * AliQAChecker::GetDetQAChecker(Int_t det)
421ab0fb 106{
7ce961eb 107 // Gets the Quality Assurance checker for the detector specified by its name
108
109 if (fCheckers[det])
a5fa6165 110 return fCheckers[det];
111
401b84d6 112 AliQACheckerBase * qac = NULL ;
a5fa6165 113
4e25ac79 114 TString detName(AliQAv1::GetDetName(det)) ;
401b84d6 115
4e25ac79 116 if (det == AliQAv1::kGLOBAL) {
401b84d6 117 qac = new AliGlobalQAChecker() ;
4e25ac79 118 } else if (det == AliQAv1::kCORR) {
a2b64fbd 119 qac = new AliCorrQAChecker() ;
401b84d6 120 } else {
634696f5 121 AliDebugClass(AliQAv1::GetQADebugLevel(), Form("Retrieving QA checker for %s", detName.Data())) ;
401b84d6 122 TPluginManager* pluginManager = gROOT->GetPluginManager() ;
123 TString qacName = "Ali" + detName + "QAChecker" ;
124
125 // first check if a plugin is defined for the quality assurance checker
126 TPluginHandler* pluginHandler = pluginManager->FindHandler("AliQAChecker", detName.Data());
127 // if not, add a plugin for it
128 if (!pluginHandler) {
5379c4a3 129 //AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qacName.Data()));
401b84d6 130 TString libs = gSystem->GetLibraries();
7ce961eb 131
401b84d6 132 if (libs.Contains("lib" + detName + "base.so") || (gSystem->Load("lib" + detName + "base.so") >= 0))
133 pluginManager->AddHandler("AliQAChecker", detName, qacName, detName + "qac", qacName + "()");
134 else
135 pluginManager->AddHandler("AliQAChecker", detName, qacName, detName, qacName + "()");
a5fa6165 136
401b84d6 137 pluginHandler = pluginManager->FindHandler("AliQAChecker", detName);
a5fa6165 138
401b84d6 139 if (pluginHandler && (pluginHandler->LoadPlugin() == 0))
140 qac = (AliQACheckerBase *) pluginHandler->ExecPlugin(0);
a5fa6165 141
401b84d6 142 }
7ce961eb 143 }
401b84d6 144 if (qac)
145 fCheckers[det] = qac ;
146
147 return qac ;
a5fa6165 148}
cbae8032 149
a5fa6165 150//_____________________________________________________________________________
57acd2d2 151void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB)
a5fa6165 152{
153 // Opens and returns the file with the reference data
cbae8032 154 dirFile = NULL ;
4e25ac79 155 TString refStorage(AliQAv1::GetQARefStorage()) ;
156// if (refStorage.Contains(AliQAv1::GetLabLocalFile())) {
157// refStorage.ReplaceAll(AliQAv1::GetLabLocalFile(), "") ;
158// refStorage += AliQAv1::GetQARefFileName() ;
cf13d879 159// if ( fRefFile )
160// if ( fRefFile->IsOpen() )
161// fRefFile->Close() ;
162// fRefFile = TFile::Open(refStorage.Data()) ;
163// if (!fRefFile) {
164// AliError(Form("Cannot find reference file %s", refStorage.Data())) ;
165// dirFile = NULL ;
166// }
167// dirFile = fRefFile->GetDirectory(det) ;
168// if (!dirFile) {
169// AliWarning(Form("Directory %s not found in %d", det, refStorage.Data())) ;
170// } else {
171// dirFile = dirFile->GetDirectory(task) ;
172// if (!dirFile)
173// AliWarning(Form("Directory %s/%s not found in %s", det, task, refStorage.Data())) ;
174// }
175// } else
4e25ac79 176 if (!refStorage.Contains(AliQAv1::GetLabLocalOCDB()) && !refStorage.Contains(AliQAv1::GetLabAliEnOCDB())) {
cf13d879 177 AliError(Form("%s is not a valid location for reference data", refStorage.Data())) ;
178 return ;
179 } else {
634696f5 180 AliQAManager* manQA = AliQAManager::QAManager(AliQAv1::GetTaskIndex(task)) ;
57acd2d2 181 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
4e25ac79 182 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
57acd2d2 183 continue ;
4e25ac79 184 //if ( strcmp(AliQAv1::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (EventSpecie)
57acd2d2 185 // Get it from RunInfo
186 //if (!fRunInfo) // not yet set, get the info from GRP
187 // LoadRunInfoFromGRP() ;
4e25ac79 188 AliQAv1::SetQARefDataDirName(specie) ;
57acd2d2 189 //}
b03591ab 190 if ( ! manQA->GetLock() ) {
4e25ac79 191 manQA->SetDefaultStorage(AliQAv1::GetQARefStorage()) ;
192 manQA->SetSpecificStorage("*", AliQAv1::GetQARefStorage()) ;
b03591ab 193 manQA->SetRun(AliCDBManager::Instance()->GetRun()) ;
194 manQA->SetLock() ;
57acd2d2 195 }
4e25ac79 196 char * detOCDBDir = Form("%s/%s/%s", det, AliQAv1::GetRefOCDBDirName(), AliQAv1::GetRefDataDirName()) ;
b03591ab 197 AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ;
57acd2d2 198 if (entry) {
199 dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;
eca4fa66 200 TList * listDetQAD =static_cast<TList *>(entry->GetObject()) ;
201 if ( strcmp(listDetQAD->ClassName(), "TList") != 0 ) {
202 AliError(Form("Expected a Tlist and found a %s for detector %s", listDetQAD->ClassName(), det)) ;
203 continue ;
204 }
57acd2d2 205 TIter next(listDetQAD) ;
206 TObjArray * ar ;
cf13d879 207 while ( (ar = (TObjArray*)next()) )
57acd2d2 208 if ( listDetQAD )
eca4fa66 209 dirOCDB[specie] = static_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
57acd2d2 210 }
cbae8032 211 }
212 }
421ab0fb 213}
214
215//_____________________________________________________________________________
2e42b4d4 216AliQAChecker * AliQAChecker::Instance()
a4976ef3 217{
218 // returns unique instance of the checker
219 if ( ! fgQAChecker )
2e42b4d4 220 fgQAChecker = new AliQAChecker() ;
a4976ef3 221 return fgQAChecker ;
222}
223
224//_____________________________________________________________________________
7e88424f 225void AliQAChecker::LoadRunInfoFromGRP()
cbae8032 226{
227 AliCDBManager* man = AliCDBManager::Instance() ;
4e25ac79 228 AliCDBEntry* entry = man->Get(AliQAv1::GetGRPPath().Data());
44e45fac 229 AliGRPObject* grpObject = 0x0;
230 if (entry) {
231
eca4fa66 232 TMap* m = static_cast<TMap*>(entry->GetObject()); // old GRP entry
44e45fac 233
234 if (m) {
5379c4a3 235 AliDebug(AliQAv1::GetQADebugLevel(), "It is a map");
44e45fac 236 //m->Print();
237 grpObject = new AliGRPObject();
238 grpObject->ReadValuesFromMap(m);
239 }
240
241 else {
5379c4a3 242 AliDebug(AliQAv1::GetQADebugLevel(), "It is a new GRP object");
eca4fa66 243 grpObject = static_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
44e45fac 244 }
245
246 entry->SetOwner(0);
247 AliCDBManager::Instance()->UnloadFromCache("GRP/GRP/Data");
248 }
249
250 if (!grpObject) {
251 AliFatal("No GRP entry found in OCDB!");
cbae8032 252 }
44e45fac 253
254 TString lhcState = grpObject->GetLHCState();
255 if (lhcState==AliGRPObject::GetInvalidString()) {
256 AliError("GRP/GRP/Data entry: missing value for the LHC state ! Using UNKNOWN");
257 lhcState = "UNKNOWN";
258 }
259
260 TString beamType = grpObject->GetBeamType();
261 if (beamType==AliGRPObject::GetInvalidString()) {
262 AliError("GRP/GRP/Data entry: missing value for the beam type ! Using UNKNOWN");
263 beamType = "UNKNOWN";
cbae8032 264 }
44e45fac 265
266 Float_t beamEnergy = grpObject->GetBeamEnergy();
267 if (beamEnergy==AliGRPObject::GetInvalidFloat()) {
268 AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0");
269 beamEnergy = 0;
cbae8032 270 }
44e45fac 271
272 TString runType = grpObject->GetRunType();
273 if (runType==AliGRPObject::GetInvalidString()) {
274 AliError("GRP/GRP/Data entry: missing value for the run type ! Using UNKNOWN");
275 runType = "UNKNOWN";
7e88424f 276 }
44e45fac 277
278 Int_t activeDetectors = grpObject->GetDetectorMask();
279 if (activeDetectors==AliGRPObject::GetInvalidInt()) {
280 AliError("GRP/GRP/Data entry: missing value for the detector mask ! Using 1074790399");
281 activeDetectors = 1074790399;
cbae8032 282 }
44e45fac 283
284 fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
285
7e88424f 286 fRunInfoOwner = kTRUE ;
57acd2d2 287
288 // set the event specie
289 fEventSpecie = AliRecoParam::kDefault ;
290 if (strcmp(runType,"PHYSICS")) {
291 // Not a physics run, the event specie is set to kCalib
292 fEventSpecie = AliRecoParam::kCalib ;
293 return;
294 }
295 if (strcmp(lhcState,"STABLE_BEAMS") == 0) {
296 // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
297 fEventSpecie = AliRecoParam::kHighMult ;
298 if ((strcmp(beamType,"p-p") == 0) ||
299 (strcmp(beamType,"p-") == 0) ||
300 (strcmp(beamType,"-p") == 0) ||
301 (strcmp(beamType,"P-P") == 0) ||
302 (strcmp(beamType,"P-") == 0) ||
303 (strcmp(beamType,"-P") == 0)) {
304 // Proton run, the event specie is set to kLowMult
305 fEventSpecie = AliRecoParam::kLowMult ;
306 }
307 else if (strcmp(beamType,"-") == 0) {
308 // No beams, we assume cosmic data
309 fEventSpecie = AliRecoParam::kCosmic ;
310 }
311 else if (strcmp(beamType,"UNKNOWN") == 0) {
312 // No LHC beam information is available, we use the default event specie
313 fEventSpecie = AliRecoParam::kDefault ;
314 }
315 }
cbae8032 316}
317
318//_____________________________________________________________________________
808b7099 319Bool_t AliQAChecker::Run(const char * fileName)
421ab0fb 320{
44ed7a66 321 // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, DigitsR, RecPoints, TrackSegments, RecParticles and ESDs
57acd2d2 322 // starting from data in file
421ab0fb 323 TStopwatch stopwatch;
324 stopwatch.Start();
325
a5fa6165 326 //search for all detectors QA directories
4e25ac79 327 TList * detKeyList = AliQAv1::GetQADataFile(fileName)->GetListOfKeys() ;
a5fa6165 328 TIter nextd(detKeyList) ;
329 TKey * detKey ;
eca4fa66 330 while ( (detKey = static_cast<TKey *>(nextd()) ) ) {
5379c4a3 331 AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", detKey->GetName())) ;
a5fa6165 332 //Check which detector
333 TString detName ;
334 TString detNameQA(detKey->GetName()) ;
335 Int_t det ;
4e25ac79 336 for ( det = 0; det < AliQAv1::kNDET ; det++) {
337 detName = AliQAv1::GetDetName(det) ;
a5fa6165 338 if (detNameQA.Contains(detName)) {
57acd2d2 339 fFoundDetectors+=detName ;
340 fFoundDetectors+="." ;
341 break ;
a5fa6165 342 }
343 }
4e25ac79 344 TDirectory * detDir = AliQAv1::GetQADataFile(fileName)->GetDirectory(detKey->GetName()) ;
a5fa6165 345 TList * taskKeyList = detDir->GetListOfKeys() ;
346 TIter nextt(taskKeyList) ;
347 TKey * taskKey ;
348 // now search for the tasks dir
349 while ( (taskKey = static_cast<TKey *>(nextt()) ) ) {
350 TString taskName( taskKey->GetName() ) ;
5379c4a3 351 AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", taskName.Data())) ;
a5fa6165 352 TDirectory * taskDir = detDir->GetDirectory(taskName.Data()) ;
353 taskDir->cd() ;
2e42b4d4 354 AliQACheckerBase * qac = GetDetQAChecker(det) ;
a5fa6165 355 if (qac)
5379c4a3 356 AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", detName.Data())) ;
a5fa6165 357 if (!qac)
57acd2d2 358 AliFatal(Form("QA checker not found for %s", detName.Data())) ;
4e25ac79 359 AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ;
360 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kHITS) )
361 index = AliQAv1::kSIM ;
362 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kSDIGITS) )
363 index = AliQAv1::kSIM ;
364 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITS) )
365 index = AliQAv1::kSIM ;
44ed7a66 366 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITSR) )
367 index = AliQAv1::kREC ;
4e25ac79 368 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRECPOINTS) )
369 index = AliQAv1::kREC ;
370 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kTRACKSEGMENTS) )
371 index = AliQAv1::kREC ;
372 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRECPARTICLES) )
373 index = AliQAv1::kREC ;
374 if ( taskName == AliQAv1::GetTaskName(AliQAv1::kESDS) )
375 index = AliQAv1::kESD ;
376 qac->Init(AliQAv1::DETECTORINDEX_t(det)) ;
57acd2d2 377
378 TDirectory * refDir = NULL ;
379 TObjArray ** refOCDBDir = NULL ;
380 GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
4edbc5bc 381 qac->SetRefandData(refDir, refOCDBDir, taskDir) ;
382 qac->Run(index) ;
57acd2d2 383 }
4edbc5bc 384 }
a5fa6165 385 AliInfo("QA performed for following detectors:") ;
4e25ac79 386 for ( Int_t det = 0; det < AliQAv1::kNDET; det++) {
387 if (fFoundDetectors.Contains(AliQAv1::GetDetName(det))) {
5e232cd6 388 AliInfoClass(Form("%s, ",AliQAv1::GetDetName(det))) ;
4e25ac79 389 fFoundDetectors.ReplaceAll(AliQAv1::GetDetName(det), "") ;
a5fa6165 390 }
421ab0fb 391 }
a5fa6165 392 printf("\n") ;
57acd2d2 393 return kTRUE ;
421ab0fb 394}
395
396//_____________________________________________________________________________
4e25ac79 397Bool_t AliQAChecker::Run(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, TObjArray ** list)
a4976ef3 398{
d6372ce8 399 // run the Quality Assurance Checker for detector det, for task task starting from data in list
a4976ef3 400
d6372ce8 401 AliQACheckerBase * qac = GetDetQAChecker(det) ;
402 if (qac)
5379c4a3 403 AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
d6372ce8 404 if (!qac)
4e25ac79 405 AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ;
a4976ef3 406
4e25ac79 407 AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ;
408 if ( task == AliQAv1::kRAWS )
409 index = AliQAv1::kRAW ;
410 else if ( task == AliQAv1::kHITS )
411 index = AliQAv1::kSIM ;
412 else if ( task == AliQAv1::kSDIGITS )
413 index = AliQAv1::kSIM ;
414 else if ( task == AliQAv1::kDIGITS )
415 index = AliQAv1::kSIM ;
44ed7a66 416 else if ( task == AliQAv1::kDIGITSR )
417 index = AliQAv1::kREC ;
4e25ac79 418 else if ( task == AliQAv1::kRECPOINTS )
419 index = AliQAv1::kREC ;
420 else if ( task == AliQAv1::kTRACKSEGMENTS )
421 index = AliQAv1::kREC ;
422 else if ( task == AliQAv1::kRECPARTICLES )
423 index = AliQAv1::kREC ;
424 else if ( task == AliQAv1::kESDS )
425 index = AliQAv1::kESD ;
4edbc5bc 426
57acd2d2 427 TDirectory * refDir = NULL ;
428 TObjArray ** refOCDBDir = NULL ;
429 qac->Init(det) ;
4e25ac79 430 GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ;
57acd2d2 431 qac->SetRefandData(refDir, refOCDBDir) ;
432 qac->Run(index, list) ;
634696f5 433
434 // make the image
435 qac->MakeImage(list, task, AliQAv1::Mode(task)) ;
436
d6372ce8 437 return kTRUE ;
31316597 438}
57acd2d2 439
440//_____________________________________________________________________________
4e25ac79 441Bool_t AliQAChecker::Run(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, TNtupleD ** list)
57acd2d2 442{
443 // run the Quality Assurance Checker for detector det, for task task starting from data in list
444
445 AliQACheckerBase * qac = GetDetQAChecker(det) ;
446 if (qac)
5379c4a3 447 AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ;
57acd2d2 448 if (!qac)
4e25ac79 449 AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ;
57acd2d2 450
4e25ac79 451 AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ;
452 if ( task == AliQAv1::kRAWS )
453 index = AliQAv1::kRAW ;
454 else if ( task == AliQAv1::kHITS )
455 index = AliQAv1::kSIM ;
456 else if ( task == AliQAv1::kSDIGITS )
457 index = AliQAv1::kSIM ;
458 else if ( task == AliQAv1::kDIGITS )
459 index = AliQAv1::kSIM ;
44ed7a66 460 else if ( task == AliQAv1::kDIGITSR )
461 index = AliQAv1::kREC ;
4e25ac79 462 else if ( task == AliQAv1::kRECPOINTS )
463 index = AliQAv1::kREC ;
464 else if ( task == AliQAv1::kTRACKSEGMENTS )
465 index = AliQAv1::kREC ;
466 else if ( task == AliQAv1::kRECPARTICLES )
467 index = AliQAv1::kREC ;
468 else if ( task == AliQAv1::kESDS )
469 index = AliQAv1::kESD ;
57acd2d2 470
471 TDirectory * refDir = NULL ;
472 TObjArray ** refOCDBDir = NULL ;
473 qac->Init(det) ;
4e25ac79 474 GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ;
57acd2d2 475 qac->SetRefandData(refDir, refOCDBDir) ;
476 qac->Run(index, list) ;
634696f5 477
57acd2d2 478 return kTRUE ;
479}