ClassImp(AliACORDEQAChecker)
//____________________________________________________________________________
-Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/)
+void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/)
{
- Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
- rv[specie] = 0.0 ;
- return rv ;
+ test[specie] = 0.0 ;
}
//____________________________________________________________________________
-Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
+void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
{
-
// Close version to the final one for the ACORDE QA Checker
-
- Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
- Double_t * acoTest = new Double_t[AliRecoParam::kNSpecies] ;
// Loop over the run species (for specie!= cosmic by now we set QA to INFO)
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
{
if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ;
- if (list[specie]->GetEntries() == 0) acoTest[specie] = 1.; // Nothing to check
+ if (list[specie]->GetEntries() == 0) test[specie] = 1.; // Nothing to check
else
{
TIter next(list[specie]) ;
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()));
- acoTest[specie] = CheckAcordeRefHits(href,hdata);
+ test[specie] = CheckAcordeRefHits(href,hdata);
}else if (hdataName.Contains("ACORDEBitPattern"))
// Here we use an inner QA Checher without the QAref data
{
}
}
Double_t simpleFlag = 1.-flagAcoQA/60.;
- if ( (simpleFlag >= 0.90) && (simpleFlag <= 1.0) ) acoTest[specie] = 0.75; // INFO
- if ( (simpleFlag >= 0.70) && (simpleFlag < 0.90) ) acoTest[specie] = 0.50; // WARNING
- if ( (simpleFlag >= 0.25) && (simpleFlag < 0.70) ) acoTest[specie] = 0.25; // ERROR
- if ( (simpleFlag >= 0.0) && (simpleFlag < 0.25) ) acoTest[specie] = -1.0; // FATAL
+ 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
}
// Setting Warning message for possible Empty Events with the ACORDE-Trigger
}
}
- if ( (specie == AliRecoParam::kHighMult) || (specie == AliRecoParam::kLowMult) || (specie == AliRecoParam::kCalib) ) acoTest[specie] = 0.75;
- test[specie] = acoTest[specie]; // Assign of the acoTest to the test for final QAChecker value
+ if ( (specie == AliRecoParam::kHighMult) || (specie == AliRecoParam::kLowMult) || (specie == AliRecoParam::kCalib) ) test[specie] = 0.75;
}
- return test ;
}
//____________________________________________________________________________
Double_t AliACORDEQAChecker::CheckAcordeRefHits(const TH1 * href, const TH1 * hdata) const
{
- Double_t acoTest = 0.;
+ Double_t test = 0.;
Int_t flag=0;
for (Int_t i=0;i<60;i++)
{
if (TMath::Abs(href->GetBinContent(i)-hdata->GetBinContent(i))>10) flag++;
}
- if ((flag>50)&&(flag<=60)) acoTest = -1.;
- if ((flag>30)&&(flag<=50)) acoTest = 0.25;
- if ((flag>10)&&(flag<=30)) acoTest = 0.5;
- if ((flag>0)&&(flag<=10)) acoTest = 0.75;
- return acoTest;
+ if ((flag>50)&&(flag<=60)) test = -1.;
+ if ((flag>30)&&(flag<=50)) test = 0.25;
+ if ((flag>10)&&(flag<=30)) test = 0.5;
+ if ((flag>0)&&(flag<=10)) test = 0.75;
+ return test;
}
public:
AliACORDEQAChecker() : AliQACheckerBase("ACORDE","ACORDE Quality Assurance Data Checker") {;} // constructor
virtual ~AliACORDEQAChecker() {;} // destructor
- virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/) ;
- virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** list, const AliDetectorRecoParam * /* recoParam*/) ;
+ virtual void Check(Double_t *, AliQAv1::ALITASK_t /*index*/) ;
+ virtual void Check(Double_t *, AliQAv1::ALITASK_t /*index*/, TObjArray ** list, const AliDetectorRecoParam * /* recoParam*/) ;
Double_t CheckAcordeRefHits(const TH1 * href, const TH1 * hdata) const;
}
//_________________________________________________________________
-AliHMPIDQAChecker& AliHMPIDQAChecker::operator=(const AliHMPIDQAChecker& qac)
-{
- //
- // Assignment operator
- //
- if (this!=&qac) {
- AliQACheckerBase::operator=(qac) ;
- fNoReference = qac.fNoReference ;
- fQARefRec = qac.fQARefRec ;
- }
- return *this;
-}
-//_______________________________________________________________________________________________
AliHMPIDQAChecker::~AliHMPIDQAChecker()
{
fQARefRec->Delete() ;
delete fQARefRec ;
}
//_________________________________________________________________
-Double_t * AliHMPIDQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
+void AliHMPIDQAChecker::Check(Double_t * check, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
{
//
// Main check function: Depending on the TASK, different checks are applied
// At the moment: check for empty histograms and checks for RecPoints
- Double_t * check = new Double_t[AliRecoParam::kNSpecies] ;
if(fNoReference)
- return check;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
check[specie] = 1.0;
//default check response. It will be changed when reasonable checks will be considered
else check[specie] = 0.7 ; // /-> Corresponds to kINFO see AliQACheckerBase::Run
} // species loop
-
- return check;
}
//_________________________________________________________________
Double_t AliHMPIDQAChecker::CheckEntries(TObjArray * list) const
class AliHMPIDQAChecker: public AliQACheckerBase {
public:
- AliHMPIDQAChecker() ; // ctor
- AliHMPIDQAChecker(const AliHMPIDQAChecker& qac) ; // cpy ctor
- AliHMPIDQAChecker &operator=(const AliHMPIDQAChecker& qac); //assignment operator
+ AliHMPIDQAChecker() ; // ctor
+ AliHMPIDQAChecker(const AliHMPIDQAChecker& qac) ; // cpy ctor
virtual ~AliHMPIDQAChecker() ; // dtor
- virtual Double_t * Check(AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * recoParam) ;
+ virtual void Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * recoParam) ;
Double_t CheckEntries(TObjArray * list) const ;
Double_t CheckRec(TObjArray *listrec, TObjArray *listref) const ;
}
//____________________________________________________________________________
-Double_t * AliQACheckerBase::Check(AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam)
+void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam)
{
// Performs a basic checking
// Compares all the histograms stored in the directory
}
}
- Double_t * test = Check(index, list, recoParam) ;
+ Check(test, index, list, recoParam) ;
delete[] list ;
- return test ;
}
//____________________________________________________________________________
-Double_t * AliQACheckerBase::Check(AliQAv1::ALITASK_t task, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
+void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t task, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
{
// Performs a basic checking
// Compares all the histograms in the list
- Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
Int_t count[AliRecoParam::kNSpecies] = { 0 };
// TDirectory * refDir = NULL ;
}
}
}
- return test ;
}
AliDebug(AliQAv1::GetQADebugLevel(), Form("Processing %s", AliQAv1::GetAliTaskName(index))) ;
Double_t * rv = NULL ;
- rv = Check(index, recoParam) ;
+ Check(rv, index, recoParam) ;
SetQA(index, rv) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("Test result of %s", AliQAv1::GetAliTaskName(index))) ;
{
AliDebug(AliQAv1::GetQADebugLevel(), Form("Processing %s", AliQAv1::GetAliTaskName(index))) ;
- Double_t * rv = NULL ;
- rv = Check(index, list, recoParam) ;
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ Check(rv, index, list, recoParam) ;
SetQA(index, rv) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("Test result of %s", AliQAv1::GetAliTaskName(index))) ;
- if (rv)
- delete [] rv ;
+ delete [] rv ;
Finish() ;
}
if ( !fImage[esIndex] ) {
fImage[esIndex] = new TCanvas(title, title) ;
}
- //fImage[esIndex]->Clear() ;
+ fImage[esIndex]->Clear() ;
fImage[esIndex]->SetTitle(title) ;
fImage[esIndex]->cd() ;
TPaveText someText(0.015, 0.015, 0.98, 0.98) ;
TList * GetExternParamlist() { return fExternParamList ;}
TCanvas ** GetImage() { return fImage ; }
TCanvas * GetImage(AliRecoParam::EventSpecie_t es) { return fImage[AliRecoParam::AConvert(es)] ; }
- void GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB) ;
virtual void Init(const AliQAv1::DETECTORINDEX_t det) { AliQAv1::Instance(det) ; }
virtual void MakeImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, AliQAv1::MODE_t mode) ;
void PrintExternParam() ;
void SetPrintImage(Bool_t opt = kTRUE) { fPrintImage = opt ; }
protected:
- virtual Double_t * Check(AliQAv1::ALITASK_t, TObjArray **, const AliDetectorRecoParam * recoParam) ;
+ virtual void Check(Double_t *rv, AliQAv1::ALITASK_t, TObjArray **, const AliDetectorRecoParam * recoParam) ;
Double_t DiffC(const TH1 * href, const TH1 * hin) const ;
Double_t DiffK(const TH1 * href, const TH1 * hin) const ;
void Finish() const ;
+ void GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB) ;
virtual void SetQA(AliQAv1::ALITASK_t index, Double_t * value) const ;
TDirectory * fDataSubDir ; //! directory for the current task directory in the current detector directory in the data file
TList * fExternParamList; //List of external parameters (TParameter<double>)
private:
- Double_t * Check(AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam) ;
+ void Check(Double_t * rv, AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam) ;
ClassDef(AliQACheckerBase,3) // description
const char * AliQAv1::GetAliTaskName(ALITASK_t tsk)
{
// returns the char name corresponding to module index
- TString tskName ;
switch (tsk) {
case kNULLTASK:
break ;
case kRAW:
- tskName = "RAW" ;
+ return "RAW" ;
break ;
case kSIM:
- tskName = "SIM" ;
+ return "SIM" ;
break ;
case kREC:
- tskName = "REC" ;
+ return "REC" ;
break ;
case kESD:
- tskName = "ESD" ;
+ return "ESD" ;
break ;
case kANA:
- tskName = "ANA" ;
+ return "ANA" ;
break ;
default:
- tsk = kNULLTASK ;
+ return "" ;
break ;
}
- return tskName.Data() ;
+ return "" ;
}
//_______________________________________________________________
TFile * AliQAv1::GetQAResultFile()
{
// opens the file to store the Quality Assurance Data Checker results
- if (fgQAResultFile )
+ if (fgQAResultFile && fgQAResultFile->IsOpen())
{
- if ( fgQAResultFile->IsOpen() )
- fgQAResultFile->Close();
+ fgQAResultFile->Close();
}
-
+ delete fgQAResultFile;
+ fgQAResultFile=0x0;
+
TString dirName(fgQAResultDirName) ;
if ( dirName.Contains(fgkLabLocalFile))
dirName.ReplaceAll(fgkLabLocalFile, "") ;
opt = "NEW" ;
}
fgQAResultFile = TFile::Open(fileName, opt) ;
- if (!fgQAResultFile ) // something wrong when trying to open the file
- fgQAResultFile = TFile::Open(fileName, "RECREATE");
- return fgQAResultFile ;
+
+ return fgQAResultFile ;
}
//_______________________________________________________________
if ( ! fgQA) {
TFile * f = GetQAResultFile() ;
fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
- //f->Close() ;
+ f->Close() ;
if ( ! fgQA )
fgQA = new AliQAv1() ;
}
void AliQAv1::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
{
// print the QA status in human readable format
- TString text;
- QABIT_t bit = GetQAStatusBit(es, det, tsk) ;
+ const 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())) ;
+ AliInfoClass(Form(" %8s %8s %4s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk))) ;
+ // AliInfoClass(Form(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, GetBitName(bit))) ;
}
}