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"
65 TString AliQAv1::fgGRPPath = "GRP/GRP/Data" ;
66 TString AliQAv1::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "DigitsR", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
67 TString AliQAv1::fgModeNames[] = {"", "Sim", "Rec", "QA"} ;
68 const TString AliQAv1::fgkLabLocalFile = "file://" ;
69 const TString AliQAv1::fgkLabLocalOCDB = "local://" ;
70 const TString AliQAv1::fgkLabAliEnOCDB = "alien://" ;
71 const TString AliQAv1::fgkRefFileName = "QA.root" ;
72 const TString AliQAv1::fgkQAName = "QA" ;
73 const TString AliQAv1::fgkQACorrNtName = "CorrQA" ;
74 const TString AliQAv1::fgkRefOCDBDirName = "QA" ;
75 TString AliQAv1::fgRefDataDirName = "" ;
76 const TString AliQAv1::fgkQARefOCDBDefault = "alien://folder=/alice/QA/20" ;
77 const TString AliQAv1::fgkExpert = "Expert" ;
79 const UInt_t AliQAv1::fgkQAClonedBit = BIT(14); // RS: bits set to the histos or arrays of cloned histos
80 const UInt_t AliQAv1::fgkForbidCloningBit = BIT(15); // to flag the state (cloned or not) of the
81 const UInt_t AliQAv1::fgkOrigHistoKeptBit = BIT(16); // object at the given slot of fXXXQAList[]
83 const UInt_t AliQAv1::fgkExpertBit = BIT(19);
84 const UInt_t AliQAv1::fgkQABit = BIT(20) ;
85 const UInt_t AliQAv1::fgkImageBit = BIT(21) ;
86 const Int_t AliQAv1::fgkQADebugLevel = 99 ;
87 const TString AliQAv1::fgkImageFileName = "QAImage" ;
88 const TString AliQAv1::fImageFileFormat = "ps" ;
89 const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ;
91 //____________________________________________________________________________
95 fNEventSpecies(AliRecoParam::kNSpecies),
96 fLengthQA(fNdet*fNEventSpecies),
97 fQA(new ULong_t[fLengthQA]),
100 fEventSpecie(AliRecoParam::kDefault),
101 fEventSpecies(new Bool_t[fNEventSpecies])
103 // default constructor
104 memset(fQA,0,fLengthQA*sizeof(ULong_t));
105 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
108 //____________________________________________________________________________
109 AliQAv1::AliQAv1(const AliQAv1& qa) :
112 fNEventSpecies(qa.fNEventSpecies),
113 fLengthQA(qa.fLengthQA),
114 fQA(new ULong_t[fLengthQA]),
117 fEventSpecie(qa.fEventSpecie),
118 fEventSpecies(new Bool_t[fNEventSpecies])
121 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
122 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
125 //_____________________________________________________________________________
126 AliQAv1& AliQAv1::operator = (const AliQAv1& qa)
128 // assignment operator
130 TNamed::operator=(qa);
132 fNEventSpecies = qa.fNEventSpecies;
133 fLengthQA = qa.fLengthQA;
135 if(fQA) delete [] fQA;
136 fQA = new ULong_t[fLengthQA];
137 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
141 fEventSpecie = qa.fEventSpecie;
142 if(fEventSpecies) delete [] fEventSpecies;
143 fEventSpecies = new Bool_t[fNEventSpecies];
144 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
149 //_______________________________________________________________
150 AliQAv1::AliQAv1(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es) :
151 TNamed("QA", "Quality Assurance status"),
153 fNEventSpecies(eslength),
155 fQA(new ULong_t[fLengthQA]),
158 fEventSpecie(AliRecoParam::kDefault),
159 fEventSpecies(new Bool_t[fNEventSpecies])
161 // constructor to be used
162 memcpy(fQA, qa, fLengthQA*sizeof(ULong_t));
163 memcpy(fEventSpecies, es, fNEventSpecies*sizeof(Bool_t));
166 //_______________________________________________________________
167 AliQAv1::AliQAv1(const DETECTORINDEX_t det) :
168 TNamed("QA", "Quality Assurance status"),
170 fNEventSpecies(AliRecoParam::kNSpecies),
171 fLengthQA(fNdet*fNEventSpecies),
172 fQA(new ULong_t[fLengthQA]),
175 fEventSpecie(AliRecoParam::kDefault),
176 fEventSpecies(new Bool_t[fNEventSpecies])
178 // constructor to be used
179 if (! CheckRange(det) ) fDet = kNULLDET ;
180 memset(fQA,0,fLengthQA*sizeof(ULong_t));
181 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
184 //_______________________________________________________________
185 AliQAv1::AliQAv1(const ALITASK_t tsk) :
186 TNamed("QA", "Quality Assurance status"),
188 fNEventSpecies(AliRecoParam::kNSpecies),
189 fLengthQA(fNdet*fNEventSpecies),
190 fQA(new ULong_t[fLengthQA]),
193 fEventSpecie(AliRecoParam::kDefault),
194 fEventSpecies(new Bool_t[fNEventSpecies])
196 // constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
197 if (! CheckRange(tsk) ) fTask = kNULLTASK ;
198 memset(fQA,0,fLengthQA*sizeof(ULong_t));
199 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
202 //____________________________________________________________________________
207 delete [] fEventSpecies;
210 //_______________________________________________________________
211 void AliQAv1::Close()
213 // close the open files
215 if (fgQADataFile->IsOpen())
216 fgQADataFile->Close() ;
218 if (fgQAResultFile->IsOpen())
219 fgQAResultFile->Close() ;
221 if (fgQARefFile->IsOpen())
222 fgQARefFile->Close() ;
225 //_______________________________________________________________
226 Bool_t AliQAv1::CheckFatal() const
228 // check if any FATAL status is set
231 for (index = 0; index < kNDET ; index++)
232 rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
236 //_______________________________________________________________
237 Bool_t AliQAv1::CheckRange(DETECTORINDEX_t det) const
239 // check if detector is in given detector range: 0-kNDET
241 Bool_t rv = ( det < 0 || det > kNDET ) ? kFALSE : kTRUE ;
243 AliFatal(Form("Detector index %d is out of range: 0 <= index <= %d", det, kNDET)) ;
247 //_______________________________________________________________
248 Bool_t AliQAv1::CheckRange(ALITASK_t task) const
250 // check if task is given taskk range: 0:kNTASK
251 Bool_t rv = ( task < kRAW || task > kNTASK ) ? kFALSE : kTRUE ;
253 AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
257 //_______________________________________________________________
258 Bool_t AliQAv1::CheckRange(QABIT_t bit) const
260 // check if bit is in given bit range: 0-kNBit
262 Bool_t rv = ( bit < 0 || bit > kNBIT ) ? kFALSE : kTRUE ;
264 AliFatal(Form("Status bit %d is out of range: 0 <= bit <= %d", bit, kNBIT)) ;
268 //_______________________________________________________________
269 Bool_t AliQAv1::CheckRange(AliRecoParam::EventSpecie_t es) const
271 // check if bit is in given bit range: 0-kNBit
274 case AliRecoParam::kDefault:
277 case AliRecoParam::kLowMult:
280 case AliRecoParam::kHighMult:
283 case AliRecoParam::kCosmic:
286 case AliRecoParam::kCalib:
291 AliFatal(Form("Event Specie %d is not valid", es)) ;
295 //_______________________________________________________________
296 const char * AliQAv1::GetAliTaskName(ALITASK_t tsk)
298 // returns the char name corresponding to module index
324 //_______________________________________________________________
325 const char * AliQAv1::GetBitName(QABIT_t bit) const
327 // returns the char name corresponding to bit
337 bitName = "WARNING" ;
349 return bitName.Data() ;
352 //_______________________________________________________________
353 TH1 * AliQAv1::GetData(TObjArray** list, Int_t index, AliRecoParam::EventSpecie_t eventSpecie)
355 // retrieve QA data from the list at a given index and for a given event specie
357 Int_t esindex = AliRecoParam::AConvert(eventSpecie) ;
358 TObjArray * arr = list[esindex] ;
360 if ( index > AliQAv1::GetMaxQAObj() ) {
361 AliErrorClass(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ;
363 if ( arr->At(index) ) {
364 rv = static_cast<TH1*>(arr->At(index)) ;
371 //_______________________________________________________________
372 AliQAv1::DETECTORINDEX_t AliQAv1::GetDetIndex(const char * name)
374 // returns the detector index corresponding to a given name
375 TString sname(name) ;
376 DETECTORINDEX_t rv = kNULLDET ;
377 for (Int_t det = 0; det < kNDET ; det++) {
378 if ( GetDetName(det) == sname ) {
379 rv = DETECTORINDEX_t(det) ;
386 //_______________________________________________________________
387 const char * AliQAv1::GetDetName(Int_t det)
389 // returns the detector name corresponding to a given index (needed in a loop)
391 if ( det >= 0 && det < kNDET)
392 return (fgDetNames[det]).Data() ;
397 //_______________________________________________________________
398 TFile * AliQAv1::GetQADataFile(const char * name, Int_t run)
400 // opens the file to store the detectors Quality Assurance Data Maker results
401 const char * temp = Form("%s.%s.%d.root", name, fgQADataFileName.Data(), run) ;
403 if (! fgQADataFile ) {
404 if (gSystem->AccessPathName(temp))
408 fgQADataFile = TFile::Open(temp, opt.Data()) ;
410 if ( strcmp(temp, fgQADataFile->GetName()) != 0 ) {
411 fgQADataFile = static_cast<TFile *>(gROOT->FindObject(temp)) ;
412 if ( !fgQADataFile ) {
413 if (gSystem->AccessPathName(temp))
417 fgQADataFile = TFile::Open(temp, opt.Data()) ;
421 return fgQADataFile ;
424 //_____________________________________________________________________________
425 AliQAv1::MODE_t AliQAv1::Mode(TASKINDEX_t task) {
426 // return "rec" or "sim" depending on the task
435 case AliQAv1::kSDIGITS:
438 case AliQAv1::kDIGITS:
441 case AliQAv1::kDIGITSR:
444 case AliQAv1::kRECPOINTS:
447 case AliQAv1::kTRACKSEGMENTS:
450 case AliQAv1::kRECPARTICLES:
459 return AliQAv1::kNULLMODE;
462 //_____________________________________________________________________________
463 TFile * AliQAv1::GetQADataFile(const char * fileName)
465 // Open if necessary the Data file and return its pointer
469 fileName = AliQAv1::GetQADataFileName() ;
470 if (!gSystem->AccessPathName(fileName)) {
471 fgQADataFile = TFile::Open(fileName) ;
473 AliFatalClass(Form("File %s not found", fileName)) ;
476 return fgQADataFile ;
479 //_______________________________________________________________
480 TFile * AliQAv1::GetQAResultFile()
482 // opens the file to store the Quality Assurance Data Checker results
483 if (fgQAResultFile) {
484 if (fgQAResultFile->IsOpen())
485 fgQAResultFile->Close();
486 delete fgQAResultFile;
488 TString dirName(fgQAResultDirName) ;
489 if ( dirName.Contains(fgkLabLocalFile))
490 dirName.ReplaceAll(fgkLabLocalFile, "") ;
491 TString fileName(dirName + fgQAResultFileName) ;
493 if ( !gSystem->AccessPathName(fileName) )
496 if ( gSystem->AccessPathName(dirName) )
497 gSystem->mkdir(dirName) ;
500 fgQAResultFile = TFile::Open(fileName, opt) ;
501 return fgQAResultFile ;
504 //_______________________________________________________________
505 AliQAv1::QABIT_t AliQAv1::GetQAStatusBit(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk) const
507 // returns the QA bit set
508 QABIT_t rv = kNULLBit ;
509 if ( es == AliRecoParam::kDefault)
511 if ( det == kNULLDET )
513 if ( tsk == kNULLTASK )
515 for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
516 if (IsSet(det, tsk, es, QABIT_t(bit)))
522 //_______________________________________________________________
523 AliQAv1::TASKINDEX_t AliQAv1::GetTaskIndex(const char * name)
525 // returns the detector index corresponding to a given name
526 TString sname(name) ;
527 TASKINDEX_t rv = kNULLTASKINDEX ;
528 for (Int_t tsk = 0; tsk < kNTASKINDEX ; tsk++) {
529 if ( GetTaskName(tsk) == sname ) {
530 rv = TASKINDEX_t(tsk) ;
537 //_______________________________________________________________
538 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t ies, QABIT_t bit) const
540 // Checks is the requested bit is set
542 const AliRecoParam::EventSpecie_t es = AliRecoParam::Convert(ies) ;
543 return IsSet(det, tsk, es, bit) ;
547 //_______________________________________________________________
548 Bool_t AliQAv1::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const
550 // Checks is the requested bit is set
557 ULong_t offset = Offset(tsk) ;
558 ULong_t status = GetStatus(det, es) ;
560 status = (status & 1 << offset) != 0 ;
564 //_______________________________________________________________
565 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
567 // Checks is the requested bit is set
573 ULong_t offset = Offset(tsk) ;
574 ULong_t status = GetStatus(det, es) ;
576 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
578 st += (status & 1 << offset) != 0 ;
585 //_______________________________________________________________
586 Bool_t AliQAv1::IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const
588 // Checks is the requested bit is set
593 ULong_t status = GetStatus(det, es) ;
595 for ( Int_t tsk = 0 ; tsk < kNTASK ; tsk++) {
596 ULong_t offset = Offset(ALITASK_t(tsk)) ;
597 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
599 st += (status & 1 << offset) != 0 ;
608 //_______________________________________________________________
609 AliQAv1 * AliQAv1::Instance()
611 // Get an instance of the singleton. The only authorized way to call the ctor
615 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get("QA")) ;
617 fgQA = new AliQAv1() ;
622 //_______________________________________________________________
623 AliQAv1 * AliQAv1::Instance(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es)
625 // Get an instance of the singleton. The only authorized way to call the ctor
628 fgQA = new AliQAv1(qalength, qa, eslength, es) ;
632 //_______________________________________________________________
633 AliQAv1 * AliQAv1::Instance(const DETECTORINDEX_t det)
635 // Get an instance of the singleton. The only authorized way to call the ctor
639 fgQA = static_cast<AliQAv1 *>(fgQAResultFile->Get(GetQAName())) ;
641 fgQA = new AliQAv1(det) ;
647 //_______________________________________________________________
648 AliQAv1 * AliQAv1::Instance(const ALITASK_t tsk)
650 // Get an instance of the singleton. The only authorized way to call the ctor
657 fgQA = new AliQAv1(tsk) ;
660 fgQA = new AliQAv1(tsk) ;
663 AliInfoClass("fgQA = gAlice->GetQA()") ;
666 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
669 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
679 //_______________________________________________________________
680 AliQAv1 * AliQAv1::Instance(const TASKINDEX_t tsk)
682 // get an instance of the singleton.
683 ALITASK_t index = kNULLTASK ;
687 else if (tsk < kDIGITS)
689 else if (tsk < kRECPARTICLES)
691 else if (tsk == kESDS)
694 return Instance(index) ;
697 //_______________________________________________________________
698 Long64_t AliQAv1::Merge(const TCollection * list) {
699 // Merge the QA resuls in the list into this single AliQAv1 object
702 for (Int_t det = 0 ; det < kNDET ; det++) {
703 Set(DETECTORINDEX_t(det)) ;
704 for (Int_t task = 0 ; task < kNTASK ; task++) {
705 Set(ALITASK_t(task)) ;
706 for (Int_t bit = 0 ; bit < kNBIT ; bit++) {
709 while ( (qa = (AliQAv1*)next() ) ) {
710 for (Int_t es = 0 ; es < fNEventSpecies ; es++) {
712 if (qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), es, QABIT_t(bit)))
713 Set(QABIT_t(bit), es) ;
722 //_______________________________________________________________
723 ULong_t AliQAv1::Offset(ALITASK_t tsk) const
725 // Calculates the bit offset for a given module (SIM, REC, ESD, ANA)
755 //_______________________________________________________________
756 void AliQAv1::Reset(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es)
758 // resets all the bits for a given tsk and event specie
763 ULong_t offset = Offset(tsk) ;
764 ULong_t status = GetStatus(det, es) ;
765 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
767 status = status & ~1 << offset ;
769 SetStatus(det, es, status) ;
772 //_______________________________________________________________
773 void AliQAv1::ResetStatus(DETECTORINDEX_t det)
775 // reset the status of det for all event specie
776 for (Int_t es = 0 ; es < fNEventSpecies ; es++)
777 fQA[det*fNdet+es] = 0 ;
780 //_______________________________________________________________
781 void AliQAv1::Set(QABIT_t bit, Int_t ies)
783 // Set the status bit of the current detector in the current module and for the current event specie
784 Set(bit, AliRecoParam::Convert(ies)) ;
787 //_______________________________________________________________
788 void AliQAv1::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
790 // Set the status bit of the current detector in the current module and for the current event specie
792 SetStatusBit(fDet, fTask, es, bit) ;
795 //_____________________________________________________________________________
796 void AliQAv1::SetQARefStorage(const char * name)
798 // Set the root directory where the QA reference data are stored
800 fgQARefDirName = name ;
801 if ( fgQARefDirName.Contains(fgkLabLocalFile) )
802 fgQARefFileName = fgkRefFileName ;
803 else if ( fgQARefDirName.Contains(fgkLabLocalOCDB) )
804 fgQARefFileName = fgkQAName ;
805 else if ( fgQARefDirName.Contains(fgkLabAliEnOCDB) )
806 fgQARefFileName = fgkQAName ;
809 AliErrorClass(Form("ERROR: %s is an invalid storage definition\n", name)) ;
810 fgQARefDirName = "" ;
811 fgQARefFileName = "" ;
813 TString tmp(fgQARefDirName) ; // + fgQARefFileName) ;
814 AliInfoClass(Form("AliQAv1::SetQARefDir: QA references are in %s\n", tmp.Data() )) ;
817 //_____________________________________________________________________________
818 void AliQAv1::SetQAResultDirName(const char * name)
820 // Set the root directory where to store the QA status object
822 fgQAResultDirName.Prepend(name) ;
823 AliInfoClass(Form("AliQAv1::SetQAResultDirName: QA results are in %s\n", fgQAResultDirName.Data())) ;
824 if ( fgQAResultDirName.Contains(fgkLabLocalFile))
825 fgQAResultDirName.ReplaceAll(fgkLabLocalFile, "") ;
826 fgQAResultFileName.Prepend(fgQAResultDirName) ;
829 //_______________________________________________________________
830 void AliQAv1::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
832 // Set the status bit for a given detector and a given task
839 Reset(det, tsk, es) ;
841 ULong_t offset = Offset(tsk) ;
842 ULong_t status = GetStatus(det, es) ;
844 status = status | 1 << offset ;
845 SetStatus(det, es, status) ;
848 //_______________________________________________________________
849 void AliQAv1::Show(DETECTORINDEX_t det) const
851 // dispplay the QA status word
852 if ( det == kNULLDET)
854 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
855 if ( IsEventSpecieSet(ies) )
856 ShowStatus(det, kNULLTASK, AliRecoParam::ConvertIndex(ies)) ;
860 //_______________________________________________________________
861 void AliQAv1::ShowAll() const
863 // dispplay the QA status word
865 for (index = 0 ; index < kNDET ; index++) {
866 for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
867 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
868 if ( IsEventSpecieSet(ies) )
869 ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::ConvertIndex(ies)) ;
875 //_______________________________________________________________
876 void AliQAv1::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
878 // Prints the full QA status of a given detector
881 ULong_t status = GetStatus(det, es) ;
882 ULong_t tskStatus[kNTASK] ;
883 tskStatus[kRAW] = status & 0x0000f ;
884 tskStatus[kSIM] = status & 0x000f0 ;
885 tskStatus[kREC] = status & 0x00f00 ;
886 tskStatus[kESD] = status & 0x0f000 ;
887 tskStatus[kANA] = status & 0xf0000 ;
889 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),
890 tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
891 if (tsk == kNULLTASK) {
892 for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
893 ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ;
896 ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ;
900 //_______________________________________________________________
901 void AliQAv1::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
903 // print the QA status in human readable format
904 const QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
905 if ( bit != kNULLBit ) {
906 AliInfoClass(Form(" %8s %8s %4s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk))) ;
907 AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, GetBitName(bit))) ;
911 //_______________________________________________________________
912 void AliQAv1::UnSet(QABIT_t bit, Int_t ies)
914 // UnSet the status bit of the current detector in the current module
915 UnSet(bit, AliRecoParam::Convert(ies)) ;
918 //_______________________________________________________________
919 void AliQAv1::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
921 // UnSet the status bit of the current detector in the current module
923 UnSetStatusBit(fDet, fTask, es, bit) ;
926 //_______________________________________________________________
927 void AliQAv1::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
929 // UnSet the status bit for a given detector and a given task
936 ULong_t offset = Offset(tsk) ;
937 ULong_t status = GetStatus(det, es) ;
939 status = status & 0 << offset ;
940 SetStatus(det, es, status) ;