]>
Commit | Line | Data |
---|---|---|
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 | 48 | ClassImp(AliQAChecker) |
49 | AliQAChecker * AliQAChecker::fgQAChecker = 0x0 ; | |
421ab0fb | 50 | |
51 | //_____________________________________________________________________________ | |
2e42b4d4 | 52 | AliQAChecker::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 | 68 | AliQAChecker::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 | 85 | AliQAChecker& 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 | 95 | AliQAChecker::~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 | 151 | void 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()) ; |
4e25ac79 | 156 | if (!refStorage.Contains(AliQAv1::GetLabLocalOCDB()) && !refStorage.Contains(AliQAv1::GetLabAliEnOCDB())) { |
cf13d879 | 157 | AliError(Form("%s is not a valid location for reference data", refStorage.Data())) ; |
158 | return ; | |
159 | } else { | |
634696f5 | 160 | AliQAManager* manQA = AliQAManager::QAManager(AliQAv1::GetTaskIndex(task)) ; |
958ed851 | 161 | dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ; |
57acd2d2 | 162 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { |
958ed851 | 163 | dirOCDB[specie] = NULL ; |
4e25ac79 | 164 | if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) |
57acd2d2 | 165 | continue ; |
4e25ac79 | 166 | AliQAv1::SetQARefDataDirName(specie) ; |
b03591ab | 167 | if ( ! manQA->GetLock() ) { |
4e25ac79 | 168 | manQA->SetDefaultStorage(AliQAv1::GetQARefStorage()) ; |
169 | manQA->SetSpecificStorage("*", AliQAv1::GetQARefStorage()) ; | |
b03591ab | 170 | manQA->SetRun(AliCDBManager::Instance()->GetRun()) ; |
171 | manQA->SetLock() ; | |
57acd2d2 | 172 | } |
4e25ac79 | 173 | char * detOCDBDir = Form("%s/%s/%s", det, AliQAv1::GetRefOCDBDirName(), AliQAv1::GetRefDataDirName()) ; |
b03591ab | 174 | AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ; |
57acd2d2 | 175 | if (entry) { |
eca4fa66 | 176 | TList * listDetQAD =static_cast<TList *>(entry->GetObject()) ; |
177 | if ( strcmp(listDetQAD->ClassName(), "TList") != 0 ) { | |
178 | AliError(Form("Expected a Tlist and found a %s for detector %s", listDetQAD->ClassName(), det)) ; | |
179 | continue ; | |
180 | } | |
57acd2d2 | 181 | TIter next(listDetQAD) ; |
182 | TObjArray * ar ; | |
958ed851 | 183 | while ( (ar = (TObjArray*)next()) ) |
57acd2d2 | 184 | if ( listDetQAD ) |
958ed851 | 185 | dirOCDB[specie] = static_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ; |
57acd2d2 | 186 | } |
cbae8032 | 187 | } |
188 | } | |
421ab0fb | 189 | } |
190 | ||
a4976ef3 | 191 | //_____________________________________________________________________________ |
2e42b4d4 | 192 | AliQAChecker * AliQAChecker::Instance() |
a4976ef3 | 193 | { |
194 | // returns unique instance of the checker | |
195 | if ( ! fgQAChecker ) | |
2e42b4d4 | 196 | fgQAChecker = new AliQAChecker() ; |
a4976ef3 | 197 | return fgQAChecker ; |
198 | } | |
199 | ||
cbae8032 | 200 | //_____________________________________________________________________________ |
7e88424f | 201 | void AliQAChecker::LoadRunInfoFromGRP() |
cbae8032 | 202 | { |
203 | AliCDBManager* man = AliCDBManager::Instance() ; | |
4e25ac79 | 204 | AliCDBEntry* entry = man->Get(AliQAv1::GetGRPPath().Data()); |
44e45fac | 205 | AliGRPObject* grpObject = 0x0; |
206 | if (entry) { | |
207 | ||
eca4fa66 | 208 | TMap* m = static_cast<TMap*>(entry->GetObject()); // old GRP entry |
44e45fac | 209 | |
210 | if (m) { | |
5379c4a3 | 211 | AliDebug(AliQAv1::GetQADebugLevel(), "It is a map"); |
44e45fac | 212 | //m->Print(); |
213 | grpObject = new AliGRPObject(); | |
214 | grpObject->ReadValuesFromMap(m); | |
215 | } | |
216 | ||
217 | else { | |
5379c4a3 | 218 | AliDebug(AliQAv1::GetQADebugLevel(), "It is a new GRP object"); |
eca4fa66 | 219 | grpObject = static_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry |
44e45fac | 220 | } |
221 | ||
222 | entry->SetOwner(0); | |
223 | AliCDBManager::Instance()->UnloadFromCache("GRP/GRP/Data"); | |
224 | } | |
225 | ||
226 | if (!grpObject) { | |
227 | AliFatal("No GRP entry found in OCDB!"); | |
cbae8032 | 228 | } |
44e45fac | 229 | |
230 | TString lhcState = grpObject->GetLHCState(); | |
231 | if (lhcState==AliGRPObject::GetInvalidString()) { | |
232 | AliError("GRP/GRP/Data entry: missing value for the LHC state ! Using UNKNOWN"); | |
233 | lhcState = "UNKNOWN"; | |
234 | } | |
235 | ||
236 | TString beamType = grpObject->GetBeamType(); | |
237 | if (beamType==AliGRPObject::GetInvalidString()) { | |
238 | AliError("GRP/GRP/Data entry: missing value for the beam type ! Using UNKNOWN"); | |
239 | beamType = "UNKNOWN"; | |
cbae8032 | 240 | } |
44e45fac | 241 | |
242 | Float_t beamEnergy = grpObject->GetBeamEnergy(); | |
243 | if (beamEnergy==AliGRPObject::GetInvalidFloat()) { | |
244 | AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0"); | |
245 | beamEnergy = 0; | |
cbae8032 | 246 | } |
44e45fac | 247 | |
248 | TString runType = grpObject->GetRunType(); | |
249 | if (runType==AliGRPObject::GetInvalidString()) { | |
250 | AliError("GRP/GRP/Data entry: missing value for the run type ! Using UNKNOWN"); | |
251 | runType = "UNKNOWN"; | |
7e88424f | 252 | } |
44e45fac | 253 | |
254 | Int_t activeDetectors = grpObject->GetDetectorMask(); | |
255 | if (activeDetectors==AliGRPObject::GetInvalidInt()) { | |
256 | AliError("GRP/GRP/Data entry: missing value for the detector mask ! Using 1074790399"); | |
257 | activeDetectors = 1074790399; | |
cbae8032 | 258 | } |
44e45fac | 259 | |
260 | fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors); | |
261 | ||
7e88424f | 262 | fRunInfoOwner = kTRUE ; |
57acd2d2 | 263 | |
264 | // set the event specie | |
265 | fEventSpecie = AliRecoParam::kDefault ; | |
266 | if (strcmp(runType,"PHYSICS")) { | |
267 | // Not a physics run, the event specie is set to kCalib | |
268 | fEventSpecie = AliRecoParam::kCalib ; | |
269 | return; | |
270 | } | |
271 | if (strcmp(lhcState,"STABLE_BEAMS") == 0) { | |
272 | // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult | |
273 | fEventSpecie = AliRecoParam::kHighMult ; | |
274 | if ((strcmp(beamType,"p-p") == 0) || | |
275 | (strcmp(beamType,"p-") == 0) || | |
276 | (strcmp(beamType,"-p") == 0) || | |
277 | (strcmp(beamType,"P-P") == 0) || | |
278 | (strcmp(beamType,"P-") == 0) || | |
279 | (strcmp(beamType,"-P") == 0)) { | |
280 | // Proton run, the event specie is set to kLowMult | |
281 | fEventSpecie = AliRecoParam::kLowMult ; | |
282 | } | |
283 | else if (strcmp(beamType,"-") == 0) { | |
284 | // No beams, we assume cosmic data | |
285 | fEventSpecie = AliRecoParam::kCosmic ; | |
286 | } | |
287 | else if (strcmp(beamType,"UNKNOWN") == 0) { | |
288 | // No LHC beam information is available, we use the default event specie | |
289 | fEventSpecie = AliRecoParam::kDefault ; | |
290 | } | |
291 | } | |
cbae8032 | 292 | } |
293 | ||
421ab0fb | 294 | //_____________________________________________________________________________ |
c39ee44c | 295 | Bool_t AliQAChecker::Run(const char * fileName, Int_t runnumber) |
421ab0fb | 296 | { |
44ed7a66 | 297 | // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, DigitsR, RecPoints, TrackSegments, RecParticles and ESDs |
57acd2d2 | 298 | // starting from data in file |
421ab0fb | 299 | TStopwatch stopwatch; |
300 | stopwatch.Start(); | |
c39ee44c | 301 | |
302 | // set the run number | |
303 | AliCDBManager::Instance()->SetRun(runnumber) ; | |
304 | // search and set the event species | |
305 | AliQAv1 * qa = AliQAv1::Instance() ; | |
306 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { | |
307 | if ( AliQAv1::GetQADataFile(fileName)->FindObjectAny(AliRecoParam::GetEventSpecieName(specie)) ) | |
308 | qa->SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; | |
309 | } | |
a5fa6165 | 310 | //search for all detectors QA directories |
4e25ac79 | 311 | TList * detKeyList = AliQAv1::GetQADataFile(fileName)->GetListOfKeys() ; |
a5fa6165 | 312 | TIter nextd(detKeyList) ; |
313 | TKey * detKey ; | |
eca4fa66 | 314 | while ( (detKey = static_cast<TKey *>(nextd()) ) ) { |
5379c4a3 | 315 | AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", detKey->GetName())) ; |
a5fa6165 | 316 | //Check which detector |
317 | TString detName ; | |
318 | TString detNameQA(detKey->GetName()) ; | |
319 | Int_t det ; | |
4e25ac79 | 320 | for ( det = 0; det < AliQAv1::kNDET ; det++) { |
321 | detName = AliQAv1::GetDetName(det) ; | |
a5fa6165 | 322 | if (detNameQA.Contains(detName)) { |
57acd2d2 | 323 | fFoundDetectors+=detName ; |
324 | fFoundDetectors+="." ; | |
325 | break ; | |
a5fa6165 | 326 | } |
327 | } | |
4e25ac79 | 328 | TDirectory * detDir = AliQAv1::GetQADataFile(fileName)->GetDirectory(detKey->GetName()) ; |
a5fa6165 | 329 | TList * taskKeyList = detDir->GetListOfKeys() ; |
330 | TIter nextt(taskKeyList) ; | |
331 | TKey * taskKey ; | |
332 | // now search for the tasks dir | |
333 | while ( (taskKey = static_cast<TKey *>(nextt()) ) ) { | |
334 | TString taskName( taskKey->GetName() ) ; | |
5379c4a3 | 335 | AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", taskName.Data())) ; |
a5fa6165 | 336 | TDirectory * taskDir = detDir->GetDirectory(taskName.Data()) ; |
337 | taskDir->cd() ; | |
2e42b4d4 | 338 | AliQACheckerBase * qac = GetDetQAChecker(det) ; |
a5fa6165 | 339 | if (qac) |
5379c4a3 | 340 | AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", detName.Data())) ; |
a5fa6165 | 341 | if (!qac) |
57acd2d2 | 342 | AliFatal(Form("QA checker not found for %s", detName.Data())) ; |
4e25ac79 | 343 | AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ; |
344 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kHITS) ) | |
345 | index = AliQAv1::kSIM ; | |
346 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kSDIGITS) ) | |
347 | index = AliQAv1::kSIM ; | |
348 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITS) ) | |
349 | index = AliQAv1::kSIM ; | |
d62b07c8 | 350 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRAWS) ) |
351 | index = AliQAv1::kRAW ; | |
44ed7a66 | 352 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kDIGITSR) ) |
353 | index = AliQAv1::kREC ; | |
4e25ac79 | 354 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRECPOINTS) ) |
355 | index = AliQAv1::kREC ; | |
356 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kTRACKSEGMENTS) ) | |
357 | index = AliQAv1::kREC ; | |
358 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kRECPARTICLES) ) | |
359 | index = AliQAv1::kREC ; | |
360 | if ( taskName == AliQAv1::GetTaskName(AliQAv1::kESDS) ) | |
361 | index = AliQAv1::kESD ; | |
362 | qac->Init(AliQAv1::DETECTORINDEX_t(det)) ; | |
57acd2d2 | 363 | |
364 | TDirectory * refDir = NULL ; | |
365 | TObjArray ** refOCDBDir = NULL ; | |
366 | GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ; | |
4edbc5bc | 367 | qac->SetRefandData(refDir, refOCDBDir, taskDir) ; |
368 | qac->Run(index) ; | |
57acd2d2 | 369 | } |
4edbc5bc | 370 | } |
c39ee44c | 371 | TString detList ; |
4e25ac79 | 372 | for ( Int_t det = 0; det < AliQAv1::kNDET; det++) { |
c39ee44c | 373 | if (fFoundDetectors.Contains(qa->GetDetName(det))) { |
374 | detList += qa->GetDetName(det) ; | |
375 | detList += " " ; | |
376 | fFoundDetectors.ReplaceAll(qa->GetDetName(det), "") ; | |
377 | qa->Show(qa->GetDetIndex(qa->GetDetName(det))) ; | |
a5fa6165 | 378 | } |
421ab0fb | 379 | } |
c39ee44c | 380 | AliInfo(Form("QA performed for following detectors: %s", detList.Data())) ; |
57acd2d2 | 381 | return kTRUE ; |
421ab0fb | 382 | } |
383 | ||
a4976ef3 | 384 | //_____________________________________________________________________________ |
4e25ac79 | 385 | Bool_t AliQAChecker::Run(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, TObjArray ** list) |
a4976ef3 | 386 | { |
d6372ce8 | 387 | // run the Quality Assurance Checker for detector det, for task task starting from data in list |
a4976ef3 | 388 | |
d6372ce8 | 389 | AliQACheckerBase * qac = GetDetQAChecker(det) ; |
390 | if (qac) | |
5379c4a3 | 391 | AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ; |
d6372ce8 | 392 | if (!qac) |
4e25ac79 | 393 | AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ; |
a4976ef3 | 394 | |
4e25ac79 | 395 | AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ; |
396 | if ( task == AliQAv1::kRAWS ) | |
397 | index = AliQAv1::kRAW ; | |
398 | else if ( task == AliQAv1::kHITS ) | |
399 | index = AliQAv1::kSIM ; | |
400 | else if ( task == AliQAv1::kSDIGITS ) | |
401 | index = AliQAv1::kSIM ; | |
402 | else if ( task == AliQAv1::kDIGITS ) | |
403 | index = AliQAv1::kSIM ; | |
44ed7a66 | 404 | else if ( task == AliQAv1::kDIGITSR ) |
405 | index = AliQAv1::kREC ; | |
4e25ac79 | 406 | else if ( task == AliQAv1::kRECPOINTS ) |
407 | index = AliQAv1::kREC ; | |
408 | else if ( task == AliQAv1::kTRACKSEGMENTS ) | |
409 | index = AliQAv1::kREC ; | |
410 | else if ( task == AliQAv1::kRECPARTICLES ) | |
411 | index = AliQAv1::kREC ; | |
412 | else if ( task == AliQAv1::kESDS ) | |
413 | index = AliQAv1::kESD ; | |
4edbc5bc | 414 | |
57acd2d2 | 415 | TDirectory * refDir = NULL ; |
416 | TObjArray ** refOCDBDir = NULL ; | |
417 | qac->Init(det) ; | |
4e25ac79 | 418 | GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ; |
57acd2d2 | 419 | qac->SetRefandData(refDir, refOCDBDir) ; |
420 | qac->Run(index, list) ; | |
634696f5 | 421 | |
422 | // make the image | |
423 | qac->MakeImage(list, task, AliQAv1::Mode(task)) ; | |
424 | ||
d6372ce8 | 425 | return kTRUE ; |
31316597 | 426 | } |
57acd2d2 | 427 | |
428 | //_____________________________________________________________________________ | |
4e25ac79 | 429 | Bool_t AliQAChecker::Run(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, TNtupleD ** list) |
57acd2d2 | 430 | { |
431 | // run the Quality Assurance Checker for detector det, for task task starting from data in list | |
432 | ||
433 | AliQACheckerBase * qac = GetDetQAChecker(det) ; | |
434 | if (qac) | |
5379c4a3 | 435 | AliDebug(AliQAv1::GetQADebugLevel(), Form("QA checker found for %s", AliQAv1::GetDetName(det).Data())) ; |
57acd2d2 | 436 | if (!qac) |
4e25ac79 | 437 | AliError(Form("QA checker not found for %s", AliQAv1::GetDetName(det).Data())) ; |
57acd2d2 | 438 | |
4e25ac79 | 439 | AliQAv1::ALITASK_t index = AliQAv1::kNULLTASK ; |
440 | if ( task == AliQAv1::kRAWS ) | |
441 | index = AliQAv1::kRAW ; | |
442 | else if ( task == AliQAv1::kHITS ) | |
443 | index = AliQAv1::kSIM ; | |
444 | else if ( task == AliQAv1::kSDIGITS ) | |
445 | index = AliQAv1::kSIM ; | |
446 | else if ( task == AliQAv1::kDIGITS ) | |
447 | index = AliQAv1::kSIM ; | |
44ed7a66 | 448 | else if ( task == AliQAv1::kDIGITSR ) |
449 | index = AliQAv1::kREC ; | |
4e25ac79 | 450 | else if ( task == AliQAv1::kRECPOINTS ) |
451 | index = AliQAv1::kREC ; | |
452 | else if ( task == AliQAv1::kTRACKSEGMENTS ) | |
453 | index = AliQAv1::kREC ; | |
454 | else if ( task == AliQAv1::kRECPARTICLES ) | |
455 | index = AliQAv1::kREC ; | |
456 | else if ( task == AliQAv1::kESDS ) | |
457 | index = AliQAv1::kESD ; | |
57acd2d2 | 458 | |
459 | TDirectory * refDir = NULL ; | |
460 | TObjArray ** refOCDBDir = NULL ; | |
461 | qac->Init(det) ; | |
4e25ac79 | 462 | GetRefSubDir(AliQAv1::GetDetName(det), AliQAv1::GetTaskName(task), refDir, refOCDBDir) ; |
57acd2d2 | 463 | qac->SetRefandData(refDir, refOCDBDir) ; |
d62b07c8 | 464 | qac->Run(index, list, NULL) ; |
634696f5 | 465 | |
57acd2d2 | 466 | return kTRUE ; |
467 | } |