1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliQAManager.cxx 30894 2009-02-05 13:46:48Z schutz $ */
17 ///////////////////////////////////////////////////////////////////////////////
19 // class for running the QA makers //
21 // AliQAManager qas; //
22 // qas.Run(AliQAv1::kRAWS, rawROOTFileName); //
23 // qas.Run(AliQAv1::kHITS); //
24 // qas.Run(AliQAv1::kSDIGITS); //
25 // qas.Run(AliQAv1::kDIGITS); //
26 // qas.Run(AliQAv1::kRECPOINTS); //
27 // qas.Run(AliQAv1::kESDS); //
29 ///////////////////////////////////////////////////////////////////////////////
33 #include <TFileMerger.h>
35 #include <TGridCollection.h>
36 #include <TGridResult.h>
37 #include <TPluginManager.h>
42 #include "AliCDBManager.h"
43 #include "AliCDBEntry.h"
45 #include "AliCDBMetaData.h"
46 #include "AliCodeTimer.h"
47 #include "AliCorrQADataMakerRec.h"
48 #include "AliDetectorRecoParam.h"
49 #include "AliESDEvent.h"
50 #include "AliGeomManager.h"
51 #include "AliGlobalQADataMaker.h"
52 #include "AliHeader.h"
54 #include "AliModule.h"
56 #include "AliQADataMakerRec.h"
57 #include "AliQADataMakerSim.h"
58 #include "AliQAManager.h"
59 #include "AliRawReaderDate.h"
60 #include "AliRawReaderFile.h"
61 #include "AliRawReaderRoot.h"
63 #include "AliRunLoader.h"
64 #include "AliRunTag.h"
66 ClassImp(AliQAManager)
67 AliQAManager* AliQAManager::fgQAInstance = 0x0;
69 //_____________________________________________________________________________
70 AliQAManager::AliQAManager() :
82 fNumberOfEvents(999999),
86 fRawReaderDelete(kTRUE),
89 fEventSpecie(AliRecoParam::kDefault)
92 fMaxEvents = fNumberOfEvents ;
93 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
94 if (IsSelected(AliQAv1::GetDetName(iDet))) {
95 fLoader[iDet] = NULL ;
96 fQADataMaker[iDet] = NULL ;
97 fQACycles[iDet] = 999999 ;
103 //_____________________________________________________________________________
104 AliQAManager::AliQAManager(const Char_t * mode, const Char_t* gAliceFilename) :
112 fGAliceFileName(gAliceFilename),
116 fNumberOfEvents(999999),
120 fRawReaderDelete(kTRUE),
123 fEventSpecie(AliRecoParam::kDefault)
126 fMaxEvents = fNumberOfEvents ;
127 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
128 if (IsSelected(AliQAv1::GetDetName(iDet))) {
129 fLoader[iDet] = NULL ;
130 fQADataMaker[iDet] = NULL ;
131 fQACycles[iDet] = 999999 ;
137 //_____________________________________________________________________________
138 AliQAManager::AliQAManager(const AliQAManager & qas) :
140 fCurrentEvent(qas.fCurrentEvent),
142 fDetectors(qas.fDetectors),
143 fDetectorsW(qas.fDetectorsW),
146 fGAliceFileName(qas.fGAliceFileName),
147 fFirstEvent(qas.fFirstEvent),
148 fMaxEvents(qas.fMaxEvents),
150 fNumberOfEvents(qas.fNumberOfEvents),
152 fRunNumber(qas.fRunNumber),
154 fRawReaderDelete(kTRUE),
157 fEventSpecie(qas.fEventSpecie)
160 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
161 fLoader[iDet] = qas.fLoader[iDet] ;
162 fQADataMaker[iDet] = qas.fQADataMaker[iDet] ;
163 fQACycles[iDet] = qas.fQACycles[iDet] ;
164 fQAWriteExpert[iDet] = qas.fQAWriteExpert[iDet] ;
168 //_____________________________________________________________________________
169 AliQAManager & AliQAManager::operator = (const AliQAManager & qas)
171 // assignment operator
172 this->~AliQAManager() ;
173 new(this) AliQAManager(qas) ;
177 //_____________________________________________________________________________
178 AliQAManager::~AliQAManager()
181 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
182 if (IsSelected(AliQAv1::GetDetName(iDet))) {
183 fLoader[iDet] = NULL;
184 if (fQADataMaker[iDet]) {
185 (fQADataMaker[iDet])->Finish() ;
186 delete fQADataMaker[iDet] ;
190 if (fRawReaderDelete) {
197 //_____________________________________________________________________________
198 Bool_t AliQAManager::DoIt(const AliQAv1::TASKINDEX_t taskIndex)
200 // Runs all the QA data Maker for every detector
203 // Fill QA data in event loop
204 for (UInt_t iEvent = fFirstEvent ; iEvent < (UInt_t)fMaxEvents ; iEvent++) {
207 if ( iEvent%10 == 0 )
208 AliDebug(AliQAv1::GetQADebugLevel(), Form("processing event %d", iEvent));
209 if ( taskIndex == AliQAv1::kRAWS ) {
210 if ( !fRawReader->NextEvent() )
212 } else if ( taskIndex == AliQAv1::kESDS ) {
213 if ( fESDTree->GetEntry(iEvent) == 0 )
216 if ( fRunLoader->GetEvent(iEvent) != 0 )
219 // loop over active loaders
220 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
221 if (IsSelected(AliQAv1::GetDetName(iDet))) {
222 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
223 if (!qadm) continue; // This detector doesn't have any QA (for example, HLT)
224 if ( qadm->IsCycleDone() ) {
225 qadm->EndOfCycle(taskIndex) ;
227 TTree * data = NULL ;
228 AliLoader* loader = GetLoader(qadm->GetUniqueID());
230 case AliQAv1::kNULLTASKINDEX :
232 case AliQAv1::kRAWS :
233 qadm->Exec(taskIndex, fRawReader) ;
235 case AliQAv1::kHITS :
238 data = loader->TreeH() ;
240 AliWarning(Form(" Hit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
244 qadm->Exec(taskIndex, data) ;
246 case AliQAv1::kSDIGITS :
248 loader->LoadSDigits() ;
249 data = loader->TreeS() ;
251 AliWarning(Form(" SDigit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
255 qadm->Exec(taskIndex, data) ;
257 case AliQAv1::kDIGITS :
259 loader->LoadDigits() ;
260 data = loader->TreeD() ;
262 AliWarning(Form(" Digit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
266 qadm->Exec(taskIndex, data) ;
268 case AliQAv1::kRECPOINTS :
270 loader->LoadRecPoints() ;
271 data = loader->TreeR() ;
273 AliWarning(Form("RecPoints not found for %s", AliQAv1::GetDetName(iDet))) ;
277 qadm->Exec(taskIndex, data) ;
279 case AliQAv1::kTRACKSEGMENTS :
281 case AliQAv1::kRECPARTICLES :
283 case AliQAv1::kESDS :
284 qadm->Exec(taskIndex, fESD) ;
286 case AliQAv1::kNTASKINDEX :
293 // Save QA data for all detectors
294 rv = Finish(taskIndex) ;
296 if ( taskIndex == AliQAv1::kRAWS )
297 fRawReader->RewindEvents() ;
302 //_____________________________________________________________________________
303 Bool_t AliQAManager::Finish(const AliQAv1::TASKINDEX_t taskIndex)
305 // write output to file for all detectors
306 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
307 if (IsSelected(AliQAv1::GetDetName(iDet))) {
308 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
310 qadm->EndOfCycle(taskIndex) ;
316 //_____________________________________________________________________________
317 TObjArray * AliQAManager::GetFromOCDB(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, const char * year) const
319 // Retrieve the list of QA data for a given detector and a given task
320 TObjArray * rv = NULL ;
321 if ( !strlen(AliQAv1::GetQARefStorage()) ) {
322 AliError("No storage defined, use AliQAv1::SetQARefStorage") ;
325 if ( ! IsDefaultStorageSet() ) {
326 TString tmp(AliQAv1::GetQARefDefaultStorage()) ;
329 Instance()->SetDefaultStorage(tmp.Data()) ;
330 Instance()->SetSpecificStorage(Form("%s/*", AliQAv1::GetQAName()), AliQAv1::GetQARefStorage()) ;
332 TString detOCDBDir(Form("%s/%s/%s", AliQAv1::GetQAName(), AliQAv1::GetDetName((Int_t)det), AliQAv1::GetRefOCDBDirName())) ;
333 AliDebug(AliQAv1::GetQADebugLevel(), Form("Retrieving reference data from %s/%s for %s", AliQAv1::GetQARefStorage(), detOCDBDir.Data(), AliQAv1::GetTaskName(task).Data())) ;
334 AliCDBEntry* entry = QAManager()->Get(detOCDBDir.Data(), 0) ; //FIXME 0 --> Run Number
335 TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
337 rv = dynamic_cast<TObjArray *>(listDetQAD->FindObject(AliQAv1::GetTaskName(task))) ;
341 //_____________________________________________________________________________
342 AliLoader * AliQAManager::GetLoader(Int_t iDet)
344 // get the loader for a detector
346 if ( !fRunLoader || iDet == AliQAv1::kCORR)
349 TString detName = AliQAv1::GetDetName(iDet) ;
350 fLoader[iDet] = fRunLoader->GetLoader(detName + "Loader");
352 return fLoader[iDet] ;
354 // load the QA data maker object
355 TPluginManager* pluginManager = gROOT->GetPluginManager() ;
356 TString loaderName = "Ali" + detName + "Loader" ;
358 AliLoader * loader = NULL ;
359 // first check if a plugin is defined for the quality assurance data maker
360 TPluginHandler* pluginHandler = pluginManager->FindHandler("AliLoader", detName) ;
361 // if not, add a plugin for it
362 if (!pluginHandler) {
363 AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", loaderName.Data())) ;
364 TString libs = gSystem->GetLibraries() ;
365 if (libs.Contains("lib" + detName + "base.so") || (gSystem->Load("lib" + detName + "base.so") >= 0)) {
366 pluginManager->AddHandler("AliQADataMaker", detName, loaderName, detName + "loader", loaderName + "()") ;
368 pluginManager->AddHandler("AliLoader", detName, loaderName, detName, loaderName + "()") ;
370 pluginHandler = pluginManager->FindHandler("AliLoader", detName) ;
372 if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
373 loader = (AliLoader *) pluginHandler->ExecPlugin(0) ;
376 fLoader[iDet] = loader ;
380 //_____________________________________________________________________________
381 AliQAv1 * AliQAManager::GetQA(UInt_t run, UInt_t evt)
383 // retrieves the QA object stored in a file named "Run{run}.Event{evt}_1.ESD.tag.root"
384 char * fileName = Form("Run%d.Event%d_1.ESD.tag.root", run, evt) ;
385 TFile * tagFile = TFile::Open(fileName) ;
387 AliError(Form("File %s not found", fileName)) ;
390 TTree * tagTree = dynamic_cast<TTree *>(tagFile->Get("T")) ;
392 AliError(Form("Tree T not found in %s", fileName)) ;
396 AliRunTag * tag = new AliRunTag ;
397 tagTree->SetBranchAddress("AliTAG", &tag) ;
398 tagTree->GetEntry(evt) ;
399 AliQAv1 * qa = AliQAv1::Instance(tag->GetQALength(), tag->GetQAArray(), tag->GetESLength(), tag->GetEventSpecies()) ;
404 //_____________________________________________________________________________
405 AliQADataMaker * AliQAManager::GetQADataMaker(const Int_t iDet)
407 // get the quality assurance data maker for a detector
409 if (fQADataMaker[iDet]) {
410 if ( fQADataMaker[iDet]->GetRecoParam() )
411 fQADataMaker[iDet]->SetEventSpecie(fQADataMaker[iDet]->GetRecoParam()->GetEventSpecie()) ;
413 fQADataMaker[iDet]->SetEventSpecie(fEventSpecie) ;
414 return fQADataMaker[iDet] ;
417 AliQADataMaker * qadm = NULL ;
419 if (iDet == AliQAv1::kGLOBAL) { //Global QA
420 qadm = new AliGlobalQADataMaker();
421 qadm->SetName(AliQAv1::GetDetName(iDet));
422 qadm->SetUniqueID(iDet);
423 fQADataMaker[iDet] = qadm;
424 if ( qadm->GetRecoParam() )
425 qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
427 qadm->SetEventSpecie(fEventSpecie) ;
431 if (iDet == AliQAv1::kCORR) { //the data maker for correlations among detectors
432 qadm = new AliCorrQADataMakerRec(fQADataMaker) ;
433 qadm->SetName(AliQAv1::GetDetName(iDet));
434 qadm->SetUniqueID(iDet);
435 fQADataMaker[iDet] = qadm;
436 if ( qadm->GetRecoParam() )
437 qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
439 qadm->SetEventSpecie(fEventSpecie) ;
443 // load the QA data maker object
444 TPluginManager* pluginManager = gROOT->GetPluginManager() ;
445 TString detName = AliQAv1::GetDetName(iDet) ;
447 if (tmp.Contains("sim"))
448 tmp.ReplaceAll("s", "S") ;
449 else if (tmp.Contains("rec"))
450 tmp.ReplaceAll("r", "R") ;
452 TString qadmName = "Ali" + detName + "QADataMaker" + tmp ;
454 // first check if a plugin is defined for the quality assurance data maker
455 TPluginHandler* pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
456 // if not, add a plugin for it
457 if (!pluginHandler) {
458 AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qadmName.Data())) ;
459 TString libs = gSystem->GetLibraries() ;
460 if (libs.Contains("lib" + detName + fMode + ".so") || (gSystem->Load("lib" + detName + fMode + ".so") >= 0)) {
461 pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()") ;
463 pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()") ;
465 pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
467 if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
468 qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(0) ;
471 qadm->SetName(AliQAv1::GetDetName(iDet));
472 qadm->SetUniqueID(iDet);
473 fQADataMaker[iDet] = qadm ;
474 if ( qadm->GetRecoParam() )
475 qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
477 qadm->SetEventSpecie(fEventSpecie) ;
483 //_____________________________________________________________________________
484 void AliQAManager::EndOfCycle(TObjArray * detArray)
486 // End of cycle QADataMakers
488 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
489 if (IsSelected(AliQAv1::GetDetName(iDet))) {
490 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
493 // skip non active detectors
495 AliModule* det = static_cast<AliModule*>(detArray->FindObject(AliQAv1::GetDetName(iDet))) ;
496 if (!det || !det->IsActive())
499 for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
500 if ( fTasks.Contains(Form("%d", taskIndex)) )
501 qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
508 //_____________________________________________________________________________
509 void AliQAManager::EndOfCycle(TString detectors)
511 // End of cycle QADataMakers
513 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
514 if (IsSelected(AliQAv1::GetDetName(iDet))) {
515 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
518 // skip non active detectors
519 if (!detectors.Contains(AliQAv1::GetDetName(iDet)))
521 for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
522 if ( fTasks.Contains(Form("%d", taskIndex)) )
523 qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
530 //_____________________________________________________________________________
531 void AliQAManager::Increment()
533 // Increments the cycle counter for all QA Data Makers
534 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
535 if (IsSelected(AliQAv1::GetDetName(iDet))) {
536 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
543 //_____________________________________________________________________________
544 Bool_t AliQAManager::InitQA(const AliQAv1::TASKINDEX_t taskIndex, const char * input )
546 // Initialize the event source and QA data makers
548 fTasks += Form("%d", taskIndex) ;
550 if (taskIndex == AliQAv1::kRAWS) {
552 fRawReader = AliRawReader::Create(input);
556 fRawReaderDelete = kTRUE ;
557 fRawReader->NextEvent() ;
558 fRunNumber = fRawReader->GetRunNumber() ;
560 fRawReader->RewindEvents();
561 fNumberOfEvents = 999999 ;
562 if ( fMaxEvents < 0 )
563 fMaxEvents = fNumberOfEvents ;
564 } else if (taskIndex == AliQAv1::kESDS) {
565 fTasks = AliQAv1::GetTaskName(AliQAv1::kESDS) ;
566 if (!gSystem->AccessPathName("AliESDs.root")) { // AliESDs.root exists
567 TFile * esdFile = TFile::Open("AliESDs.root") ;
568 fESDTree = dynamic_cast<TTree *> (esdFile->Get("esdTree")) ;
570 AliError("esdTree not found") ;
573 fESD = new AliESDEvent() ;
574 fESD->ReadFromTree(fESDTree) ;
575 fESDTree->GetEntry(0) ;
576 fRunNumber = fESD->GetRunNumber() ;
577 fNumberOfEvents = fESDTree->GetEntries() ;
578 if ( fMaxEvents < 0 )
579 fMaxEvents = fNumberOfEvents ;
582 AliError("AliESDs.root not found") ;
586 if ( !InitRunLoader() ) {
587 AliWarning("No Run Loader not found") ;
589 fNumberOfEvents = fRunLoader->GetNumberOfEvents() ;
590 if ( fMaxEvents < 0 )
591 fMaxEvents = fNumberOfEvents ;
596 TObjArray* detArray = NULL ;
597 if (fRunLoader) // check if RunLoader exists
598 if ( fRunLoader->GetAliRun() ) { // check if AliRun exists in gAlice.root
599 detArray = fRunLoader->GetAliRun()->Detectors() ;
600 fRunNumber = fRunLoader->GetHeader()->GetRun() ;
603 // Initialize all QA data makers for all detectors
604 fRunNumber = AliCDBManager::Instance()->GetRun() ;
605 if ( ! AliGeomManager::GetGeometry() )
606 AliGeomManager::LoadGeometry() ;
608 InitQADataMaker(fRunNumber, detArray) ; //, fCycleSame, kTRUE, detArray) ;
612 //_____________________________________________________________________________
613 void AliQAManager::InitQADataMaker(UInt_t run, TObjArray * detArray)
615 // Initializes The QADataMaker for all active detectors and for all active tasks
616 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
617 if (IsSelected(AliQAv1::GetDetName(iDet))) {
618 AliQADataMaker * qadm = GetQADataMaker(iDet) ;
620 AliError(Form("AliQADataMaker not found for %s", AliQAv1::GetDetName(iDet))) ;
621 fDetectorsW.ReplaceAll(AliQAv1::GetDetName(iDet), "") ;
623 if (fQAWriteExpert[iDet])
624 qadm->SetWriteExpert() ;
625 AliDebug(AliQAv1::GetQADebugLevel(), Form("Data Maker found for %s %d", qadm->GetName(), qadm->WriteExpert())) ;
626 // skip non active detectors
628 AliModule* det = static_cast<AliModule*>(detArray->FindObject(AliQAv1::GetDetName(iDet))) ;
629 if (!det || !det->IsActive())
632 // Set default reco params
633 Bool_t sameCycle = kFALSE ;
634 for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
635 if ( fTasks.Contains(Form("%d", taskIndex)) ) {
636 qadm->Init(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex)), GetQACycles(qadm->GetUniqueID())) ;
637 qadm->StartOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex)), run, sameCycle) ;
647 //_____________________________________________________________________________
648 Bool_t AliQAManager::InitRunLoader()
650 // get or create the run loader
654 if (!gSystem->AccessPathName(fGAliceFileName.Data())) { // galice.root exists
655 // load all base libraries to get the loader classes
656 TString libs = gSystem->GetLibraries() ;
657 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
658 if (!IsSelected(AliQAv1::GetDetName(iDet)))
660 TString detName = AliQAv1::GetDetName(iDet) ;
661 if (detName == "HLT")
663 if (libs.Contains("lib" + detName + "base.so"))
665 gSystem->Load("lib" + detName + "base.so");
667 fRunLoader = AliRunLoader::Open(fGAliceFileName.Data());
669 AliError(Form("no run loader found in file %s", fGAliceFileName.Data()));
672 fRunLoader->CdGAFile();
673 if (fRunLoader->LoadgAlice() == 0) {
674 gAlice = fRunLoader->GetAliRun();
678 AliError(Form("no gAlice object found in file %s", fGAliceFileName.Data()));
682 } else { // galice.root does not exist
683 AliError(Form("the file %s does not exist", fGAliceFileName.Data()));
689 fRunLoader->LoadHeader();
690 fRunNumber = fRunLoader->GetHeader()->GetRun() ;
695 //_____________________________________________________________________________
696 Bool_t AliQAManager::IsSelected(const char * det)
698 // check whether detName is contained in detectors
699 // if yes, it is removed from detectors
702 const TString detName(det) ;
703 // always activates Correlation
704 if ( detName.Contains(AliQAv1::GetDetName(AliQAv1::kCORR))) {
707 // check if all detectors are selected
708 if (fDetectors.Contains("ALL")) {
711 } else if ((fDetectors.CompareTo(detName) == 0) ||
712 fDetectors.BeginsWith(detName+" ") ||
713 fDetectors.EndsWith(" "+detName) ||
714 fDetectors.Contains(" "+detName+" ")) {
721 //_____________________________________________________________________________
722 Bool_t AliQAManager::Merge(Int_t runNumber) const
724 // Merge data from all detectors from a given run in one single file
725 // Merge the QA results from all the data chunks in one run
726 if ( runNumber == -1)
727 runNumber = fRunNumber ;
728 Bool_t rv = MergeData(runNumber) ;
729 //rv *= MergeResults(runNumber) ; // not needed for the time being
733 //______________________________________________________________________
734 Bool_t AliQAManager::MergeXML(const char * collectionFile, const char * subFile, const char * outFile)
736 // merges files listed in a xml collection
737 // usage Merge(collection, outputFile))
738 // collection: is a xml collection
742 if ( strstr(collectionFile, ".xml") == 0 ) {
743 AliError("Input collection file must be an \".xml\" file\n") ;
748 TGrid::Connect("alien://");
752 // Open the file collection
753 printf("*** Create Collection ***\n");
754 printf("*** Wk-Dir = |%s| \n",gSystem->WorkingDirectory());
755 printf("*** Coll = |%s| \n",collectionFile);
757 TGridCollection * collection = (TGridCollection*)gROOT->ProcessLine(Form("TAlienCollection::Open(\"%s\")",collectionFile));
758 TGridResult* result = collection->GetGridResult("", 0, 0);
762 TFileMerger merger(kFALSE) ;
764 TString tempo(collectionFile) ;
766 tempo.ReplaceAll(".xml", subFile) ;
768 tempo.ReplaceAll(".xml", "_Merged.root") ;
769 outFile = tempo.Data() ;
771 merger.OutputFile(outFile) ;
773 while ( (turl = result->GetKey(index, "turl")) ) {
776 file = Form("%s#%s", turl, subFile) ;
778 file = Form("%s", turl) ;
780 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s\n", file)) ;
781 merger.AddFile(file) ;
788 AliDebug(AliQAv1::GetQADebugLevel(), Form("Files merged into %s\n", outFile)) ;
794 //_____________________________________________________________________________
795 void AliQAManager::MergeCustom() const
797 // Custom Merge of QA data from all detectors for all runs in one single file
798 // search all the run numbers
799 // search all the run numbers
800 gROOT->ProcessLine(".! ls *QA*.root > QAtempo.txt") ;
802 FILE * QAfiles = fopen("QAtempo.txt", "r") ;
805 TIter nextRun(&srunList) ;
806 TObjString * srun = NULL ;
807 Int_t loRun = 999999999 ;
809 while ( QAfile.Gets(QAfiles) ) {
810 Bool_t runExist = kFALSE ;
811 TString srunNew(QAfile(QAfile.Index("QA.")+3, QAfile.Index(".root")-(QAfile.Index("QA.")+3))) ;
812 Int_t cuRun = srunNew.Atoi() ;
817 while ( (srun = dynamic_cast<TObjString *> (nextRun())) ) {
818 if ( cuRun == (srun->String()).Atoi() ) {
825 srunList.Add(new TObjString(srunNew.Data()));
828 Int_t runNumber = 0 ;
829 TFile mergedFile(Form("Merged.%s.Data.root", AliQAv1::GetQADataFileName()), "RECREATE") ;
830 TH1I * hisRun = new TH1I("hLMR", "List of merged runs", hiRun-loRun+10, loRun, hiRun+10) ;
831 // create the structure into the merged file
832 for (Int_t iDet = 0; iDet < AliQAv1::kNDET ; iDet++) {
833 TDirectory * detDir = mergedFile.mkdir(AliQAv1::GetDetName(iDet)) ;
834 for (Int_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
836 TDirectory * taskDir = gDirectory->mkdir(AliQAv1::GetTaskName(taskIndex)) ;
837 for (Int_t es = 0 ; es < AliRecoParam::kNSpecies ; es++) {
839 TDirectory * esDir = gDirectory->mkdir(AliRecoParam::GetEventSpecieName(es)) ;
841 gDirectory->mkdir(AliQAv1::GetExpert()) ;
845 while ( (srun = dynamic_cast<TObjString *> (nextRun())) ) {
846 runNumber = (srun->String()).Atoi() ;
847 hisRun->Fill(runNumber) ;
848 AliDebug(AliQAv1::GetQADebugLevel(), Form("Merging run number %d", runNumber)) ;
849 // search all QA files for runNumber in the current directory
850 char * fileList[AliQAv1::kNDET] ;
852 for (Int_t iDet = 0; iDet < AliQAv1::kNDET ; iDet++) {
853 char * file = gSystem->Which(gSystem->WorkingDirectory(), Form("%s.%s.%d.root", AliQAv1::GetDetName(iDet), AliQAv1::GetQADataFileName(), runNumber));
855 fileList[index++] = file ;
858 AliError("No QA data file found\n") ;
861 for ( Int_t i = 0 ; i < index ; i++) {
862 TFile * inFile = TFile::Open(fileList[i]) ;
863 TList * listOfKeys =inFile->GetListOfKeys() ;
864 TIter nextkey(listOfKeys) ;
866 TString dirName("") ;
867 while ( (obj1 = nextkey()) ) {
868 TDirectory * directoryDet = inFile->GetDirectory(obj1->GetName()) ;
869 if ( directoryDet ) {
870 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s dir = %s", inFile->GetName(), directoryDet->GetName())) ;
871 dirName += Form("%s/", directoryDet->GetName() ) ;
873 TList * listOfTasks = directoryDet->GetListOfKeys() ;
874 TIter nextTask(listOfTasks) ;
876 while ( (obj2 = nextTask()) ) {
877 TDirectory * directoryTask = directoryDet->GetDirectory(obj2->GetName()) ;
878 if ( directoryTask ) {
879 dirName += Form("%s", obj2->GetName()) ;
880 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s", dirName.Data())) ;
881 directoryTask->cd() ;
882 TList * listOfEventSpecie = directoryTask->GetListOfKeys() ;
883 TIter nextEventSpecie(listOfEventSpecie) ;
885 while ( (obj3 = nextEventSpecie()) ) {
886 TDirectory * directoryEventSpecie = directoryTask->GetDirectory(obj3->GetName()) ;
887 if ( directoryEventSpecie ) {
888 dirName += Form("/%s/", obj3->GetName()) ;
889 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s\n", dirName.Data())) ;
890 directoryEventSpecie->cd() ;
891 // histograms are here
892 TDirectory * mergedDirectory = mergedFile.GetDirectory(dirName.Data()) ;
893 TList * listOfData = directoryEventSpecie->GetListOfKeys() ;
894 TIter nextData(listOfData) ;
896 while ( (key = dynamic_cast<TKey *>(nextData())) ) {
897 TString className(key->GetClassName()) ;
898 if ( className.Contains("TH") || className.Contains("TProfile") ) {
899 TH1 * histIn = dynamic_cast<TH1*> (key->ReadObj()) ;
900 TH1 * histOu = dynamic_cast<TH1*> (mergedDirectory->FindObjectAny(histIn->GetName())) ;
901 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s %x %x\n", key->GetName(), histIn, histOu)) ;
902 mergedDirectory->cd() ;
906 histOu->Add(histIn) ;
907 histOu->Write(histOu->GetName(), kOverwrite) ;
910 else if ( className.Contains("TDirectoryFile") ) {
911 TDirectory * dirExpert = directoryEventSpecie->GetDirectory(key->GetName()) ;
913 TDirectory * mergedDirectoryExpert = mergedDirectory->GetDirectory(dirExpert->GetName()) ;
914 TList * listOfExpertData = dirExpert->GetListOfKeys() ;
915 TIter nextExpertData(listOfExpertData) ;
917 while ( (keykey = dynamic_cast<TKey *>(nextExpertData())) ) {
918 TString classNameExpert(keykey->GetClassName()) ;
919 if (classNameExpert.Contains("TH")) {
920 TH1 * histInExpert = dynamic_cast<TH1*> (keykey->ReadObj()) ;
921 TH1 * histOuExpert = dynamic_cast<TH1*> (mergedDirectory->FindObjectAny(histInExpert->GetName())) ;
922 mergedDirectoryExpert->cd() ;
923 if ( ! histOuExpert ) {
924 histInExpert->Write() ;
926 histOuExpert->Add(histInExpert) ;
927 histOuExpert->Write(histOuExpert->GetName(), kOverwrite) ;
932 AliError(Form("No merge done for this object %s in %s", key->GetName(), dirName.Data())) ;
935 dirName.ReplaceAll(Form("/%s/",obj3->GetName()), "") ;
938 dirName.ReplaceAll(obj2->GetName(), "") ;
952 //_____________________________________________________________________________
953 Bool_t AliQAManager::MergeData(const Int_t runNumber) const
955 // Merge QA data from all detectors for a given run in one single file
958 TString outFileName = Form("Merged.%s.Data.root",AliQAv1::GetQADataFileName()) ;
959 merger.OutputFile(outFileName.Data()) ;
960 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
961 char * file = gSystem->Which(gSystem->WorkingDirectory(), Form("%s.%s.%d.root", AliQAv1::GetDetName(iDet), AliQAv1::GetQADataFileName(), runNumber));
963 merger.AddFile(file) ;
969 //_____________________________________________________________________________
970 Bool_t AliQAManager::MergeResults(const Int_t runNumber) const
972 // Merge the QA result from all the data chunks in a run
973 // to be revised whwn it will be used (see MergeData)
975 cmd = Form(".! ls %s*.root > tempo.txt", AliQAv1::GetQADataFileName()) ;
976 gROOT->ProcessLine(cmd.Data()) ;
977 ifstream in("tempo.txt") ;
978 const Int_t chunkMax = 100 ;
979 TString fileList[chunkMax] ;
984 in >> fileList[index] ;
987 AliDebug(AliQAv1::GetQADebugLevel(), Form("index = %d file = %s", index, (fileList[index].Data()))) ;
992 AliError("No QA Result File found") ;
997 TString outFileName ;
999 outFileName = Form("Merged.%s.Result.%d.root",AliQAv1::GetQADataFileName(),runNumber);
1001 outFileName = Form("Merged.%s.Result.root",AliQAv1::GetQADataFileName());
1002 merger.OutputFile(outFileName.Data()) ;
1003 for (Int_t ifile = 0 ; ifile < index ; ifile++) {
1004 TString file = fileList[ifile] ;
1005 merger.AddFile(file) ;
1012 //_____________________________________________________________________________
1013 void AliQAManager::Reset(const Bool_t sameCycle)
1015 // Reset the default data members
1017 for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
1018 if (IsSelected(AliQAv1::GetDetName(iDet))) {
1019 AliQADataMaker * qadm = GetQADataMaker(iDet);
1023 if (fRawReaderDelete) {
1028 fCycleSame = sameCycle ;
1032 fNumberOfEvents = 999999 ;
1035 //_____________________________________________________________________________
1036 AliQAManager * AliQAManager::QAManager(const Char_t * mode, TMap *entryCache, Int_t run)
1038 // returns AliQAManager instance (singleton)
1040 if (!fgQAInstance) {
1041 fgQAInstance = new AliQAManager(mode) ;
1043 fgQAInstance->Init();
1045 fgQAInstance->InitFromCache(entryCache,run);
1047 return fgQAInstance;
1050 //_____________________________________________________________________________
1051 TString AliQAManager::Run(const char * detectors, AliRawReader * rawReader, const Bool_t sameCycle)
1053 //Runs all the QA data Maker for Raws only
1055 fCycleSame = sameCycle ;
1056 fRawReader = rawReader ;
1057 fDetectors = detectors ;
1058 fDetectorsW = detectors ;
1060 AliCDBManager* man = AliCDBManager::Instance() ;
1062 if ( man->GetRun() == -1 ) {// check if run number not set previously and set it from raw data
1063 rawReader->NextEvent() ;
1064 man->SetRun(fRawReader->GetRunNumber()) ;
1065 rawReader->RewindEvents() ;
1069 if ( !InitQA(AliQAv1::kRAWS) )
1071 fRawReaderDelete = kFALSE ;
1073 DoIt(AliQAv1::kRAWS) ;
1074 return fDetectorsW ;
1077 //_____________________________________________________________________________
1078 TString AliQAManager::Run(const char * detectors, const char * fileName, const Bool_t sameCycle)
1080 //Runs all the QA data Maker for Raws only
1082 fCycleSame = sameCycle ;
1083 fDetectors = detectors ;
1084 fDetectorsW = detectors ;
1086 AliCDBManager* man = AliCDBManager::Instance() ;
1087 if ( man->GetRun() == -1 ) { // check if run number not set previously and set it from AliRun
1088 AliRunLoader * rl = AliRunLoader::Open("galice.root") ;
1090 AliFatal("galice.root file not found in current directory") ;
1094 if ( ! rl->GetAliRun() ) {
1095 AliFatal("AliRun not found in galice.root") ;
1098 man->SetRun(rl->GetHeader()->GetRun());
1104 if ( !InitQA(AliQAv1::kRAWS, fileName) )
1107 DoIt(AliQAv1::kRAWS) ;
1108 return fDetectorsW ;
1111 //_____________________________________________________________________________
1112 TString AliQAManager::Run(const char * detectors, const AliQAv1::TASKINDEX_t taskIndex, Bool_t const sameCycle, const char * fileName )
1114 // Runs all the QA data Maker for every detector
1116 fCycleSame = sameCycle ;
1117 fDetectors = detectors ;
1118 fDetectorsW = detectors ;
1120 AliCDBManager* man = AliCDBManager::Instance() ;
1121 if ( man->GetRun() == -1 ) { // check if run number not set previously and set it from AliRun
1122 AliRunLoader * rl = AliRunLoader::Open("galice.root") ;
1124 AliFatal("galice.root file not found in current directory") ;
1128 if ( ! rl->GetAliRun() ) {
1129 AliDebug(AliQAv1::GetQADebugLevel(), "AliRun not found in galice.root") ;
1132 man->SetRun(rl->GetHeader()->GetRun()) ;
1138 if ( taskIndex == AliQAv1::kNULLTASKINDEX) {
1139 for (UInt_t task = 0; task < AliQAv1::kNTASKINDEX; task++) {
1140 if ( fTasks.Contains(Form("%d", task)) ) {
1142 if ( !InitQA(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(task)), fileName) )
1144 DoIt(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(task))) ;
1149 if ( !InitQA(taskIndex, fileName) )
1154 return fDetectorsW ;
1158 //_____________________________________________________________________________
1159 void AliQAManager::RunOneEvent(AliRawReader * rawReader)
1161 //Runs all the QA data Maker for Raws only and on one event only (event loop done by calling method)
1164 AliCodeTimerAuto("") ;
1165 if (fTasks.Contains(Form("%d", AliQAv1::kRAWS))){
1166 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
1167 if (!IsSelected(AliQAv1::GetDetName(iDet)))
1169 AliQADataMaker *qadm = GetQADataMaker(iDet);
1172 if ( qadm->IsCycleDone() ) {
1173 qadm->EndOfCycle() ;
1175 AliCodeTimerStart(Form("running RAW quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
1176 if ( qadm->GetRecoParam() )
1177 qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
1179 qadm->SetEventSpecie(fEventSpecie) ;
1180 qadm->Exec(AliQAv1::kRAWS, rawReader) ;
1181 AliCodeTimerStop(Form("running RAW quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
1186 //_____________________________________________________________________________
1187 void AliQAManager::RunOneEvent(AliESDEvent *& esd)
1189 //Runs all the QA data Maker for ESDs only and on one event only (event loop done by calling method)
1191 AliCodeTimerAuto("") ;
1192 if (fTasks.Contains(Form("%d", AliQAv1::kESDS))) {
1193 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
1194 if (!IsSelected(AliQAv1::GetDetName(iDet)))
1196 AliQADataMaker *qadm = GetQADataMaker(iDet);
1199 if ( qadm->IsCycleDone() ) {
1200 qadm->EndOfCycle() ;
1202 AliCodeTimerStart(Form("running ESD quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
1203 qadm->Exec(AliQAv1::kESDS, esd) ;
1204 AliCodeTimerStop(Form("running ESD quality assurance data maker for %s", AliQAv1::GetDetName(iDet)));
1209 //_____________________________________________________________________________
1210 void AliQAManager::RunOneEventInOneDetector(Int_t det, TTree * tree)
1212 // Runs all the QA data Maker for ESDs only and on one event only (event loop done by calling method)
1213 AliCodeTimerAuto("") ;
1214 if (fTasks.Contains(Form("%d", AliQAv1::kRECPOINTS))) {
1215 if (IsSelected(AliQAv1::GetDetName(det))) {
1216 AliQADataMaker *qadm = GetQADataMaker(det);
1218 if ( qadm->IsCycleDone() ) {
1219 qadm->EndOfCycle() ;
1221 AliCodeTimerStart(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
1222 qadm->Exec(AliQAv1::kRECPOINTS, tree) ;
1223 AliCodeTimerStop(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
1229 //_____________________________________________________________________________
1230 Bool_t AliQAManager::Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year, const char * detectors) const
1232 // take the locasl QA data merge into a single file and save in OCDB
1234 TString tmp(AliQAv1::GetQARefStorage()) ;
1235 if ( tmp.IsNull() ) {
1236 AliError("No storage defined, use AliQAv1::SetQARefStorage") ;
1239 if ( !(tmp.Contains(AliQAv1::GetLabLocalOCDB()) || tmp.Contains(AliQAv1::GetLabAliEnOCDB())) ) {
1240 AliError(Form("%s is a wrong storage, use %s or %s", AliQAv1::GetQARefStorage(), AliQAv1::GetLabLocalOCDB().Data(), AliQAv1::GetLabAliEnOCDB().Data())) ;
1243 TString sdet(detectors) ;
1246 if ( sdet.Contains("ALL") ) {
1247 rv = Merge(runNumber) ;
1250 TString inputFileName(Form("Merged.%s.Data.%d.root", AliQAv1::GetQADataFileName(), runNumber)) ;
1251 inputFile = TFile::Open(inputFileName.Data()) ;
1252 rv = SaveIt2OCDB(runNumber, inputFile, year, es) ;
1254 for (Int_t index = 0; index < AliQAv1::kNDET; index++) {
1255 if (sdet.Contains(AliQAv1::GetDetName(index))) {
1256 TString inputFileName(Form("%s.%s.%d.root", AliQAv1::GetDetName(index), AliQAv1::GetQADataFileName(), runNumber)) ;
1257 inputFile = TFile::Open(inputFileName.Data()) ;
1258 rv *= SaveIt2OCDB(runNumber, inputFile, year, es) ;
1265 //_____________________________________________________________________________
1266 Bool_t AliQAManager::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const
1268 // reads the TH1 from file and adds it to appropriate list before saving to OCDB
1270 AliDebug(AliQAv1::GetQADebugLevel(), Form("Saving TH1s in %s to %s", inputFile->GetName(), AliQAv1::GetQARefStorage())) ;
1271 if ( ! IsDefaultStorageSet() ) {
1272 TString tmp( AliQAv1::GetQARefStorage() ) ;
1273 if ( tmp.Contains(AliQAv1::GetLabLocalOCDB()) )
1274 Instance()->SetDefaultStorage(AliQAv1::GetQARefStorage()) ;
1276 TString tmp1(AliQAv1::GetQARefDefaultStorage()) ;
1278 tmp1.Append("?user=alidaq") ;
1279 Instance()->SetDefaultStorage(tmp1.Data()) ;
1282 Instance()->SetSpecificStorage("*", AliQAv1::GetQARefStorage()) ;
1284 Instance()->SetRun(runNumber);
1286 AliCDBMetaData mdr ;
1287 mdr.SetResponsible("yves schutz");
1289 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++) {
1290 TDirectory * detDir = inputFile->GetDirectory(AliQAv1::GetDetName(detIndex)) ;
1292 AliDebug(AliQAv1::GetQADebugLevel(), Form("Entering %s", detDir->GetName())) ;
1293 AliQAv1::SetQARefDataDirName(es) ;
1294 TString detOCDBDir(Form("%s/%s/%s", AliQAv1::GetDetName(detIndex), AliQAv1::GetRefOCDBDirName(), AliQAv1::GetRefDataDirName())) ;
1295 AliCDBId idr(detOCDBDir.Data(), runNumber, AliCDBRunRange::Infinity()) ;
1296 TList * listDetQAD = new TList() ;
1297 TString listName(Form("%s QA data Reference", AliQAv1::GetDetName(detIndex))) ;
1298 mdr.SetComment(Form("%s QA stuff", AliQAv1::GetDetName(detIndex)));
1299 listDetQAD->SetName(listName) ;
1300 TList * taskList = detDir->GetListOfKeys() ;
1301 TIter nextTask(taskList) ;
1303 while ( (taskKey = dynamic_cast<TKey*>(nextTask())) ) {
1304 TDirectory * taskDir = detDir->GetDirectory(taskKey->GetName()) ;
1305 TDirectory * esDir = taskDir->GetDirectory(AliRecoParam::GetEventSpecieName(es)) ;
1306 AliDebug(AliQAv1::GetQADebugLevel(), Form("Saving %s", esDir->GetName())) ;
1307 TObjArray * listTaskQAD = new TObjArray(100) ;
1308 listTaskQAD->SetName(Form("%s/%s", taskKey->GetName(), AliRecoParam::GetEventSpecieName(es))) ;
1309 listDetQAD->Add(listTaskQAD) ;
1310 TList * histList = esDir->GetListOfKeys() ;
1311 TIter nextHist(histList) ;
1313 while ( (histKey = dynamic_cast<TKey*>(nextHist())) ) {
1314 TObject * odata = esDir->Get(histKey->GetName()) ;
1316 AliError(Form("%s in %s/%s returns a NULL pointer !!", histKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
1318 if ( AliQAv1::GetExpert() == histKey->GetName() ) {
1319 TDirectory * expertDir = esDir->GetDirectory(histKey->GetName()) ;
1320 TList * expertHistList = expertDir->GetListOfKeys() ;
1321 TIter nextExpertHist(expertHistList) ;
1322 TKey * expertHistKey ;
1323 while ( (expertHistKey = dynamic_cast<TKey*>(nextExpertHist())) ) {
1324 TObject * expertOdata = expertDir->Get(expertHistKey->GetName()) ;
1325 if ( !expertOdata ) {
1326 AliError(Form("%s in %s/%s/Expert returns a NULL pointer !!", expertHistKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
1328 AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding %s", expertHistKey->GetName())) ;
1329 if ( expertOdata->IsA()->InheritsFrom("TH1") ) {
1330 AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding %s", expertHistKey->GetName())) ;
1331 TH1 * hExpertdata = static_cast<TH1*>(expertOdata) ;
1332 listTaskQAD->Add(hExpertdata) ;
1337 AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding %s", histKey->GetName())) ;
1338 if ( odata->IsA()->InheritsFrom("TH1") ) {
1339 AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding %s", histKey->GetName())) ;
1340 TH1 * hdata = static_cast<TH1*>(odata) ;
1341 listTaskQAD->Add(hdata) ;
1346 Instance()->Put(listDetQAD, idr, &mdr) ;
1352 //_____________________________________________________________________________
1353 void AliQAManager::SetEventSpecie(AliRecoParam::EventSpecie_t es)
1355 // set the current event specie and inform AliQAv1 that this event specie has been encountered
1357 AliQAv1::Instance()->SetEventSpecie(es) ;
1360 //_____________________________________________________________________________
1361 void AliQAManager::SetRecoParam(const Int_t det, const AliDetectorRecoParam *par)
1363 // Set custom reconstruction parameters for a given detector
1364 // Single set of parameters for all the events
1365 GetQADataMaker(det)->SetRecoParam(par) ;
1368 //_____________________________________________________________________________
1369 void AliQAManager::SetWriteExpert()
1371 // enable the writing of QA expert data
1372 for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
1373 if (IsSelected(AliQAv1::GetDetName(iDet)))
1374 fQAWriteExpert[iDet] = kTRUE ;