TString bitName ;
switch (bit) {
case kNULLBit:
+ bitName = "NONE" ;
break ;
case kINFO:
bitName = "INFO" ;
//_______________________________________________________________
TFile * AliQAv1::GetQAResultFile()
{
- // opens the file to store the Quality Assurance Data Checker results
- if (fgQAResultFile)
- fgQAResultFile->Close() ;
- fgQAResultFile = 0x0 ;
-// if (!fgQAResultFile) {
+ // opens the file to store the Quality Assurance Data Checker results
+ if (fgQAResultFile)
+ if (fgQAResultFile->IsOpen())
+ fgQAResultFile->Close();
+
TString dirName(fgQAResultDirName) ;
if ( dirName.Contains(fgkLabLocalFile))
dirName.ReplaceAll(fgkLabLocalFile, "") ;
opt = "NEW" ;
}
fgQAResultFile = TFile::Open(fileName, opt) ;
-// }
return fgQAResultFile ;
}
+//_______________________________________________________________
+const AliQAv1::QABIT_t AliQAv1::GetQAStatusBit(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk) const
+{
+ // returns the QA bit set
+ QABIT_t rv = kNULLBit ;
+ if ( es == AliRecoParam::kDefault)
+ es = fEventSpecie ;
+ if ( det == kNULLDET )
+ det = fDet ;
+ if ( tsk == kNULLTASK )
+ tsk = fTask ;
+ for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
+ if (IsSet(det, tsk, es, QABIT_t(bit)))
+ rv = QABIT_t(bit) ;
+ }
+ return rv ;
+}
+
//_______________________________________________________________
AliQAv1::TASKINDEX_t AliQAv1::GetTaskIndex(const char * name)
{
if ( ! fgQA) {
TFile * f = GetQAResultFile() ;
fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
+ f->Close() ;
if ( ! fgQA )
fgQA = new AliQAv1() ;
}
if ( ! fgQA) {
TFile * f = GetQAResultFile() ;
- fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
+ fgQA = static_cast<AliQAv1 *>(f->Get(GetQAName())) ;
if ( ! fgQA )
fgQA = new AliQAv1(det) ;
}
{
// print the QA status in human readable format
TString text;
- for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
- if (IsSet(det, tsk, es, QABIT_t(bit))) {
- text = GetBitName(QABIT_t(bit)) ;
- text += " " ;
- }
- }
- if (! text.IsNull())
- AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data())) ;
+ QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
+ if ( bit != kNULLBit ) {
+ text = GetBitName(bit) ;
+ text += " " ;
+ AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data())) ;
+ }
}
//_______________________________________________________________
static const char * GetQARefDefaultStorage() { return fgkQARefOCDBDefault.Data() ; }
static const char * GetQARefFileName() { return fgQARefFileName ; }
static const char * GetQARefStorage() { return fgQARefDirName.Data() ; }
+ const QABIT_t GetQAStatusBit(AliRecoParam::EventSpecie_t es = AliRecoParam::kDefault, DETECTORINDEX_t det=kNULLDET, ALITASK_t tsk=kNULLTASK) const ;
static const char * GetRefOCDBDirName() { return fgkRefOCDBDirName.Data() ; }
static const char * GetRefDataDirName() { return fgRefDataDirName.Data() ; }
+
static TASKINDEX_t GetTaskIndex(const char * name) ;
static TString GetTaskName(UInt_t tsk) { return fgTaskNames[tsk] ; }
static const char * GetModeName(MODE_t mode) { return (mode == kSIMMODE || mode == kRECMODE) ? (fgModeNames[mode]).Data() : "" ; }
void SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
void UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
- static AliQAv1 * fgQA ; // pointer to the instance of the singleton
- Int_t fNdet ; // number of detectors
- Int_t fNEventSpecies ; // number of Event Species (see AliRecoParam)
- Int_t fLengthQA ; // Auxiliary length of fQA
- ULong_t * fQA ; //[fLengthQA] the status word 4 bits for SIM, REC, ESD, ANA each
- DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....)
- ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA)
- AliRecoParam::EventSpecie_t fEventSpecie ; //! the current event specie
- static TString fgDetNames[] ; //! list of detector names
- static TString fgGRPPath ; //! path of the GRP object in OCDB
- static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results
- static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results
- static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results
- static TString fgQARefDirName ; //! name of directory where to find the reference data file
- static TString fgQARefFileName ; //! file name where to find the reference data
- static TFile * fgQAResultFile ; //! File where to find the QA result
- static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored
- static TString fgQAResultFileName ; //! the output file where the QA results are stored
- static TString fgRTNames[] ; //! list of Run Type names
- static TString fgTaskNames[] ; //! list of tasks names
- static TString fgModeNames[] ; //! list of mode names
- static const TString fgkExpert ; //! name for the expert directory
- static const UInt_t fgkExpertBit ; //! TObject bit identifing the object as "expert"
- static const UInt_t fgkImageBit ; //! TObject bit identifing the object to be plotted on the QA image
- static const TString fgkLabLocalFile ; //! label to identify a file as local
- static const TString fgkLabLocalOCDB ; //! label to identify a file as local OCDB
- static const TString fgkLabAliEnOCDB ; //! label to identify a file as AliEn OCDB
- static const TString fgkRefFileName ; //! name of Reference File Name
- static const UInt_t fgkQABit ; //! bit in the QA data object which is set when Checker does not return 0
- static const Int_t fgkQADebugLevel ; //! debug level used for QA verbosity
- static const TString fgkQAName ; //! name of QA object
- static const TString fgkQACorrNtName ; //! name of QA Correlation Ntuple
- static const TString fgkRefOCDBDirName ; //! name of Reference directory name in OCDB
- static TString fgRefDataDirName ; //! name of Reference directory name in OCDB for data
- static const TString fgkQARefOCDBDefault ; //! default storage for QA in OCDB
- Bool_t * fEventSpecies ; //[fNEventSpecies] list of event species encountered in a run
- static const TString fImageFileName ; //! name of the file that contains all the QA images
- static const TString fImageFileFormat ; //! format of the file that contains all the QA images
- static const UShort_t fgkMaxQAObjects ;//! maximum number of QA objects allowed dor each task (Raws, digits,....)
+ static AliQAv1 * fgQA ; // pointer to the instance of the singleton
+ Int_t fNdet ; // number of detectors
+ Int_t fNEventSpecies ; // number of Event Species (see AliRecoParam)
+ Int_t fLengthQA ; // Auxiliary length of fQA
+ ULong_t * fQA ; //[fLengthQA] the status word 4 bits for SIM, REC, ESD, ANA each
+ DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....)
+ ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA)
+ AliRecoParam::EventSpecie_t fEventSpecie ; //! the current event specie
+ static TString fgDetNames[] ; //! list of detector names
+ static TString fgGRPPath ; //! path of the GRP object in OCDB
+ static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results
+ static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results
+ static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results
+ static TString fgQARefDirName ; //! name of directory where to find the reference data file
+ static TString fgQARefFileName ; //! file name where to find the reference data
+ static TFile * fgQAResultFile ; //! File where to find the QA result
+ static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored
+ static TString fgQAResultFileName ; //! the output file where the QA results are stored
+ static TString fgRTNames[] ; //! list of Run Type names
+ static TString fgTaskNames[] ; //! list of tasks names
+ static TString fgModeNames[] ; //! list of mode names
+ static const TString fgkExpert ; //! name for the expert directory
+ static const UInt_t fgkExpertBit ; //! TObject bit identifing the object as "expert"
+ static const UInt_t fgkImageBit ; //! TObject bit identifing the object to be plotted on the QA image
+ static const TString fgkLabLocalFile ; //! label to identify a file as local
+ static const TString fgkLabLocalOCDB ; //! label to identify a file as local OCDB
+ static const TString fgkLabAliEnOCDB ; //! label to identify a file as AliEn OCDB
+ static const TString fgkRefFileName ; //! name of Reference File Name
+ static const UInt_t fgkQABit ; //! bit in the QA data object which is set when Checker does not return 0
+ static const Int_t fgkQADebugLevel ; //! debug level used for QA verbosity
+ static const TString fgkQAName ; //! name of QA object
+ static const TString fgkQACorrNtName ; //! name of QA Correlation Ntuple
+ static const TString fgkRefOCDBDirName ; //! name of Reference directory name in OCDB
+ static TString fgRefDataDirName ; //! name of Reference directory name in OCDB for data
+ static const TString fgkQARefOCDBDefault ; //! default storage for QA in OCDB
+ Bool_t * fEventSpecies ; //[fNEventSpecies] list of event species encountered in a run
+ static const TString fImageFileName ; //! name of the file that contains all the QA images
+ static const TString fImageFileFormat ; //! format of the file that contains all the QA images
+ static const UShort_t fgkMaxQAObjects ;//! maximum number of QA objects allowed dor each task (Raws, digits,....)
ClassDef(AliQAv1,3) //ALICE Quality Assurance Object
};