2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16 /* $Id: AliQAv1.cxx 31503 2009-03-16 11:01:16Z schutz $ */
18 //////////////////////////////////////////////////////////////////////////////
20 // Quality Assurance Object//_________________________________________________________________________
21 // Quality Assurance object. The QA status is held in one word per detector,
22 // each bit corresponds to a different status.
23 // bit 0-3 : QA raised during simulation (RAW)
24 // bit 4-7 : QA raised during simulation (SIM)
25 // bit 8-11 : QA raised during reconstruction (REC)
26 // bit 12-15 : QA raised during ESD checking (ESD)
27 // bit 16-19 : QA raised during analysis (ANA)
28 // Each of the 4 bits corresponds to a severity level of increasing importance
29 // from lower to higher bit (INFO, WARNING, ERROR, FATAL)
31 //*-- Yves Schutz CERN, July 2007
32 //////////////////////////////////////////////////////////////////////////////
36 // --- ROOT system ---
43 // --- Standard library ---
45 // --- AliRoot header files ---
51 AliQAv1 * AliQAv1::fgQA = 0x0 ;
52 TFile * AliQAv1::fgQADataFile = 0x0 ;
53 TString AliQAv1::fgQADataFileName = "QA" ; // will transform into Det.QA.run.root
54 TFile * AliQAv1::fgQARefFile = 0x0 ;
55 TString AliQAv1::fgQARefDirName = "" ;
56 TString AliQAv1::fgQARefFileName = "QA.root" ;
57 TFile * AliQAv1::fgQAResultFile = 0x0 ;
58 TString AliQAv1::fgQAResultDirName = "" ;
59 TString AliQAv1::fgQAResultFileName = "QA.root" ;
60 TString AliQAv1::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
61 "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global", "CORR"} ;
62 TString AliQAv1::fgGRPPath = "GRP/GRP/Data" ;
63 TString AliQAv1::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "DigitsR", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
64 TString AliQAv1::fgModeNames[] = {"", "Sim", "Rec"} ;
65 const TString AliQAv1::fgkLabLocalFile = "file://" ;
66 const TString AliQAv1::fgkLabLocalOCDB = "local://" ;
67 const TString AliQAv1::fgkLabAliEnOCDB = "alien://" ;
68 const TString AliQAv1::fgkRefFileName = "QA.root" ;
69 const TString AliQAv1::fgkQAName = "QA" ;
70 const TString AliQAv1::fgkQACorrNtName = "CorrQA" ;
71 const TString AliQAv1::fgkRefOCDBDirName = "QA" ;
72 TString AliQAv1::fgRefDataDirName = "" ;
73 const TString AliQAv1::fgkQARefOCDBDefault = "alien://folder=/alice/QA/20" ;
74 const TString AliQAv1::fgkExpert = "Expert" ;
75 const UInt_t AliQAv1::fgkExpertBit = BIT(19);
76 const UInt_t AliQAv1::fgkQABit = BIT(20) ;
77 const UInt_t AliQAv1::fgkImageBit = BIT(21) ;
78 const Int_t AliQAv1::fgkQADebugLevel = 99 ;
79 const TString AliQAv1::fImageFileName = "QAImage" ;
80 const TString AliQAv1::fImageFileFormat = "ps" ;
81 const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ;
83 //____________________________________________________________________________
87 fNEventSpecies(AliRecoParam::kNSpecies),
88 fLengthQA(fNdet*fNEventSpecies),
89 fQA(new ULong_t[fLengthQA]),
92 fEventSpecie(AliRecoParam::kDefault),
93 fEventSpecies(new Bool_t[fNEventSpecies])
95 // default constructor
96 memset(fQA,0,fLengthQA*sizeof(ULong_t));
97 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
100 //____________________________________________________________________________
101 AliQAv1::AliQAv1(const AliQAv1& qa) :
104 fNEventSpecies(qa.fNEventSpecies),
105 fLengthQA(qa.fLengthQA),
106 fQA(new ULong_t[fLengthQA]),
109 fEventSpecie(qa.fEventSpecie),
110 fEventSpecies(new Bool_t[fNEventSpecies])
113 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
114 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
117 //_____________________________________________________________________________
118 AliQAv1& AliQAv1::operator = (const AliQAv1& qa)
120 // assignment operator
122 TNamed::operator=(qa);
124 fNEventSpecies = qa.fNEventSpecies;
125 fLengthQA = qa.fLengthQA;
127 if(fQA) delete [] fQA;
128 fQA = new ULong_t[fLengthQA];
129 memcpy(fQA,qa.fQA,fLengthQA*sizeof(ULong_t));
133 fEventSpecie = qa.fEventSpecie;
134 if(fEventSpecies) delete [] fEventSpecies;
135 fEventSpecies = new Bool_t[fNEventSpecies];
136 memcpy(fEventSpecies,qa.fEventSpecies,fNEventSpecies*sizeof(Bool_t));
141 //_______________________________________________________________
142 AliQAv1::AliQAv1(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es) :
143 TNamed("QA", "Quality Assurance status"),
145 fNEventSpecies(eslength),
147 fQA(new ULong_t[fLengthQA]),
150 fEventSpecie(AliRecoParam::kDefault),
151 fEventSpecies(new Bool_t[fNEventSpecies])
153 // constructor to be used
154 memcpy(fQA, qa, fLengthQA*sizeof(ULong_t));
155 memcpy(fEventSpecies, es, fNEventSpecies*sizeof(Bool_t));
158 //_______________________________________________________________
159 AliQAv1::AliQAv1(const DETECTORINDEX_t det) :
160 TNamed("QA", "Quality Assurance status"),
162 fNEventSpecies(AliRecoParam::kNSpecies),
163 fLengthQA(fNdet*fNEventSpecies),
164 fQA(new ULong_t[fLengthQA]),
167 fEventSpecie(AliRecoParam::kDefault),
168 fEventSpecies(new Bool_t[fNEventSpecies])
170 // constructor to be used
171 if (! CheckRange(det) ) fDet = kNULLDET ;
172 memset(fQA,0,fLengthQA*sizeof(ULong_t));
173 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
176 //_______________________________________________________________
177 AliQAv1::AliQAv1(const ALITASK_t tsk) :
178 TNamed("QA", "Quality Assurance status"),
180 fNEventSpecies(AliRecoParam::kNSpecies),
181 fLengthQA(fNdet*fNEventSpecies),
182 fQA(new ULong_t[fLengthQA]),
185 fEventSpecie(AliRecoParam::kDefault),
186 fEventSpecies(new Bool_t[fNEventSpecies])
188 // constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
189 if (! CheckRange(tsk) ) fTask = kNULLTASK ;
190 memset(fQA,0,fLengthQA*sizeof(ULong_t));
191 memset(fEventSpecies,kFALSE,fNEventSpecies*sizeof(Bool_t));
194 //____________________________________________________________________________
199 delete [] fEventSpecies;
202 //_______________________________________________________________
203 void AliQAv1::Close()
205 // close the open files
207 if (fgQADataFile->IsOpen())
208 fgQADataFile->Close() ;
210 if (fgQAResultFile->IsOpen())
211 fgQAResultFile->Close() ;
213 if (fgQARefFile->IsOpen())
214 fgQARefFile->Close() ;
217 //_______________________________________________________________
218 Bool_t AliQAv1::CheckFatal() const
220 // check if any FATAL status is set
223 for (index = 0; index < kNDET ; index++)
224 rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
228 //_______________________________________________________________
229 Bool_t AliQAv1::CheckRange(DETECTORINDEX_t det) const
231 // check if detector is in given detector range: 0-kNDET
233 Bool_t rv = ( det < 0 || det > kNDET ) ? kFALSE : kTRUE ;
235 AliFatal(Form("Detector index %d is out of range: 0 <= index <= %d", det, kNDET)) ;
239 //_______________________________________________________________
240 Bool_t AliQAv1::CheckRange(ALITASK_t task) const
242 // check if task is given taskk range: 0:kNTASK
243 Bool_t rv = ( task < kRAW || task > kNTASK ) ? kFALSE : kTRUE ;
245 AliFatal(Form("Module index %d is out of range: 0 <= index <= %d", task, kNTASK)) ;
249 //_______________________________________________________________
250 Bool_t AliQAv1::CheckRange(QABIT_t bit) const
252 // check if bit is in given bit range: 0-kNBit
254 Bool_t rv = ( bit < 0 || bit > kNBIT ) ? kFALSE : kTRUE ;
256 AliFatal(Form("Status bit %d is out of range: 0 <= bit <= %d", bit, kNBIT)) ;
260 //_______________________________________________________________
261 Bool_t AliQAv1::CheckRange(AliRecoParam::EventSpecie_t es) const
263 // check if bit is in given bit range: 0-kNBit
266 case AliRecoParam::kDefault:
269 case AliRecoParam::kLowMult:
272 case AliRecoParam::kHighMult:
275 case AliRecoParam::kCosmic:
278 case AliRecoParam::kCalib:
283 AliFatal(Form("Event Specie %d is not valid", es)) ;
287 //_______________________________________________________________
288 const char * AliQAv1::GetAliTaskName(ALITASK_t tsk)
290 // returns the char name corresponding to module index
314 return tskName.Data() ;
317 //_______________________________________________________________
318 const char * AliQAv1::GetBitName(QABIT_t bit) const
320 // returns the char name corresponding to bit
330 bitName = "WARNING" ;
342 return bitName.Data() ;
345 //_______________________________________________________________
346 TH1 * AliQAv1::GetData(TObjArray** list, Int_t index, AliRecoParam::EventSpecie_t eventSpecie)
348 // retrieve QA data from the list at a given index and for a given event specie
350 Int_t esindex = AliRecoParam::AConvert(eventSpecie) ;
351 TObjArray * arr = list[esindex] ;
353 if ( index > AliQAv1::GetMaxQAObj() ) {
354 AliErrorClass(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ;
356 if ( arr->At(index) ) {
357 rv = static_cast<TH1*>(arr->At(index)) ;
364 //_______________________________________________________________
365 AliQAv1::DETECTORINDEX_t AliQAv1::GetDetIndex(const char * name)
367 // returns the detector index corresponding to a given name
368 TString sname(name) ;
369 DETECTORINDEX_t rv = kNULLDET ;
370 for (Int_t det = 0; det < kNDET ; det++) {
371 if ( GetDetName(det) == sname ) {
372 rv = DETECTORINDEX_t(det) ;
379 //_______________________________________________________________
380 const char * AliQAv1::GetDetName(Int_t det)
382 // returns the detector name corresponding to a given index (needed in a loop)
384 if ( det >= 0 && det < kNDET)
385 return (fgDetNames[det]).Data() ;
390 //_______________________________________________________________
391 TFile * AliQAv1::GetQADataFile(const char * name, Int_t run)
393 // opens the file to store the detectors Quality Assurance Data Maker results
394 const char * temp = Form("%s.%s.%d.root", name, fgQADataFileName.Data(), run) ;
396 if (! fgQADataFile ) {
397 if (gSystem->AccessPathName(temp))
401 fgQADataFile = TFile::Open(temp, opt.Data()) ;
403 if ( strcmp(temp, fgQADataFile->GetName()) != 0 ) {
404 fgQADataFile = static_cast<TFile *>(gROOT->FindObject(temp)) ;
405 if ( !fgQADataFile ) {
406 if (gSystem->AccessPathName(temp))
410 fgQADataFile = TFile::Open(temp, opt.Data()) ;
414 return fgQADataFile ;
417 //_____________________________________________________________________________
418 AliQAv1::MODE_t AliQAv1::Mode(TASKINDEX_t task) {
419 // return "rec" or "sim" depending on the task
428 case AliQAv1::kSDIGITS:
431 case AliQAv1::kDIGITS:
434 case AliQAv1::kDIGITSR:
437 case AliQAv1::kRECPOINTS:
440 case AliQAv1::kTRACKSEGMENTS:
443 case AliQAv1::kRECPARTICLES:
452 return AliQAv1::kNULLMODE;
455 //_____________________________________________________________________________
456 TFile * AliQAv1::GetQADataFile(const char * fileName)
458 // Open if necessary the Data file and return its pointer
462 fileName = AliQAv1::GetQADataFileName() ;
463 if (!gSystem->AccessPathName(fileName)) {
464 fgQADataFile = TFile::Open(fileName) ;
466 AliFatalClass(Form("File %s not found", fileName)) ;
469 return fgQADataFile ;
472 //_______________________________________________________________
473 TFile * AliQAv1::GetQAResultFile()
475 // opens the file to store the Quality Assurance Data Checker results
476 if (fgQAResultFile && fgQAResultFile->IsOpen())
478 fgQAResultFile->Close();
480 delete fgQAResultFile;
483 TString dirName(fgQAResultDirName) ;
484 if ( dirName.Contains(fgkLabLocalFile))
485 dirName.ReplaceAll(fgkLabLocalFile, "") ;
486 TString fileName(dirName + fgQAResultFileName) ;
488 if ( !gSystem->AccessPathName(fileName) )
491 if ( gSystem->AccessPathName(dirName) )
492 gSystem->mkdir(dirName) ;
495 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
610 TFile * f = GetQAResultFile() ;
611 fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
614 fgQA = new AliQAv1() ;
619 //_______________________________________________________________
620 AliQAv1 * AliQAv1::Instance(const Int_t qalength, ULong_t * qa, const Int_t eslength, Bool_t * es)
622 // Get an instance of the singleton. The only authorized way to call the ctor
625 fgQA = new AliQAv1(qalength, qa, eslength, es) ;
629 //_______________________________________________________________
630 AliQAv1 * AliQAv1::Instance(const DETECTORINDEX_t det)
632 // Get an instance of the singleton. The only authorized way to call the ctor
635 TFile * f = GetQAResultFile() ;
636 fgQA = static_cast<AliQAv1 *>(f->Get(GetQAName())) ;
638 fgQA = new AliQAv1(det) ;
644 //_______________________________________________________________
645 AliQAv1 * AliQAv1::Instance(const ALITASK_t tsk)
647 // Get an instance of the singleton. The only authorized way to call the ctor
654 fgQA = new AliQAv1(tsk) ;
657 fgQA = new AliQAv1(tsk) ;
660 AliInfoClass("fgQA = gAlice->GetQA()") ;
663 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
666 AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
676 //_______________________________________________________________
677 AliQAv1 * AliQAv1::Instance(const TASKINDEX_t tsk)
679 // get an instance of the singleton.
681 ALITASK_t index = kNULLTASK ;
685 else if (tsk < kDIGITS)
687 else if (tsk < kRECPARTICLES)
689 else if (tsk == kESDS)
692 return Instance(index) ;
695 //_______________________________________________________________
696 void AliQAv1::Merge(TCollection * list) {
697 // Merge the QA resuls in the list into this single AliQAv1 object
699 for (Int_t det = 0 ; det < kNDET ; det++) {
700 Set(DETECTORINDEX_t(det)) ;
701 for (Int_t task = 0 ; task < kNTASK ; task++) {
702 Set(ALITASK_t(task)) ;
703 for (Int_t bit = 0 ; bit < kNBIT ; bit++) {
706 while ( (qa = (AliQAv1*)next() ) ) {
707 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) ;
717 //_______________________________________________________________
718 ULong_t AliQAv1::Offset(ALITASK_t tsk) const
720 // Calculates the bit offset for a given module (SIM, REC, ESD, ANA)
750 //_______________________________________________________________
751 void AliQAv1::Reset(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es)
753 // resets all the bits for a given tsk and event specie
758 ULong_t offset = Offset(tsk) ;
759 ULong_t status = GetStatus(det, es) ;
760 for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
762 status = status & ~1 << offset ;
764 SetStatus(det, es, status) ;
767 //_______________________________________________________________
768 void AliQAv1::ResetStatus(DETECTORINDEX_t det)
770 // reset the status of det for all event specie
771 for (Int_t es = 0 ; es < fNEventSpecies ; es++)
772 fQA[det*fNdet+es] = 0 ;
775 //_______________________________________________________________
776 void AliQAv1::Set(QABIT_t bit, Int_t ies)
778 // Set the status bit of the current detector in the current module and for the current event specie
779 Set(bit, AliRecoParam::Convert(ies)) ;
782 //_______________________________________________________________
783 void AliQAv1::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
785 // Set the status bit of the current detector in the current module and for the current event specie
787 SetStatusBit(fDet, fTask, es, bit) ;
790 //_____________________________________________________________________________
791 void AliQAv1::SetQARefStorage(const char * name)
793 // Set the root directory where the QA reference data are stored
795 fgQARefDirName = name ;
796 if ( fgQARefDirName.Contains(fgkLabLocalFile) )
797 fgQARefFileName = fgkRefFileName ;
798 else if ( fgQARefDirName.Contains(fgkLabLocalOCDB) )
799 fgQARefFileName = fgkQAName ;
800 else if ( fgQARefDirName.Contains(fgkLabAliEnOCDB) )
801 fgQARefFileName = fgkQAName ;
804 AliErrorClass(Form("ERROR: %s is an invalid storage definition\n", name)) ;
805 fgQARefDirName = "" ;
806 fgQARefFileName = "" ;
808 TString tmp(fgQARefDirName) ; // + fgQARefFileName) ;
809 AliInfoClass(Form("AliQAv1::SetQARefDir: QA references are in %s\n", tmp.Data() )) ;
812 //_____________________________________________________________________________
813 void AliQAv1::SetQAResultDirName(const char * name)
815 // Set the root directory where to store the QA status object
817 fgQAResultDirName.Prepend(name) ;
818 AliInfoClass(Form("AliQAv1::SetQAResultDirName: QA results are in %s\n", fgQAResultDirName.Data())) ;
819 if ( fgQAResultDirName.Contains(fgkLabLocalFile))
820 fgQAResultDirName.ReplaceAll(fgkLabLocalFile, "") ;
821 fgQAResultFileName.Prepend(fgQAResultDirName) ;
824 //_______________________________________________________________
825 void AliQAv1::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
827 // Set the status bit for a given detector and a given task
834 Reset(det, tsk, es) ;
836 ULong_t offset = Offset(tsk) ;
837 ULong_t status = GetStatus(det, es) ;
839 status = status | 1 << offset ;
840 SetStatus(det, es, status) ;
843 //_______________________________________________________________
844 void AliQAv1::Show(DETECTORINDEX_t det) const
846 // dispplay the QA status word
847 if ( det == kNULLDET)
849 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
850 if ( IsEventSpecieSet(ies) )
851 ShowStatus(det, kNULLTASK, AliRecoParam::ConvertIndex(ies)) ;
855 //_______________________________________________________________
856 void AliQAv1::ShowAll() const
858 // dispplay the QA status word
860 for (index = 0 ; index < kNDET ; index++) {
861 for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
862 for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
863 if ( IsEventSpecieSet(ies) )
864 ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::ConvertIndex(ies)) ;
870 //_______________________________________________________________
871 void AliQAv1::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
873 // Prints the full QA status of a given detector
876 ULong_t status = GetStatus(det, es) ;
877 ULong_t tskStatus[kNTASK] ;
878 tskStatus[kRAW] = status & 0x0000f ;
879 tskStatus[kSIM] = status & 0x000f0 ;
880 tskStatus[kREC] = status & 0x00f00 ;
881 tskStatus[kESD] = status & 0x0f000 ;
882 tskStatus[kANA] = status & 0xf0000 ;
884 AliInfo(Form("====> QA Status for %8s %8s raw =0x%x, sim=0x%x, rec=0x%x, esd=0x%x, ana=0x%x", GetDetName(det).Data(), AliRecoParam::GetEventSpecieName(es),
885 tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
886 if (tsk == kNULLTASK) {
887 for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
888 ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ;
891 ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ;
895 //_______________________________________________________________
896 void AliQAv1::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
898 // print the QA status in human readable format
900 QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
901 if ( bit != kNULLBit ) {
902 text = GetBitName(bit) ;
904 AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data())) ;
908 //_______________________________________________________________
909 void AliQAv1::UnSet(QABIT_t bit, Int_t ies)
911 // UnSet the status bit of the current detector in the current module
912 UnSet(bit, AliRecoParam::Convert(ies)) ;
915 //_______________________________________________________________
916 void AliQAv1::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
918 // UnSet the status bit of the current detector in the current module
920 UnSetStatusBit(fDet, fTask, es, bit) ;
923 //_______________________________________________________________
924 void AliQAv1::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
926 // UnSet the status bit for a given detector and a given task
933 ULong_t offset = Offset(tsk) ;
934 ULong_t status = GetStatus(det, es) ;
936 status = status & 0 << offset ;
937 SetStatus(det, es, status) ;