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", "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" ;
74 const UInt_t AliQAv1::fgkExpertBit = BIT(19);
75 const UInt_t AliQAv1::fgkQABit = BIT(20) ;
76 const UInt_t AliQAv1::fgkImageBit = BIT(21) ;
77 const Int_t AliQAv1::fgkQADebugLevel = 99 ;
78 const TString AliQAv1::fgkImageFileName = "QAImage" ;
79 const TString AliQAv1::fImageFileFormat = "ps" ;
80 const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ;
82 //____________________________________________________________________________
86 fNEventSpecies(AliRecoParam::kNSpecies),
87 fLengthQA(fNdet*fNEventSpecies),
88 fQA(new ULong_t[fLengthQA]),
91 fEventSpecie(AliRecoParam::kDefault),
92 fEventSpecies(new Bool_t[fNEventSpecies])
94 // default constructor
95 memset(fQA,0,fLengthQA*sizeof(ULong_t));
96 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
99 //____________________________________________________________________________
100 AliQAv1::AliQAv1(const AliQAv1& qa) :
103 fNEventSpecies(qa.fNEventSpecies),
104 fLengthQA(qa.fLengthQA),
105 fQA(new ULong_t[fLengthQA]),
108 fEventSpecie(qa.fEventSpecie),
109 fEventSpecies(new Bool_t[fNEventSpecies])
112 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
113 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
116 //_____________________________________________________________________________
117 AliQAv1& AliQAv1::operator = (const AliQAv1& qa)
119 // assignment operator
121 TNamed::operator=(qa);
123 fNEventSpecies = qa.fNEventSpecies;
124 fLengthQA = qa.fLengthQA;
126 if(fQA) delete [] fQA;
127 fQA = new ULong_t[fLengthQA];
128 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
132 fEventSpecie = qa.fEventSpecie;
133 if(fEventSpecies) delete [] fEventSpecies;
134 fEventSpecies = new Bool_t[fNEventSpecies];
135 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
140 //_______________________________________________________________
141 AliQAv1::AliQAv1(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es) :
142 TNamed("QA", "Quality Assurance status"),
144 fNEventSpecies(eslength),
146 fQA(new ULong_t[fLengthQA]),
149 fEventSpecie(AliRecoParam::kDefault),
150 fEventSpecies(new Bool_t[fNEventSpecies])
152 // constructor to be used
153 memcpy(fQA, qa, fLengthQA*sizeof(ULong_t));
154 memcpy(fEventSpecies, es, fNEventSpecies*sizeof(Bool_t));
157 //_______________________________________________________________
158 AliQAv1::AliQAv1(const DETECTORINDEX_t det) :
159 TNamed("QA", "Quality Assurance status"),
161 fNEventSpecies(AliRecoParam::kNSpecies),
162 fLengthQA(fNdet*fNEventSpecies),
163 fQA(new ULong_t[fLengthQA]),
166 fEventSpecie(AliRecoParam::kDefault),
167 fEventSpecies(new Bool_t[fNEventSpecies])
169 // constructor to be used
170 if (! CheckRange(det) ) fDet = kNULLDET ;
171 memset(fQA,0,fLengthQA*sizeof(ULong_t));
172 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
175 //_______________________________________________________________
176 AliQAv1::AliQAv1(const ALITASK_t tsk) :
177 TNamed("QA", "Quality Assurance status"),
179 fNEventSpecies(AliRecoParam::kNSpecies),
180 fLengthQA(fNdet*fNEventSpecies),
181 fQA(new ULong_t[fLengthQA]),
184 fEventSpecie(AliRecoParam::kDefault),
185 fEventSpecies(new Bool_t[fNEventSpecies])
187 // constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
188 if (! CheckRange(tsk) ) fTask = kNULLTASK ;
189 memset(fQA,0,fLengthQA*sizeof(ULong_t));
190 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
193 //____________________________________________________________________________
198 delete [] fEventSpecies;
201 //_______________________________________________________________
202 void AliQAv1::Close()
204 // close the open files
206 if (fgQADataFile->IsOpen())
207 fgQADataFile->Close() ;
209 if (fgQAResultFile->IsOpen())
210 fgQAResultFile->Close() ;
212 if (fgQARefFile->IsOpen())
213 fgQARefFile->Close() ;
216 //_______________________________________________________________
217 Bool_t AliQAv1::CheckFatal() const
219 // check if any FATAL status is set
222 for (index = 0; index < kNDET ; index++)
223 rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
227 //_______________________________________________________________
228 Bool_t AliQAv1::CheckRange(DETECTORINDEX_t det) const
230 // check if detector is in given detector range: 0-kNDET
232 Bool_t rv = ( det < 0 || det > kNDET ) ? kFALSE : kTRUE ;
234 AliFatal(Form("Detector index %d is out of range: 0 <= index <= %d", det, kNDET)) ;
238 //_______________________________________________________________
239 Bool_t AliQAv1::CheckRange(ALITASK_t task) const
241 // check if task is given taskk range: 0:kNTASK
242 Bool_t rv = ( task < kRAW || task > kNTASK ) ? kFALSE : kTRUE ;
244 AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
248 //_______________________________________________________________
249 Bool_t AliQAv1::CheckRange(QABIT_t bit) const
251 // check if bit is in given bit range: 0-kNBit
253 Bool_t rv = ( bit < 0 || bit > kNBIT ) ? kFALSE : kTRUE ;
255 AliFatal(Form("Status bit %d is out of range: 0 <= bit <= %d", bit, kNBIT)) ;
259 //_______________________________________________________________
260 Bool_t AliQAv1::CheckRange(AliRecoParam::EventSpecie_t es) const
262 // check if bit is in given bit range: 0-kNBit
265 case AliRecoParam::kDefault:
268 case AliRecoParam::kLowMult:
271 case AliRecoParam::kHighMult:
274 case AliRecoParam::kCosmic:
277 case AliRecoParam::kCalib:
282 AliFatal(Form("Event Specie %d is not valid", es)) ;
286 //_______________________________________________________________
287 const char * AliQAv1::GetAliTaskName(ALITASK_t tsk)
289 // returns the char name corresponding to module index
315 //_______________________________________________________________
316 const char * AliQAv1::GetBitName(QABIT_t bit) const
318 // returns the char name corresponding to bit
328 bitName = "WARNING" ;
340 return bitName.Data() ;
343 //_______________________________________________________________
344 TH1 * AliQAv1::GetData(TObjArray** list, Int_t index, AliRecoParam::EventSpecie_t eventSpecie)
346 // retrieve QA data from the list at a given index and for a given event specie
348 Int_t esindex = AliRecoParam::AConvert(eventSpecie) ;
349 TObjArray * arr = list[esindex] ;
351 if ( index > AliQAv1::GetMaxQAObj() ) {
352 AliErrorClass(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ;
354 if ( arr->At(index) ) {
355 rv = static_cast<TH1*>(arr->At(index)) ;
362 //_______________________________________________________________
363 AliQAv1::DETECTORINDEX_t AliQAv1::GetDetIndex(const char * name)
365 // returns the detector index corresponding to a given name
366 TString sname(name) ;
367 DETECTORINDEX_t rv = kNULLDET ;
368 for (Int_t det = 0; det < kNDET ; det++) {
369 if ( GetDetName(det) == sname ) {
370 rv = DETECTORINDEX_t(det) ;
377 //_______________________________________________________________
378 const char * AliQAv1::GetDetName(Int_t det)
380 // returns the detector name corresponding to a given index (needed in a loop)
382 if ( det >= 0 && det < kNDET)
383 return (fgDetNames[det]).Data() ;
388 //_______________________________________________________________
389 TFile * AliQAv1::GetQADataFile(const char * name, Int_t run)
391 // opens the file to store the detectors Quality Assurance Data Maker results
392 const char * temp = Form("%s.%s.%d.root", name, fgQADataFileName.Data(), run) ;
394 if (! fgQADataFile ) {
395 if (gSystem->AccessPathName(temp))
399 fgQADataFile = TFile::Open(temp, opt.Data()) ;
401 if ( strcmp(temp, fgQADataFile->GetName()) != 0 ) {
402 fgQADataFile = static_cast<TFile *>(gROOT->FindObject(temp)) ;
403 if ( !fgQADataFile ) {
404 if (gSystem->AccessPathName(temp))
408 fgQADataFile = TFile::Open(temp, opt.Data()) ;
412 return fgQADataFile ;
415 //_____________________________________________________________________________
416 AliQAv1::MODE_t AliQAv1::Mode(TASKINDEX_t task) {
417 // return "rec" or "sim" depending on the task
426 case AliQAv1::kSDIGITS:
429 case AliQAv1::kDIGITS:
432 case AliQAv1::kDIGITSR:
435 case AliQAv1::kRECPOINTS:
438 case AliQAv1::kTRACKSEGMENTS:
441 case AliQAv1::kRECPARTICLES:
450 return AliQAv1::kNULLMODE;
453 //_____________________________________________________________________________
454 TFile * AliQAv1::GetQADataFile(const char * fileName)
456 // Open if necessary the Data file and return its pointer
460 fileName = AliQAv1::GetQADataFileName() ;
461 if (!gSystem->AccessPathName(fileName)) {
462 fgQADataFile = TFile::Open(fileName) ;
464 AliFatalClass(Form("File %s not found", fileName)) ;
467 return fgQADataFile ;
470 //_______________________________________________________________
471 TFile * AliQAv1::GetQAResultFile()
473 // opens the file to store the Quality Assurance Data Checker results
474 if (fgQAResultFile) {
475 if (fgQAResultFile->IsOpen())
476 fgQAResultFile->Close();
477 delete fgQAResultFile;
479 TString dirName(fgQAResultDirName) ;
480 if ( dirName.Contains(fgkLabLocalFile))
481 dirName.ReplaceAll(fgkLabLocalFile, "") ;
482 TString fileName(dirName + fgQAResultFileName) ;
484 if ( !gSystem->AccessPathName(fileName) )
487 if ( gSystem->AccessPathName(dirName) )
488 gSystem->mkdir(dirName) ;
491 fgQAResultFile = TFile::Open(fileName, opt) ;
492 return fgQAResultFile ;
495 //_______________________________________________________________
496 AliQAv1::QABIT_t AliQAv1::GetQAStatusBit(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk) const
498 // returns the QA bit set
499 QABIT_t rv = kNULLBit ;
500 if ( es == AliRecoParam::kDefault)
502 if ( det == kNULLDET )
504 if ( tsk == kNULLTASK )
506 for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
507 if (IsSet(det, tsk, es, QABIT_t(bit)))
513 //_______________________________________________________________
514 AliQAv1::TASKINDEX_t AliQAv1::GetTaskIndex(const char * name)
516 // returns the detector index corresponding to a given name
517 TString sname(name) ;
518 TASKINDEX_t rv = kNULLTASKINDEX ;
519 for (Int_t tsk = 0; tsk < kNTASKINDEX ; tsk++) {
520 if ( GetTaskName(tsk) == sname ) {
521 rv = TASKINDEX_t(tsk) ;
528 //_______________________________________________________________
529 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t ies, QABIT_t bit) const
531 // Checks is the requested bit is set
533 const AliRecoParam::EventSpecie_t es = AliRecoParam::Convert(ies) ;
534 return IsSet(det, tsk, es, bit) ;
538 //_______________________________________________________________
539 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const
541 // Checks is the requested bit is set
548 ULong_t offset = Offset(tsk) ;
549 ULong_t status = GetStatus(det, es) ;
551 status = (status & 1 << offset) != 0 ;
555 //_______________________________________________________________
556 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
558 // Checks is the requested bit is set
564 ULong_t offset = Offset(tsk) ;
565 ULong_t status = GetStatus(det, es) ;
567 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
569 st += (status & 1 << offset) != 0 ;
576 //_______________________________________________________________
577 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const
579 // Checks is the requested bit is set
584 ULong_t status = GetStatus(det, es) ;
586 for ( Int_t tsk = 0 ; tsk < kNTASK ; tsk++) {
587 ULong_t offset = Offset(ALITASK_t(tsk)) ;
588 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
590 st += (status & 1 << offset) != 0 ;
599 //_______________________________________________________________
600 AliQAv1 * AliQAv1::Instance()
602 // Get an instance of the singleton. The only authorized way to call the ctor
606 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get("QA")) ;
608 fgQA = new AliQAv1() ;
613 //_______________________________________________________________
614 AliQAv1 * AliQAv1::Instance(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es)
616 // Get an instance of the singleton. The only authorized way to call the ctor
619 fgQA = new AliQAv1(qalength, qa, eslength, es) ;
623 //_______________________________________________________________
624 AliQAv1 * AliQAv1::Instance(const DETECTORINDEX_t det)
626 // Get an instance of the singleton. The only authorized way to call the ctor
630 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get(GetQAName())) ;
632 fgQA = new AliQAv1(det) ;
638 //_______________________________________________________________
639 AliQAv1 * AliQAv1::Instance(const ALITASK_t tsk)
641 // Get an instance of the singleton. The only authorized way to call the ctor
648 fgQA = new AliQAv1(tsk) ;
651 fgQA = new AliQAv1(tsk) ;
654 AliInfoClass("fgQA = gAlice->GetQA()") ;
657 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
660 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
670 //_______________________________________________________________
671 AliQAv1 * AliQAv1::Instance(const TASKINDEX_t tsk)
673 // get an instance of the singleton.
674 ALITASK_t index = kNULLTASK ;
678 else if (tsk < kDIGITS)
680 else if (tsk < kRECPARTICLES)
682 else if (tsk == kESDS)
685 return Instance(index) ;
688 //_______________________________________________________________
689 Long64_t AliQAv1::Merge(const TCollection * list) {
690 // Merge the QA resuls in the list into this single AliQAv1 object
693 for (Int_t det = 0 ; det < kNDET ; det++) {
694 Set(DETECTORINDEX_t(det)) ;
695 for (Int_t task = 0 ; task < kNTASK ; task++) {
696 Set(ALITASK_t(task)) ;
697 for (Int_t bit = 0 ; bit < kNBIT ; bit++) {
700 while ( (qa = (AliQAv1*)next() ) ) {
701 for (Int_t es = 0 ; es < fNEventSpecies ; es++) {
703 if (qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), es, QABIT_t(bit)))
704 Set(QABIT_t(bit), es) ;
713 //_______________________________________________________________
714 ULong_t AliQAv1::Offset(ALITASK_t tsk) const
716 // Calculates the bit offset for a given module (SIM, REC, ESD, ANA)
746 //_______________________________________________________________
747 void AliQAv1::Reset(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es)
749 // resets all the bits for a given tsk and event specie
754 ULong_t offset = Offset(tsk) ;
755 ULong_t status = GetStatus(det, es) ;
756 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
758 status = status & ~1 << offset ;
760 SetStatus(det, es, status) ;
763 //_______________________________________________________________
764 void AliQAv1::ResetStatus(DETECTORINDEX_t det)
766 // reset the status of det for all event specie
767 for (Int_t es = 0 ; es < fNEventSpecies ; es++)
768 fQA[det*fNdet+es] = 0 ;
771 //_______________________________________________________________
772 void AliQAv1::Set(QABIT_t bit, Int_t ies)
774 // Set the status bit of the current detector in the current module and for the current event specie
775 Set(bit, AliRecoParam::Convert(ies)) ;
778 //_______________________________________________________________
779 void AliQAv1::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
781 // Set the status bit of the current detector in the current module and for the current event specie
783 SetStatusBit(fDet, fTask, es, bit) ;
786 //_____________________________________________________________________________
787 void AliQAv1::SetQARefStorage(const char * name)
789 // Set the root directory where the QA reference data are stored
791 fgQARefDirName = name ;
792 if ( fgQARefDirName.Contains(fgkLabLocalFile) )
793 fgQARefFileName = fgkRefFileName ;
794 else if ( fgQARefDirName.Contains(fgkLabLocalOCDB) )
795 fgQARefFileName = fgkQAName ;
796 else if ( fgQARefDirName.Contains(fgkLabAliEnOCDB) )
797 fgQARefFileName = fgkQAName ;
800 AliErrorClass(Form("ERROR: %s is an invalid storage definition\n", name)) ;
801 fgQARefDirName = "" ;
802 fgQARefFileName = "" ;
804 TString tmp(fgQARefDirName) ; // + fgQARefFileName) ;
805 AliInfoClass(Form("AliQAv1::SetQARefDir: QA references are in %s\n", tmp.Data() )) ;
808 //_____________________________________________________________________________
809 void AliQAv1::SetQAResultDirName(const char * name)
811 // Set the root directory where to store the QA status object
813 fgQAResultDirName.Prepend(name) ;
814 AliInfoClass(Form("AliQAv1::SetQAResultDirName: QA results are in %s\n", fgQAResultDirName.Data())) ;
815 if ( fgQAResultDirName.Contains(fgkLabLocalFile))
816 fgQAResultDirName.ReplaceAll(fgkLabLocalFile, "") ;
817 fgQAResultFileName.Prepend(fgQAResultDirName) ;
820 //_______________________________________________________________
821 void AliQAv1::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
823 // Set the status bit for a given detector and a given task
830 Reset(det, tsk, es) ;
832 ULong_t offset = Offset(tsk) ;
833 ULong_t status = GetStatus(det, es) ;
835 status = status | 1 << offset ;
836 SetStatus(det, es, status) ;
839 //_______________________________________________________________
840 void AliQAv1::Show(DETECTORINDEX_t det) const
842 // dispplay the QA status word
843 if ( det == kNULLDET)
845 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
846 if ( IsEventSpecieSet(ies) )
847 ShowStatus(det, kNULLTASK, AliRecoParam::ConvertIndex(ies)) ;
851 //_______________________________________________________________
852 void AliQAv1::ShowAll() const
854 // dispplay the QA status word
856 for (index = 0 ; index < kNDET ; index++) {
857 for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
858 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
859 if ( IsEventSpecieSet(ies) )
860 ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::ConvertIndex(ies)) ;
866 //_______________________________________________________________
867 void AliQAv1::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
869 // Prints the full QA status of a given detector
872 ULong_t status = GetStatus(det, es) ;
873 ULong_t tskStatus[kNTASK] ;
874 tskStatus[kRAW] = status & 0x0000f ;
875 tskStatus[kSIM] = status & 0x000f0 ;
876 tskStatus[kREC] = status & 0x00f00 ;
877 tskStatus[kESD] = status & 0x0f000 ;
878 tskStatus[kANA] = status & 0xf0000 ;
880 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),
881 tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
882 if (tsk == kNULLTASK) {
883 for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
884 ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ;
887 ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ;
891 //_______________________________________________________________
892 void AliQAv1::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
894 // print the QA status in human readable format
895 const QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
896 if ( bit != kNULLBit ) {
897 AliInfoClass(Form(" %8s %8s %4s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk))) ;
898 AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, GetBitName(bit))) ;
902 //_______________________________________________________________
903 void AliQAv1::UnSet(QABIT_t bit, Int_t ies)
905 // UnSet the status bit of the current detector in the current module
906 UnSet(bit, AliRecoParam::Convert(ies)) ;
909 //_______________________________________________________________
910 void AliQAv1::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
912 // UnSet the status bit of the current detector in the current module
914 UnSetStatusBit(fDet, fTask, es, bit) ;
917 //_______________________________________________________________
918 void AliQAv1::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
920 // UnSet the status bit for a given detector and a given task
927 ULong_t offset = Offset(tsk) ;
928 ULong_t status = GetStatus(det, es) ;
930 status = status & 0 << offset ;
931 SetStatus(det, es, status) ;