- // AliWarning("Using the QA Reference data for ACORDE !!!");
- test[specie] = CheckAcordeRefHits(list[specie],(TObjArray *)acoQARefDir->GetObject());
- if ((test[specie] = 0.86) || (acoHitsNorm>0.50))
- {
- acoRefTest[specie]=0.78;//printf("testMario: %f\n",acoRefTest[specie]);printf("histo:%f\n",hdata->GetMaximum());
- }
- }else{
- // AliWarning("Using the inner ACORDE QA Checker !!!");
- if ( (acoHitsNorm>0.40) && (acoHitsNorm<=1) ) acoTest[specie] = 0.75;
- if ( (acoHitsNorm>0.0020) && (acoHitsNorm<=0.40) ) acoTest[specie] = 0.251;
- if ( (acoHitsNorm>0.0) && (acoHitsNorm<=0.0020) ) acoTest[specie] = 0.0010;
- if ( (acoHitsNorm>-1.0) && (acoHitsNorm<=0.0) ) acoTest[specie] = -0.5;
- }
- }
- }
- else{
- AliError("Data type cannot be processed") ;
- }
- }
- if (count[specie] != 0) {
- if (test[specie]==0) {
- // AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
- test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
- }
- else {
- if (acoQARefDir) test[specie] = acoRefTest[specie];
- else{
- test[specie] = acoTest[specie];//printf("testDyMa: %f\n",test[specie]);
- }
- }
- }
- }
- // AliInfo(Form("Test Result = %f", test[specie])) ;
- }
- return test ;
+ //if (hdata)
+ if (hdata->GetEntries()!=0)
+ {
+ Double_t rv = 0.0 ;
+ if(hdata->GetEntries()>0) rv=1;
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ;
+ TString hdataName = hdata->GetName();
+ //if (hdata->GetListOfFunctions()->GetEntries() == 0) continue;
+
+ if (hdataName.Contains("fhACORDEStatusAMU_DQM"))
+ {
+ if (!hdata->GetListOfFunctions()->Contains(fTextDQMShifterInfo))
+ hdata->GetListOfFunctions()->Add(fTextDQMShifterInfo);
+ if (!hdata->GetListOfFunctions()->Contains(fMax))
+ hdata->GetListOfFunctions()->Add(fMax);
+ }
+ // check with OCDB ref. data
+ if ( (fRefOCDBSubDir[specie]) && (hdataName.Contains("ACORDEBitPattern")) )
+ {
+ TH1 * href = NULL;
+ if (fRefSubDir) href = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName()));
+ else if (fRefOCDBSubDir[specie]) href = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(hdata->GetName()));
+ test[specie] = CheckAcordeRefHits(href,hdata);
+ }else
+ {
+ if (hdataName.Contains("ACORDEBitPattern"))
+ // Here we use an inner QA Checher without the QAref data
+ {
+ Float_t acoDataMax = hdata->GetMaximum();
+ Int_t flagAcoQAChecker = 0;
+ if (acoDataMax == 0) continue;
+ for(Int_t i=0;i<60;i++)
+ {
+ if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQAChecker++;
+ }
+ Double_t simpleFlag = 1.-flagAcoQAChecker/60.;
+ if ( (simpleFlag >= 0.90) && (simpleFlag <= 1.0) ) test[specie] = 0.75; // INFO
+ if ( (simpleFlag >= 0.70) && (simpleFlag < 0.90) ) test[specie] = 0.50; // WARNING
+ if ( (simpleFlag >= 0.25) && (simpleFlag < 0.70) ) test[specie] = 0.25; // ERROR
+ if ( (simpleFlag >= 0.0) && (simpleFlag < 0.25) ) test[specie] = -1.0; // FATAL
+ if (test[specie]>0) rv = test[specie];
+ else rv = 1.0;
+ }
+ if (hdataName.Contains("fhACORDEStatusAMU_DQM"))
+ {
+ Float_t goodModules = hdata->GetBinContent(1);
+ Float_t badModules = hdata->GetBinContent(2);
+ if (goodModules >= badModules)
+ test[specie] = 0.75;
+ else test[specie] = 0.30;
+
+ } // check for DQM condition
+ rv = test[specie];
+ if (fTextDQMShifterInfo) // DQM-flag asignment
+ {
+ fTextDQMShifterInfo->Clear();
+ if (rv > 0.4){
+ fTextDQMShifterInfo->SetFillColor(kGreen);
+ fTextDQMShifterInfo->AddText("ACORDE: O.K.");
+ }else{
+ fTextDQMShifterInfo->SetFillColor(kRed);
+ fTextDQMShifterInfo->AddText("ACORDE: Not, O.K.");
+ }
+ } // end DQM flag asignment
+ }// NO OCDB checking
+ } // hdata with entries
+ else AliError("Data type cannot be processed") ;
+ } // loop over histograms from QADataMaker
+ } // end checker
+ if ( (specie == AliRecoParam::kHighMult) || (specie == AliRecoParam::kLowMult) || (specie == AliRecoParam::kCalib) ) test[specie] = 0.75;
+ } // end of species