//____________________________________________________________________________
AliCorrQADataMakerRec::AliCorrQADataMakerRec(AliQADataMaker ** qadm ) :
-AliQADataMakerRec(AliQA::GetDetName(AliQA::kCORR), "Corr Quality Assurance Data Maker"),
+AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kCORR), "Corr Quality Assurance Data Maker"),
fMaxRawVar(0),
fqadm(qadm)
{
{
// dtor only destroy the ntuple
if ( fCorrNt ) {
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if ( fCorrNt[specie] != NULL )
- delete fCorrNt[specie] ;
- }
+// for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+// if ( fCorrNt[specie] != NULL )
+// delete fCorrNt[specie] ;
+// }
delete[] fCorrNt ;
+ fCorrNt = 0x0;
}
}
//____________________________________________________________________________
-void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** /*list*/)
+void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** /*list*/)
{
//Detector specific actions at end of cycle
// do the QA checking
- if (task == AliQA::kRAWS) {
- AliQAChecker::Instance()->Run(AliQA::kCORR, task, fCorrNt) ;
+ if (task == AliQAv1::kRAWS) {
+ AliQAChecker::Instance()->Run(AliQAv1::kCORR, task, fCorrNt) ;
}
}
void AliCorrQADataMakerRec::InitRaws()
{
// createa ntuple taking all the parameters declared by detectors
- if (fCorrNt)
+ if (fCorrNt[AliRecoParam::AConvert(fEventSpecie)])
return ;
delete fRawsQAList ; // not needed for the time being
fRawsQAList = NULL ;
TString varlist("") ;
- for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
+ for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
AliQADataMaker * qadm = fqadm[detIndex] ;
if ( ! qadm )
continue ;
if (list) {
TIter next(list) ;
TParameter<double> * p ;
- while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
+ while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
varlist.Append(p->GetName()) ;
varlist.Append(":") ;
fMaxRawVar++ ;
if (fMaxRawVar == 0) {
AliWarning("NTUPLE not created") ;
} else {
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- char * name = Form("%s_%s", AliQA::GetQACorrName(), AliRecoParam::GetEventSpecieName(specie)) ;
- fCorrNt[specie] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
- }
+ char * name = Form("%s_%s", AliQAv1::GetQACorrName(), AliRecoParam::GetEventSpecieName(fEventSpecie)) ;
+ fCorrNt[AliRecoParam::AConvert(fEventSpecie)] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
}
}
void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
{
//Fill prepared histograms with Raw digit properties
+
+ if ( ! fCorrNt[AliRecoParam::AConvert(fEventSpecie)])
+ InitRaws() ;
+
if ( fMaxRawVar > 0 ) {
const Int_t kSize = fMaxRawVar ;
Double_t *varvalue = new Double_t[kSize] ;
Int_t index = 0 ;
- for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
+ for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
AliQADataMaker * qadm = fqadm[detIndex] ;
if ( ! qadm )
continue ;
TList * list = qadm->GetParameterList() ;
TIter next(list) ;
TParameter<double> * p ;
- while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
+ while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
varvalue[index++] = p->GetVal() ;
}
}
- (dynamic_cast<TNtupleD*>(fCorrNt[(Int_t)TMath::Log2(fEventSpecie)]))->Fill(varvalue);
+ static_cast<TNtupleD*>(fCorrNt[AliRecoParam::AConvert(fEventSpecie)])->Fill(varvalue);
delete [] varvalue;
}
}