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 **************************************************************************/
15 /* $Id: AliQAv1.cxx 31503 2009-03-16 11:01:16Z schutz $ */
17 //////////////////////////////////////////////////////////////////////////////
19 // Quality Assurance Object//_________________________________________________________________________
20 // Quality Assurance object. The QA status is held in one word per detector,
21 // each bit corresponds to a different status.
22 // bit 0-3 : QA raised during simulation (RAW)
23 // bit 4-7 : QA raised during simulation (SIM)
24 // bit 8-11 : QA raised during reconstruction (REC)
25 // bit 12-15 : QA raised during ESD checking (ESD)
26 // bit 16-19 : QA raised during analysis (ANA)
27 // Each of the 4 bits corresponds to a severity level of increasing importance
28 // from lower to higher bit (INFO, WARNING, ERROR, FATAL)
30 //*-- Yves Schutz CERN, July 2007
31 //////////////////////////////////////////////////////////////////////////////
35 // --- ROOT system ---
42 // --- Standard library ---
44 // --- AliRoot header files ---
50 AliQAv1 * AliQAv1::fgQA = 0x0 ;
51 TFile * AliQAv1::fgQADataFile = 0x0 ;
52 TString AliQAv1::fgQADataFileName = "QA" ; // will transform into Det.QA.run.root
53 TFile * AliQAv1::fgQARefFile = 0x0 ;
54 TString AliQAv1::fgQARefDirName = "" ;
55 TString AliQAv1::fgQARefFileName = "QA.root" ;
56 TFile * AliQAv1::fgQAResultFile = 0x0 ;
57 TString AliQAv1::fgQAResultDirName = "" ;
58 TString AliQAv1::fgQAResultFileName = "QA.root" ;
59 TString AliQAv1::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
60 "ZDC", "PMD", "T0", "VZERO", "ACORDE","AD","FIT","MFT", "HLT", "Global", "CORR" } ;
61 TString AliQAv1::fgGRPPath = "GRP/GRP/Data" ;
62 TString AliQAv1::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "DigitsR", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
63 TString AliQAv1::fgModeNames[] = {"", "Sim", "Rec", "QA"} ;
64 const TString AliQAv1::fgkLabLocalFile = "file://" ;
65 const TString AliQAv1::fgkLabLocalOCDB = "local://" ;
66 const TString AliQAv1::fgkLabAliEnOCDB = "alien://" ;
67 const TString AliQAv1::fgkRefFileName = "QA.root" ;
68 const TString AliQAv1::fgkQAName = "QA" ;
69 const TString AliQAv1::fgkQACorrNtName = "CorrQA" ;
70 const TString AliQAv1::fgkRefOCDBDirName = "QA" ;
71 TString AliQAv1::fgRefDataDirName = "" ;
72 const TString AliQAv1::fgkQARefOCDBDefault = "alien://folder=/alice/QA/20" ;
73 const TString AliQAv1::fgkExpert = "Expert" ;
75 const UInt_t AliQAv1::fgkQAClonedBit = BIT(14); // RS: bits set to the histos or arrays of cloned histos
76 const UInt_t AliQAv1::fgkForbidCloningBit = BIT(15); // to flag the state (cloned or not) of the
77 const UInt_t AliQAv1::fgkOrigHistoKeptBit = BIT(16); // object at the given slot of fXXXQAList[]
79 const UInt_t AliQAv1::fgkExpertBit = BIT(19);
80 const UInt_t AliQAv1::fgkQABit = BIT(20) ;
81 const UInt_t AliQAv1::fgkImageBit = BIT(21) ;
82 const Int_t AliQAv1::fgkQADebugLevel = 99 ;
83 const TString AliQAv1::fgkImageFileName = "QAImage" ;
84 const TString AliQAv1::fImageFileFormat = "ps" ;
85 const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ;
87 //____________________________________________________________________________
91 fNEventSpecies(AliRecoParam::kNSpecies),
92 fLengthQA(fNdet*fNEventSpecies),
93 fQA(new ULong_t[fLengthQA]),
96 fEventSpecie(AliRecoParam::kDefault),
97 fEventSpecies(new Bool_t[fNEventSpecies])
99 // default constructor
100 memset(fQA,0,fLengthQA*sizeof(ULong_t));
101 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
104 //____________________________________________________________________________
105 AliQAv1::AliQAv1(const AliQAv1& qa) :
108 fNEventSpecies(qa.fNEventSpecies),
109 fLengthQA(qa.fLengthQA),
110 fQA(new ULong_t[fLengthQA]),
113 fEventSpecie(qa.fEventSpecie),
114 fEventSpecies(new Bool_t[fNEventSpecies])
117 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
118 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
121 //_____________________________________________________________________________
122 AliQAv1& AliQAv1::operator = (const AliQAv1& qa)
124 // assignment operator
126 TNamed::operator=(qa);
128 fNEventSpecies = qa.fNEventSpecies;
129 fLengthQA = qa.fLengthQA;
131 if(fQA) delete [] fQA;
132 fQA = new ULong_t[fLengthQA];
133 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
137 fEventSpecie = qa.fEventSpecie;
138 if(fEventSpecies) delete [] fEventSpecies;
139 fEventSpecies = new Bool_t[fNEventSpecies];
140 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
145 //_______________________________________________________________
146 AliQAv1::AliQAv1(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es) :
147 TNamed("QA", "Quality Assurance status"),
149 fNEventSpecies(eslength),
151 fQA(new ULong_t[fLengthQA]),
154 fEventSpecie(AliRecoParam::kDefault),
155 fEventSpecies(new Bool_t[fNEventSpecies])
157 // constructor to be used
158 memcpy(fQA, qa, fLengthQA*sizeof(ULong_t));
159 memcpy(fEventSpecies, es, fNEventSpecies*sizeof(Bool_t));
162 //_______________________________________________________________
163 AliQAv1::AliQAv1(const DETECTORINDEX_t det) :
164 TNamed("QA", "Quality Assurance status"),
166 fNEventSpecies(AliRecoParam::kNSpecies),
167 fLengthQA(fNdet*fNEventSpecies),
168 fQA(new ULong_t[fLengthQA]),
171 fEventSpecie(AliRecoParam::kDefault),
172 fEventSpecies(new Bool_t[fNEventSpecies])
174 // constructor to be used
175 if (! CheckRange(det) ) fDet = kNULLDET ;
176 memset(fQA,0,fLengthQA*sizeof(ULong_t));
177 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
180 //_______________________________________________________________
181 AliQAv1::AliQAv1(const ALITASK_t tsk) :
182 TNamed("QA", "Quality Assurance status"),
184 fNEventSpecies(AliRecoParam::kNSpecies),
185 fLengthQA(fNdet*fNEventSpecies),
186 fQA(new ULong_t[fLengthQA]),
189 fEventSpecie(AliRecoParam::kDefault),
190 fEventSpecies(new Bool_t[fNEventSpecies])
192 // constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
193 if (! CheckRange(tsk) ) fTask = kNULLTASK ;
194 memset(fQA,0,fLengthQA*sizeof(ULong_t));
195 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
198 //____________________________________________________________________________
203 delete [] fEventSpecies;
206 //_______________________________________________________________
207 void AliQAv1::Close()
209 // close the open files
211 if (fgQADataFile->IsOpen())
212 fgQADataFile->Close() ;
214 if (fgQAResultFile->IsOpen())
215 fgQAResultFile->Close() ;
217 if (fgQARefFile->IsOpen())
218 fgQARefFile->Close() ;
221 //_______________________________________________________________
222 Bool_t AliQAv1::CheckFatal() const
224 // check if any FATAL status is set
227 for (index = 0; index < kNDET ; index++)
228 rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
232 //_______________________________________________________________
233 Bool_t AliQAv1::CheckRange(DETECTORINDEX_t det) const
235 // check if detector is in given detector range: 0-kNDET
237 Bool_t rv = ( det < 0 || det > kNDET ) ? kFALSE : kTRUE ;
239 AliFatal(Form("Detector index %d is out of range: 0 <= index <= %d", det, kNDET)) ;
243 //_______________________________________________________________
244 Bool_t AliQAv1::CheckRange(ALITASK_t task) const
246 // check if task is given taskk range: 0:kNTASK
247 Bool_t rv = ( task < kRAW || task > kNTASK ) ? kFALSE : kTRUE ;
249 AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
253 //_______________________________________________________________
254 Bool_t AliQAv1::CheckRange(QABIT_t bit) const
256 // check if bit is in given bit range: 0-kNBit
258 Bool_t rv = ( bit < 0 || bit > kNBIT ) ? kFALSE : kTRUE ;
260 AliFatal(Form("Status bit %d is out of range: 0 <= bit <= %d", bit, kNBIT)) ;
264 //_______________________________________________________________
265 Bool_t AliQAv1::CheckRange(AliRecoParam::EventSpecie_t es) const
267 // check if bit is in given bit range: 0-kNBit
270 case AliRecoParam::kDefault:
273 case AliRecoParam::kLowMult:
276 case AliRecoParam::kHighMult:
279 case AliRecoParam::kCosmic:
282 case AliRecoParam::kCalib:
287 AliFatal(Form("Event Specie %d is not valid", es)) ;
291 //_______________________________________________________________
292 const char * AliQAv1::GetAliTaskName(ALITASK_t tsk)
294 // returns the char name corresponding to module index
320 //_______________________________________________________________
321 const char * AliQAv1::GetBitName(QABIT_t bit) const
323 // returns the char name corresponding to bit
333 bitName = "WARNING" ;
345 return bitName.Data() ;
348 //_______________________________________________________________
349 TH1 * AliQAv1::GetData(TObjArray** list, Int_t index, AliRecoParam::EventSpecie_t eventSpecie)
351 // retrieve QA data from the list at a given index and for a given event specie
353 Int_t esindex = AliRecoParam::AConvert(eventSpecie) ;
354 TObjArray * arr = list[esindex] ;
356 if ( index > AliQAv1::GetMaxQAObj() ) {
357 AliErrorClass(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ;
359 if ( arr->At(index) ) {
360 rv = static_cast<TH1*>(arr->At(index)) ;
367 //_______________________________________________________________
368 AliQAv1::DETECTORINDEX_t AliQAv1::GetDetIndex(const char * name)
370 // returns the detector index corresponding to a given name
371 TString sname(name) ;
372 DETECTORINDEX_t rv = kNULLDET ;
373 for (Int_t det = 0; det < kNDET ; det++) {
374 if ( GetDetName(det) == sname ) {
375 rv = DETECTORINDEX_t(det) ;
382 //_______________________________________________________________
383 const char * AliQAv1::GetDetName(Int_t det)
385 // returns the detector name corresponding to a given index (needed in a loop)
387 if ( det >= 0 && det < kNDET)
388 return (fgDetNames[det]).Data() ;
393 //_______________________________________________________________
394 TFile * AliQAv1::GetQADataFile(const char * name, Int_t run)
396 // opens the file to store the detectors Quality Assurance Data Maker results
397 const char * temp = Form("%s.%s.%d.root", name, fgQADataFileName.Data(), run) ;
399 if (! fgQADataFile ) {
400 if (gSystem->AccessPathName(temp))
404 fgQADataFile = TFile::Open(temp, opt.Data()) ;
406 if ( strcmp(temp, fgQADataFile->GetName()) != 0 ) {
407 fgQADataFile = static_cast<TFile *>(gROOT->FindObject(temp)) ;
408 if ( !fgQADataFile ) {
409 if (gSystem->AccessPathName(temp))
413 fgQADataFile = TFile::Open(temp, opt.Data()) ;
417 return fgQADataFile ;
420 //_____________________________________________________________________________
421 AliQAv1::MODE_t AliQAv1::Mode(TASKINDEX_t task) {
422 // return "rec" or "sim" depending on the task
431 case AliQAv1::kSDIGITS:
434 case AliQAv1::kDIGITS:
437 case AliQAv1::kDIGITSR:
440 case AliQAv1::kRECPOINTS:
443 case AliQAv1::kTRACKSEGMENTS:
446 case AliQAv1::kRECPARTICLES:
455 return AliQAv1::kNULLMODE;
458 //_____________________________________________________________________________
459 TFile * AliQAv1::GetQADataFile(const char * fileName)
461 // Open if necessary the Data file and return its pointer
465 fileName = AliQAv1::GetQADataFileName() ;
466 if (!gSystem->AccessPathName(fileName)) {
467 fgQADataFile = TFile::Open(fileName) ;
469 AliFatalClass(Form("File %s not found", fileName)) ;
472 return fgQADataFile ;
475 //_______________________________________________________________
476 TFile * AliQAv1::GetQAResultFile()
478 // opens the file to store the Quality Assurance Data Checker results
479 if (fgQAResultFile) {
480 if (fgQAResultFile->IsOpen())
481 fgQAResultFile->Close();
482 delete fgQAResultFile;
484 TString dirName(fgQAResultDirName) ;
485 if ( dirName.Contains(fgkLabLocalFile))
486 dirName.ReplaceAll(fgkLabLocalFile, "") ;
487 TString fileName(dirName + fgQAResultFileName) ;
489 if ( !gSystem->AccessPathName(fileName) )
492 if ( gSystem->AccessPathName(dirName) )
493 gSystem->mkdir(dirName) ;
496 fgQAResultFile = TFile::Open(fileName, opt) ;
497 return fgQAResultFile ;
500 //_______________________________________________________________
501 AliQAv1::QABIT_t AliQAv1::GetQAStatusBit(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk) const
503 // returns the QA bit set
504 QABIT_t rv = kNULLBit ;
505 if ( es == AliRecoParam::kDefault)
507 if ( det == kNULLDET )
509 if ( tsk == kNULLTASK )
511 for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
512 if (IsSet(det, tsk, es, QABIT_t(bit)))
518 //_______________________________________________________________
519 AliQAv1::TASKINDEX_t AliQAv1::GetTaskIndex(const char * name)
521 // returns the detector index corresponding to a given name
522 TString sname(name) ;
523 TASKINDEX_t rv = kNULLTASKINDEX ;
524 for (Int_t tsk = 0; tsk < kNTASKINDEX ; tsk++) {
525 if ( GetTaskName(tsk) == sname ) {
526 rv = TASKINDEX_t(tsk) ;
533 //_______________________________________________________________
534 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t ies, QABIT_t bit) const
536 // Checks is the requested bit is set
538 const AliRecoParam::EventSpecie_t es = AliRecoParam::Convert(ies) ;
539 return IsSet(det, tsk, es, bit) ;
543 //_______________________________________________________________
544 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const
546 // Checks is the requested bit is set
553 ULong_t offset = Offset(tsk) ;
554 ULong_t status = GetStatus(det, es) ;
556 status = (status & 1 << offset) != 0 ;
560 //_______________________________________________________________
561 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
563 // Checks is the requested bit is set
569 ULong_t offset = Offset(tsk) ;
570 ULong_t status = GetStatus(det, es) ;
572 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
574 st += (status & 1 << offset) != 0 ;
581 //_______________________________________________________________
582 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const
584 // Checks is the requested bit is set
589 ULong_t status = GetStatus(det, es) ;
591 for ( Int_t tsk = 0 ; tsk < kNTASK ; tsk++) {
592 ULong_t offset = Offset(ALITASK_t(tsk)) ;
593 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
595 st += (status & 1 << offset) != 0 ;
604 //_______________________________________________________________
605 AliQAv1 * AliQAv1::Instance()
607 // Get an instance of the singleton. The only authorized way to call the ctor
611 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get("QA")) ;
613 fgQA = new AliQAv1() ;
618 //_______________________________________________________________
619 AliQAv1 * AliQAv1::Instance(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es)
621 // Get an instance of the singleton. The only authorized way to call the ctor
624 fgQA = new AliQAv1(qalength, qa, eslength, es) ;
628 //_______________________________________________________________
629 AliQAv1 * AliQAv1::Instance(const DETECTORINDEX_t det)
631 // Get an instance of the singleton. The only authorized way to call the ctor
635 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get(GetQAName())) ;
637 fgQA = new AliQAv1(det) ;
643 //_______________________________________________________________
644 AliQAv1 * AliQAv1::Instance(const ALITASK_t tsk)
646 // Get an instance of the singleton. The only authorized way to call the ctor
653 fgQA = new AliQAv1(tsk) ;
656 fgQA = new AliQAv1(tsk) ;
659 AliInfoClass("fgQA = gAlice->GetQA()") ;
662 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
665 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
675 //_______________________________________________________________
676 AliQAv1 * AliQAv1::Instance(const TASKINDEX_t tsk)
678 // get an instance of the singleton.
679 ALITASK_t index = kNULLTASK ;
683 else if (tsk < kDIGITS)
685 else if (tsk < kRECPARTICLES)
687 else if (tsk == kESDS)
690 return Instance(index) ;
693 //_______________________________________________________________
694 Long64_t AliQAv1::Merge(const TCollection * list) {
695 // Merge the QA resuls in the list into this single AliQAv1 object
698 for (Int_t det = 0 ; det < kNDET ; det++) {
699 Set(DETECTORINDEX_t(det)) ;
700 for (Int_t task = 0 ; task < kNTASK ; task++) {
701 Set(ALITASK_t(task)) ;
702 for (Int_t bit = 0 ; bit < kNBIT ; bit++) {
705 while ( (qa = (AliQAv1*)next() ) ) {
706 for (Int_t es = 0 ; es < fNEventSpecies ; es++) {
708 if (qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), es, QABIT_t(bit)))
709 Set(QABIT_t(bit), es) ;
718 //_______________________________________________________________
719 ULong_t AliQAv1::Offset(ALITASK_t tsk) const
721 // Calculates the bit offset for a given module (SIM, REC, ESD, ANA)
751 //_______________________________________________________________
752 void AliQAv1::Reset(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es)
754 // resets all the bits for a given tsk and event specie
759 ULong_t offset = Offset(tsk) ;
760 ULong_t status = GetStatus(det, es) ;
761 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
763 status = status & ~1 << offset ;
765 SetStatus(det, es, status) ;
768 //_______________________________________________________________
769 void AliQAv1::ResetStatus(DETECTORINDEX_t det)
771 // reset the status of det for all event specie
772 for (Int_t es = 0 ; es < fNEventSpecies ; es++)
773 fQA[det*fNdet+es] = 0 ;
776 //_______________________________________________________________
777 void AliQAv1::Set(QABIT_t bit, Int_t ies)
779 // Set the status bit of the current detector in the current module and for the current event specie
780 Set(bit, AliRecoParam::Convert(ies)) ;
783 //_______________________________________________________________
784 void AliQAv1::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
786 // Set the status bit of the current detector in the current module and for the current event specie
788 SetStatusBit(fDet, fTask, es, bit) ;
791 //_____________________________________________________________________________
792 void AliQAv1::SetQARefStorage(const char * name)
794 // Set the root directory where the QA reference data are stored
796 fgQARefDirName = name ;
797 if ( fgQARefDirName.Contains(fgkLabLocalFile) )
798 fgQARefFileName = fgkRefFileName ;
799 else if ( fgQARefDirName.Contains(fgkLabLocalOCDB) )
800 fgQARefFileName = fgkQAName ;
801 else if ( fgQARefDirName.Contains(fgkLabAliEnOCDB) )
802 fgQARefFileName = fgkQAName ;
805 AliErrorClass(Form("ERROR: %s is an invalid storage definition\n", name)) ;
806 fgQARefDirName = "" ;
807 fgQARefFileName = "" ;
809 TString tmp(fgQARefDirName) ; // + fgQARefFileName) ;
810 AliInfoClass(Form("AliQAv1::SetQARefDir: QA references are in %s\n", tmp.Data() )) ;
813 //_____________________________________________________________________________
814 void AliQAv1::SetQAResultDirName(const char * name)
816 // Set the root directory where to store the QA status object
818 fgQAResultDirName.Prepend(name) ;
819 AliInfoClass(Form("AliQAv1::SetQAResultDirName: QA results are in %s\n", fgQAResultDirName.Data())) ;
820 if ( fgQAResultDirName.Contains(fgkLabLocalFile))
821 fgQAResultDirName.ReplaceAll(fgkLabLocalFile, "") ;
822 fgQAResultFileName.Prepend(fgQAResultDirName) ;
825 //_______________________________________________________________
826 void AliQAv1::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
828 // Set the status bit for a given detector and a given task
835 Reset(det, tsk, es) ;
837 ULong_t offset = Offset(tsk) ;
838 ULong_t status = GetStatus(det, es) ;
840 status = status | 1 << offset ;
841 SetStatus(det, es, status) ;
844 //_______________________________________________________________
845 void AliQAv1::Show(DETECTORINDEX_t det) const
847 // dispplay the QA status word
848 if ( det == kNULLDET)
850 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
851 if ( IsEventSpecieSet(ies) )
852 ShowStatus(det, kNULLTASK, AliRecoParam::ConvertIndex(ies)) ;
856 //_______________________________________________________________
857 void AliQAv1::ShowAll() const
859 // dispplay the QA status word
861 for (index = 0 ; index < kNDET ; index++) {
862 for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
863 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
864 if ( IsEventSpecieSet(ies) )
865 ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::ConvertIndex(ies)) ;
871 //_______________________________________________________________
872 void AliQAv1::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
874 // Prints the full QA status of a given detector
877 ULong_t status = GetStatus(det, es) ;
878 ULong_t tskStatus[kNTASK] ;
879 tskStatus[kRAW] = status & 0x0000f ;
880 tskStatus[kSIM] = status & 0x000f0 ;
881 tskStatus[kREC] = status & 0x00f00 ;
882 tskStatus[kESD] = status & 0x0f000 ;
883 tskStatus[kANA] = status & 0xf0000 ;
885 AliInfo(Form("====> QA Status for %8s %8s raw =0x%lx, sim=0x%lx, rec=0x%lx, esd=0x%lx, ana=0x%lx", GetDetName(det).Data(), AliRecoParam::GetEventSpecieName(es),
886 tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
887 if (tsk == kNULLTASK) {
888 for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
889 ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ;
892 ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ;
896 //_______________________________________________________________
897 void AliQAv1::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
899 // print the QA status in human readable format
900 const QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
901 if ( bit != kNULLBit ) {
902 AliInfoClass(Form(" %8s %8s %4s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk))) ;
903 AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, GetBitName(bit))) ;
907 //_______________________________________________________________
908 void AliQAv1::UnSet(QABIT_t bit, Int_t ies)
910 // UnSet the status bit of the current detector in the current module
911 UnSet(bit, AliRecoParam::Convert(ies)) ;
914 //_______________________________________________________________
915 void AliQAv1::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
917 // UnSet the status bit of the current detector in the current module
919 UnSetStatusBit(fDet, fTask, es, bit) ;
922 //_______________________________________________________________
923 void AliQAv1::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
925 // UnSet the status bit for a given detector and a given task
932 ULong_t offset = Offset(tsk) ;
933 ULong_t status = GetStatus(det, es) ;
935 status = status & 0 << offset ;
936 SetStatus(det, es, status) ;