30 #include <TIterator.h> 35 #include <TParameter.h> 36 #include <TPaveText.h> 59 fLowTestValue(new Float_t[
AliQAv1::kNBIT]),
60 fUpTestValue(new Float_t[
AliQAv1::kNBIT]),
63 fExternParamList(new TList())
77 const Char_t * text= Form(
" INFO -> %1.5f < value < %1.5f WARNING -> %1.5f < value <= %1.5f \n ERROR -> %1.5f < value <= %1.5f \n FATAL -> %1.5f <= value < %1.5f \n",
86 fImage[specie] = NULL ;
87 fRefOCDBSubDir[specie] = NULL ;
121 TIter next(keyList) ;
123 while ( (key = static_cast<TKey *>(next())) ) {
124 TDirectory * specieDir =
fDataSubDir->GetDirectory(key->GetName()) ;
125 TList * keykeyList = specieDir->GetListOfKeys() ;
126 TIter next2(keykeyList) ;
128 while ( (keykey = static_cast<TKey *>(next2())) ) {
129 TObject * odata = specieDir->Get(keykey->GetName()) ;
130 if ( odata->IsA()->InheritsFrom(
"TH1") ) {
131 TH1 * hdata =
static_cast<TH1*
>(odata) ;
132 list[specie]->Add(hdata) ;
133 }
else if (!odata->IsA()->InheritsFrom(
"TDirectory"))
134 AliError(Form(
"%s Is a Classname that cannot be processed", key->GetClassName())) ;
140 Check(test, index, list, recoParam) ;
160 if (list[specie]->GetEntries() == 0)
166 TIter next(list[specie]) ;
169 while ( (hdata = static_cast<TH1 *>(next())) ) {
170 if ( hdata->IsA()->InheritsFrom(
"TH1") ) {
175 TString hname = hdata->GetName();
192 Double_t rv =
DiffK(hdata, href) ;
198 AliError(
"Data type cannot be processed") ;
199 if (count[specie] != 0)
200 test[specie] /= count[specie] ;
222 if ( hin->Integral() == 0 ) {
227 return hin->Chi2Test(href) ;
234 if ( hin->Integral() == 0 || href->Integral() == 0) {
239 return hin->KolmogorovTest(href) ;
249 AliError(Form(
"%s is not a valid location for reference data", refStorage.Data())) ;
255 dirOCDB[specie] = NULL ;
268 TList * listDetQAD =
static_cast<TList *
>(entry->
GetObject()) ;
269 if ( listDetQAD && strcmp(listDetQAD->ClassName(),
"TList") != 0 ) {
270 AliError(Form(
"Expected a Tlist and found a %s for detector %s", listDetQAD->ClassName(), det)) ;
275 TIter next(listDetQAD) ;
289 TParameter<double> *pp ;
290 TString printit(
"\n") ;
291 while( (pp = (TParameter<double>*)next()) )
292 printit += Form(
"%s = %f\n", pp->GetName(), pp->GetVal());
293 AliInfo(Form(
"%s", printit.Data())) ;
327 listTrig[specie] = 0;
329 listTrig[specie] =
new TObjArray( list[specie]->GetSize() );
333 Check(rv, index, listTrig, recoParam) ;
362 TIter next(list[esIndex]);
363 TObject* hdata = NULL;
365 while ( (hdata=(next())) ) {
368 tmpArr.AddLast(hdata);
374 while ((hcl=nextCl()))
if (hcl->InheritsFrom(TH1::Class()) && hcl->TestBit(
AliQAv1::GetImageBit())) {tmpArr.AddLast(hcl); nImages++;}
377 if ( nImages == 0 ) {
385 if ( !
fImage[esIndex] )
fImage[esIndex] =
new TCanvas(title, title);
388 fImage[esIndex]->SetTitle(title);
390 TPaveText someText(0.015, 0.015, 0.98, 0.98);
391 someText.AddText(title);
395 Int_t nx = TMath::Nint(TMath::Sqrt(nImages));
397 if (nx < TMath::Sqrt(nImages)) ny++;
399 fImage[esIndex]->Divide(nx, ny);
400 TIter nexthist(&tmpArr);
402 fImage[esIndex]->cd(npad);
404 while ( (histo=(TH1*)nexthist()) ) {
405 TString opts = histo->GetDrawOption();
406 if (opts.Contains(
"logy",TString::kIgnoreCase)) gPad->SetLogy();
407 if (opts.Contains(
"logx",TString::kIgnoreCase)) gPad->SetLogx();
409 fImage[esIndex]->cd(++npad);
420 const Char_t * text= Form(
" INFO -> %1.5f < value < %1.5f WARNING -> %1.5f < value <= %1.5f \n ERROR -> %1.5f < value <= %1.5f \n FATAL -> %1.5f <= value < %1.5f \n",
434 const Char_t * text= Form(
" INFO -> %1.5f < value < %1.5f WARNING -> %1.5f < value <= %1.5f \n ERROR -> %1.5f < value <= %1.5f \n FATAL -> %1.5f <= value < %1.5f \n",
452 if ( value == NULL ) {
static UShort_t GetMaxQAObj()
static const char * GetEventSpecieName(EventSpecie_t es)
static UInt_t GetImageBit()
static AliQAManager * QAManager(AliQAv1::MODE_t=AliQAv1::kNULLMODE, TMap *entryCache=NULL, Int_t run=-1)
static UInt_t GetExpertBit()
void PrivateCheck(Double_t *rv, AliQAv1::ALITASK_t index, const AliDetectorRecoParam *recoParam)
static TFile * GetQAResultFile()
virtual void Check(Double_t *rv, AliQAv1::ALITASK_t, TObjArray **list, const AliDetectorRecoParam *recoParam=0)
static const char * GetRefOCDBDirName()
static const char * GetImageFileFormat()
static const char * GetImageFileName()
TObjArray ** fRefOCDBSubDir
directory for the current task directory in the current detector directory in the reference file ...
static const char * GetQARefStorage()
TList * fExternParamList
flag to print the images or not
static TObjArray * GetDataOfTrigClass(TObjArray *arr, Int_t cloneID, TObjArray *dest=0)
AliCDBEntry * Get(const AliCDBId &query, Bool_t forceCaching=kFALSE)
static DETECTORINDEX_t GetDetIndex(const char *name)
static EventSpecie_t ConvertIndex(Int_t index)
void SetSpecificStorage(const char *calibType, const char *dbString, Int_t version=-1, Int_t subVersion=-1)
TDirectory * fRefSubDir
directory for the current task directory in the current detector directory in the data file ...
static const char * GetTriggerPrefix()
Double_t DiffK(const TH1 *href, const TH1 *hin) const
virtual void MakeImage(TObjArray **list, AliQAv1::TASKINDEX_t task, AliQAv1::MODE_t mode)
virtual ~AliQACheckerBase()
void Run(AliQAv1::ALITASK_t tsk, const AliDetectorRecoParam *recoParam=NULL)
static Int_t GetNTrigClasses()
static const char * GetAliTaskName(ALITASK_t tsk)
void SetDefaultStorage(const char *dbString)
virtual void SetQA(AliQAv1::ALITASK_t index, Double_t *value) const
void SetHiLo(Float_t *hiValue, Float_t *lowValue)
static UInt_t GetClonedBit()
static const char * GetRefDataDirName()
#define AliDebug(logLevel, message)
void GetRefSubDir(const char *det, const char *task, TDirectory *&dirFile, TObjArray **&dirOCDB)
static void SetQARefDataDirName(AliRecoParam::EventSpecie_t es)
static const char * GetModeName(MODE_t mode)
void Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
static const TString GetLabLocalOCDB()
ULong64_t SetLock(Bool_t lockFlag=kTRUE, ULong64_t key=0)
Bool_t IsEventSpecieSet(AliRecoParam::EventSpecie_t es) const
#define AliError(message)
Float_t * fLowTestValue
Entry in OCDB for the current detector.
static const TString GetLabAliEnOCDB()
static const char * GetQAName()
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
static Int_t GetQADebugLevel()
Double_t DiffC(const TH1 *href, const TH1 *hin) const
static AliQAChecker * Instance()
static TString GetTaskName(UInt_t tsk)
static const char * GetTrigClassName(Int_t i)
static AliQAv1 * Instance()
static TASKINDEX_t GetTaskIndex(const char *name)