void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
{
//fills QA histos for RAW
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
rawReader->Reset();
AliACORDERawStream rawStream(rawReader);
size_t contSingle=0;
if (!branch) {
AliWarning("ACORDE branch in Digits Tree not found");
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
branch->SetAddress(&digits);
for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
branch->GetEntry(track);
{
//fills QA histos for ESD
- AliESDACORDE * fESDACORDE= esd->GetACORDEData();
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
+ AliESDACORDE * fESDACORDE= esd->GetACORDEData();
Int_t *fACORDEMultiMuon =fESDACORDE->GetACORDEMultiMuon();
Int_t *fACORDESingleMuon=fESDACORDE->GetACORDESingleMuon();
if(fACORDEMultiMuon[i]==1)
GetESDsData(1) -> Fill(i);
}
-
-
-
-
}
if (!branch) {
AliWarning("ACORDE branch in Hit Tree not found");
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
branch->SetAddress(&hits);
for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
branch->GetEntry(track);
if (!branch) {
AliWarning("ACORDE branch in Digits Tree not found");
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
branch->SetAddress(&digits);
for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
branch->GetEntry(track);
{
// make QA data from ESDs
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(kESDCaloClusE) )
+ InitESDs() ;
+
Int_t nTot = 0 ;
for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) {
AliESDCaloCluster * clu = esd->GetCaloCluster(index) ;
// look at max vs min of the signal spextra, a la online usage in
// AliCaloCalibPedestal
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(kSigLG) )
+ InitRaws() ;
+
rawReader->Reset() ;
AliCaloRawStream in(rawReader,"EMCAL");
void AliEMCALQADataMakerRec::MakeDigits(TClonesArray * digits)
{
// makes data from Digits
-
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliEMCALDigit * digit ;
AliError("can't get the branch with the EMCAL clusters !");
return;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(kRecPM) )
+ InitRecPoints() ;
+
TObjArray * emcrecpoints = new TObjArray(100) ;
emcbranch->SetAddress(&emcrecpoints);
emcbranch->GetEntry(0);
{
//make QA data from Hits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
GetHitsData(1)->Fill(hits->GetEntriesFast()) ;
TIter next(hits) ;
AliEMCALHit * hit ;
{
// makes data from Digits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliEMCALDigit * digit ;
// makes data from SDigits
//Need a copy of the SDigitizer to calibrate the sdigit amplitude to
//energy in GeV
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
AliEMCALSDigitizer* sDigitizer = new AliEMCALSDigitizer();
GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ;
AliESDFMD* fmd = esd->GetFMDData();
if (!fmd) return;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
for(UShort_t det=1;det<=3;det++) {
for (UShort_t ir = 0; ir < 2; ir++) {
Char_t ring = (ir == 0 ? 'I' : 'O');
AliError("FMD Digit object not found!!") ;
return;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
for(Int_t i=0;i<digits->GetEntriesFast();i++) {
//Raw ADC counts
AliFMDDigit* digit = static_cast<AliFMDDigit*>(digits->At(i));
void AliFMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
{
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
AliFMDRawReader fmdReader(rawReader,0);
TClonesArray* digitsAddress = &fDigitsArray;
void AliFMDQADataMakerRec::MakeRecPoints(TTree* clustersTree)
{
// makes data from RecPoints
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
AliFMDParameters* pars = AliFMDParameters::Instance();
fRecPointsArray.Clear();
TBranch *fmdbranch = clustersTree->GetBranch("FMD");
//_____________________________________________________________________
void AliFMDQADataMakerSim::MakeHits(TClonesArray * hits)
{
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
TIter next(hits);
AliFMDHit * hit;
while ((hit = static_cast<AliFMDHit *>(next())))
// makes data from Digits
if(!digits) return;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
for(Int_t i = 0 ; i < digits->GetEntriesFast() ; i++) {
//Raw ADC counts
AliFMDDigit* digit = static_cast<AliFMDDigit*>(digits->At(i));
// makes data from Digits
if(!sdigits) return;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
for(Int_t i = 0 ; i < sdigits->GetEntriesFast() ; i++) {
//Raw ADC counts
AliFMDSDigit* sdigit = static_cast<AliFMDSDigit*>(sdigits->At(i));
//
// Filling Raws QA histos
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
rawReader->Reset() ;
AliHMPIDRawStream stream(rawReader);
//
//filling QA histos for Digits
//
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
TObjArray *chamber = dynamic_cast<TObjArray*>(data);
if ( !chamber) {
//
//Opening the Digit Tree
//
+
TObjArray *pObjDig=new TObjArray(AliHMPIDParam::kMaxCh+1);
for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){
TClonesArray *pCA=new TClonesArray("AliHMPIDDigit");
//filling QA histos for clusters
//
AliHMPIDParam *pPar =AliHMPIDParam::Instance();
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
static TClonesArray *clusters;
if(!clusters) clusters = new TClonesArray("AliHMPIDCluster");
//fills QA histos for ESD
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
for(Int_t iTrk = 0 ; iTrk < esd->GetNumberOfTracks() ; iTrk++){
AliESDtrack *pTrk = esd->GetTrack(iTrk) ;
GetESDsData(0)->Fill(pTrk->GetP(),pTrk->GetHMPIDsignal());
if(task==AliQAv1::kRAWS) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
for(Int_t iddl=0;iddl<14;iddl++) {
TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events
h->Scale(1./(Float_t)fEvtRaw);
if (!hits){
AliError("Wrong type of hits container") ;
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
TIter next(hits);
AliHMPIDHit * hit ;
while ( (hit = dynamic_cast<AliHMPIDHit *>(next())) ) {
if ( !chamber) {
AliError("Wrong type of digits container") ;
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
for(Int_t i =0; i< chamber->GetEntries(); i++)
{
TClonesArray * digits = dynamic_cast<TClonesArray*>(chamber->At(i));
if (!sdigits) {
AliError("Wrong type of sdigits container") ;
} else {
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
TIter next(sdigits) ;
AliHMPIDDigit * sdigit ;
while ( (sdigit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
{
// Fill QA for RAW
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRaws(rawReader);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRaws(rawReader);
+ return ;
+
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeRaws(rawReader) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSPDDataMaker->MakeRaws(rawReader) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kRAWS, fRawsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
}
void AliITSQADataMakerRec::MakeDigits(TTree * digitsTree)
{
// Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digitsTree);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digitsTree);
+ return ;
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeDigits(digitsTree) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSPDDataMaker->MakeDigits(digitsTree) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kDIGITSR, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digitsTree);
}
//____________________________________________________________________________
void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
{
+ return ;
// Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRecPoints(clustersTree);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRecPoints(clustersTree);
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeRecPoints(clustersTree) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSPDDataMaker->MakeRecPoints(clustersTree) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRecPoints(clustersTree);
}
void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
{
// Make QA data from ESDs
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
const Int_t nESDTracks = esd->GetNumberOfTracks();
Int_t nITSrefit5 = 0;
{
// launch the QA checking
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n");
if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
//____________________________________________________________________________
void AliITSQADataMakerSim::MakeDigits(TClonesArray * digits)
{
- // Fill QA for RAW
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digits);
+ // Fill QA for digits
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeDigits(digits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSDDDataMaker->MakeDigits(digits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits);
}
//____________________________________________________________________________
void AliITSQADataMakerSim::MakeDigits(TTree * digits)
{
- // Fill QA for RAW
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digits);
+ // Fill QA for digits
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeDigits(digits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2){
+ Int_t rv = fSDDDataMaker->MakeDigits(digits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits);
}
void AliITSQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
{
// Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(sdigits);
+ if(fSubDetector == 0 || fSubDetector == 1){
+ Int_t rv = fSPDDataMaker->MakeSDigits(sdigits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSDDDataMaker->MakeSDigits(sdigits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
}
void AliITSQADataMakerSim::MakeSDigits(TTree * sdigits)
{
// Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(sdigits);
+ if(fSubDetector == 0 || fSubDetector == 1){
+ Int_t rv = fSPDDataMaker->MakeSDigits(sdigits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2){
+ Int_t rv = fSDDDataMaker->MakeSDigits(sdigits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
}
//____________________________________________________________________________
void AliITSQADataMakerSim::InitHits()
{
- // Initialization for RECPOINTS
+ // Initialization for hits
if(fSubDetector == 0 || fSubDetector == 1) {
AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitHits\n");
fSPDDataMaker->InitHits();
//____________________________________________________________________________
void AliITSQADataMakerSim::MakeHits(TClonesArray * hits)
{
- // Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(hits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(hits);
+ // Fill QA for hits
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeHits(hits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSDDDataMaker->MakeHits(hits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits);
}
//____________________________________________________________________________
void AliITSQADataMakerSim::MakeHits(TTree * hits)
{
- // Fill QA for recpoints
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(hits);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(hits);
+ // Fill QA for hits
+ if(fSubDetector == 0 || fSubDetector == 1) {
+ Int_t rv = fSPDDataMaker->MakeHits(hits) ;
+ if ( rv != 0 )
+ fSDDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+ if(fSubDetector == 0 || fSubDetector == 2) {
+ Int_t rv = fSDDDataMaker->MakeHits(hits) ;
+ if ( rv != 0 )
+ fSSDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries());
+ }
+
if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits);
}
//_________________________________________________________________
-
Int_t AliITSQADataMakerSim::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t task)
{
switch(subdet)
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::InitRaws()
+Int_t AliITSQASDDDataMakerRec::InitRaws()
{
// Initialization for RAW data - SDD -
const Bool_t expert = kTRUE ;
const Bool_t saveCorr = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+ //fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");
Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
if(!ddlMapSDD)
{
AliError("Calibration object retrieval failed! SDD will not be processed");
fDDLModuleMap = NULL;
- return;
+ return rv;
}
fDDLModuleMap = (AliITSDDLModuleMapSDD*)ddlMapSDD->GetObject();
if(!cacheStatus)ddlMapSDD->SetObject(NULL);
if(!hltforSDD){
AliError("Calibration object retrieval failed! SDD will not be processed");
fHLTSDD=NULL;
- return;
+ return rv;
}
fHLTSDD = (AliITSHLTforSDD*)hltforSDD->GetObject();
if(!cacheStatus)hltforSDD->SetObject(NULL);
TH1D *h0 = new TH1D("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5); //0
h0->GetXaxis()->SetTitle("Module Number");
h0->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fGenRawsOffset, expert, !image, !saveCorr);
delete h0;
fSDDhRawsTask++;
TH2D *hphil3 = new TH2D("SDDphizL3","SDD #varphiz Layer3 ",6,0.5,6.5,14,0.5,14.5);
hphil3->GetXaxis()->SetTitle("z[#Module L3 ]");
hphil3->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil3)),1+fGenRawsOffset, !expert, image, saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil3)),1+fGenRawsOffset, !expert, image, saveCorr);
delete hphil3;
fSDDhRawsTask++;
TH2D *hphil4 = new TH2D("SDDphizL4","SDD #varphiz Layer4 ",8,0.5,8.5,22,0.5,22.5);
hphil4->GetXaxis()->SetTitle("z[#Module L4]");
hphil4->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil4)),2+fGenRawsOffset, !expert, image, saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil4)),2+fGenRawsOffset, !expert, image, saveCorr);
delete hphil4;
fSDDhRawsTask++;
TH2D *hddl = new TH2D("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,23.5,24,-0.5,23.5);
hddl->GetXaxis()->SetTitle("Channel");
hddl->GetYaxis()->SetTitle("#DDL");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hddl)),3+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hddl)),3+fGenRawsOffset, expert, !image, !saveCorr);
delete hddl;
fSDDhRawsTask++;
Int_t indexlast1 = 0;
TProfile2D *fModuleChargeMapFSE = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");
fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");
- fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
delete fModuleChargeMapFSE;
fSDDhRawsTask++;
TProfile2D *fModuleChargeMap = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");
fModuleChargeMap->GetYaxis()->SetTitle("Anode");
- fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
delete fModuleChargeMap;
fSDDhRawsTask++;
} // kONLINE
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Raws histograms booked\n",fSDDhRawsTask));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
+Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
{
// Fill QA for RAW - SDD -
+ Int_t rv = 0 ;
+
if(!fDDLModuleMap){
AliError("SDD DDL module map not available - skipping SDD QA");
- return;
+ return rv;
}
- if(rawReader->GetType() != 7) return; // skips non physical triggers
+ if(rawReader->GetType() != 7) return rv; // skips non physical triggers
AliDebug(AliQAv1::GetQADebugLevel(),"entering MakeRaws\n");
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) )
+ rv = InitRaws () ;
+
rawReader->Reset();
AliITSRawStream *stream;
AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",cnt));
delete stream;
stream = NULL;
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::InitDigits()
+Int_t AliITSQASDDDataMakerRec::InitDigits()
{
//printf(" ======================================================> Init digits\n " );
// Initialization for DIGIT data - SDD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List
TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5); //hmod
h0->GetXaxis()->SetTitle("SDD Module Number");
h0->GetYaxis()->SetTitle("# DIGITS");
- fAliITSQADataMakerRec->Add2DigitsList(h0,fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(h0,fGenDigitsOffset, !expert, image);
fSDDhDigitsTask ++;
TH1F* h1=new TH1F("SDD Anode Distribution","DIGITS Anode Distribution",512,-0.5,511.5); //hanocc
h1->GetXaxis()->SetTitle("Anode Number");
h1->GetYaxis()->SetTitle("# DIGITS");
- fAliITSQADataMakerRec->Add2DigitsList(h1,1+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(h1,1+fGenDigitsOffset, !expert, image);
fSDDhDigitsTask ++;
TH1F* h2=new TH1F("SDD Tbin Distribution","DIGITS Tbin Distribution",256,-0.5,255.5); //htbocc
h2->GetXaxis()->SetTitle("Tbin Number");
h2->GetYaxis()->SetTitle("# DIGITS");
- fAliITSQADataMakerRec->Add2DigitsList(h2,2+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(h2,2+fGenDigitsOffset, !expert, image);
fSDDhDigitsTask ++;
TH1F* h3=new TH1F("SDD ADC Counts Distribution","DIGITS ADC Counts Distribution",200,0.,1024.); //hsig
h3->GetXaxis()->SetTitle("ADC Value");
h3->GetYaxis()->SetTitle("# DIGITS");
- fAliITSQADataMakerRec->Add2DigitsList(h3,3+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(h3,3+fGenDigitsOffset, !expert, image);
fSDDhDigitsTask ++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Digits histograms booked\n",fSDDhDigitsTask));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
+Int_t AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
{
//printf(" ======================================================> make digits\n " );
// Fill QA for DIGIT - SDD -
//TClonesArray *iITSdigits = fITS->DigitsAddress(1);
+ Int_t rv = 0 ;
+
TBranch *branchD = digits->GetBranch("ITSDigitsSDD");
if (!branchD) {
AliError("can't get the branch with the ITS SDD digits !");
- return;
+ return rv ;
}
-
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) )
+ rv = InitDigits() ;
+
static TClonesArray statDigits("AliITSdigitSDD");
TClonesArray *iITSdigits = &statDigits;
branchD->SetAddress(&iITSdigits);
fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset)->Fill(sig);
}
}
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::InitRecPoints()
+Int_t AliITSQASDDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SDD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
Int_t nOnline=1;
Int_t nOnline2=1;
TH1F *h0 = new TH1F("SDDLay3TotCh","Layer 3 total charge",1000/nOnline,-0.5, 499.5); //position number 0
h0->GetXaxis()->SetTitle("ADC value");
h0->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fGenRecPointsOffset, !expert, image);
delete h0;
fSDDhRecPointsTask++;
TH1F *h1 = new TH1F("SDDLay4TotCh","Layer 4 total charge",1000/nOnline,-0.5, 499.5);//position number 1
h1->GetXaxis()->SetTitle("ADC value");
h1->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fGenRecPointsOffset, !expert, image);
delete h1;
fSDDhRecPointsTask++;
TH2F *h2 = new TH2F("SDDGlobalCoordDistribYX","YX Global Coord Distrib",5600/nOnline2,-28,28,5600/nOnline2,-28,28);//position number 2
h2->GetYaxis()->SetTitle("Y[cm]");
h2->GetXaxis()->SetTitle("X[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h2)),2+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h2)),2+fGenRecPointsOffset, expert, !image);
delete h2;
fSDDhRecPointsTask++;
TH2F *h3 = new TH2F("SDDGlobalCoordDistribRZ","RZ Global Coord Distrib",6400/nOnline3,-32,32,1400/nOnline4,12,26);//position number 3
h3->GetYaxis()->SetTitle("R[cm]");
h3->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h3)),3+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h3)),3+fGenRecPointsOffset, expert, !image);
delete h3;
fSDDhRecPointsTask++;
TH2F *h4 = new TH2F("SDDGlobalCoordDistribL3PHIZ","#varphi Z Global Coord Distrib L3",6400/nOnline3,-32,32,360/nOnline,-TMath::Pi(),TMath::Pi());//position number 4
h4->GetYaxis()->SetTitle("#phi[rad]");
h4->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h4)),4+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h4)),4+fGenRecPointsOffset, !expert, image);
delete h4;
fSDDhRecPointsTask++;
TH2F *h5 = new TH2F("SDDGlobalCoordDistribL4PHIZ","#varphi Z Global Coord Distrib L4",6400/nOnline3,-32,32,360/nOnline,-TMath::Pi(),TMath::Pi());//position number 5
h5->GetYaxis()->SetTitle("#phi[rad]");
h5->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h5)),5+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h5)),5+fGenRecPointsOffset, !expert, image);
delete h5;
fSDDhRecPointsTask++;
TH1F *h6 = new TH1F("SDDModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); //position number 6
h6->GetXaxis()->SetTitle("Module number"); //spd offset = 240
h6->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),6 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),6 +fGenRecPointsOffset, expert, !image);
delete h6;
fSDDhRecPointsTask++;
TH1F *h7 = new TH1F("SDDLadPatternL3RP","Ladder pattern L3 RP",14,0.5,14.5); //position number 7
h7->GetXaxis()->SetTitle("Ladder #, Layer 3");
h7->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h7)),7 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h7)),7 +fGenRecPointsOffset, expert, !image);
delete h7;
fSDDhRecPointsTask++;
TH1F *h8 = new TH1F("SDDLadPatternL4RP","Ladder pattern L4 RP",22,0.5,22.5); //position number 8
h8->GetXaxis()->SetTitle("Ladder #, Layer 4");
h8->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h8)),8 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h8)),8 +fGenRecPointsOffset, expert, !image);
delete h8;
fSDDhRecPointsTask++;
TH2F *h9 = new TH2F("SDDLocalCoordDistrib","Local Coord Distrib",1000/nOnline,-4,4,1000/nOnline,-4,4);//position number 9
h9->GetXaxis()->SetTitle("X local coord, drift, cm");
h9->GetYaxis()->SetTitle("Z local coord, anode, cm");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h9)),9 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h9)),9 +fGenRecPointsOffset, expert, !image);
delete h9;
fSDDhRecPointsTask++;
h10->GetXaxis()->SetTitle("r[cm]");
h10->GetXaxis()->CenterTitle();
h10->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),10 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),10 +fGenRecPointsOffset, expert, !image);
delete h10;
fSDDhRecPointsTask++;
h11->GetXaxis()->SetTitle("r[cm]");
h11->GetXaxis()->CenterTitle();
h11->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h11)),11 +fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h11)),11 +fGenRecPointsOffset, expert, !image);
delete h11;
fSDDhRecPointsTask++;
h12->GetXaxis()->SetTitle("#varphi[rad]");
h12->GetXaxis()->CenterTitle();
h12->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h12)),iLay+12+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h12)),iLay+12+fGenRecPointsOffset, expert, !image);
delete h12;
fSDDhRecPointsTask++;
}
TH2F *h14 = new TH2F("SDDGlobalCoordDistribYXFSE","YX Global Coord Distrib FSE",5600/nOnline2,-28,28,5600/nOnline2,-28,28);//position number 14
h14->GetYaxis()->SetTitle("Y[cm]");
h14->GetXaxis()->SetTitle("X[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h14)),14+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h14)),14+fGenRecPointsOffset, expert, !image);
delete h14;
fSDDhRecPointsTask++;
TH2F *h15 = new TH2F("SDDGlobalCoordDistribRZFSE","RZ Global Coord Distrib FSE",Int_t(6400/nOnline3),-32,32,1400/nOnline4,12,26);//position number 15
h15->GetYaxis()->SetTitle("R[cm]");
h15->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h15)),15+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h15)),15+fGenRecPointsOffset, expert, !image);
delete h15;
fSDDhRecPointsTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Recs histograms booked\n",fSDDhRecPointsTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
+Int_t AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
{
-
-
// Fill QA for RecPoints - SDD -
+ Int_t rv = 0 ;
Int_t lay, lad, det;
TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
if (!branchRecP) {
AliError("can't get the branch with the ITS clusters !");
- return;
+ return rv ;
}
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) )
+ rv = InitRecPoints() ;
static TClonesArray statRecpoints("AliITSRecPoint") ;
TClonesArray *recpoints = &statRecpoints;
}
}
statRecpoints.Clear();
-
+ return rv ;
}
//_______________________________________________________________
{
offset=fGenRawsOffset;
}
- else
- if( task == AliQAv1::kRECPOINTS )
- {
- offset=fGenRecPointsOffset;
- }
- else
- if(task == AliQAv1::kDIGITSR )
- {
- offset=fGenDigitsOffset;
- }
+ else if(task == AliQAv1::kDIGITSR )
+ {
+ offset=fGenDigitsOffset;
+ }
+ else if( task == AliQAv1::kRECPOINTS )
+ {
+ offset=fGenRecPointsOffset;
+ }
else AliInfo("No task has been selected. Offset set to zero.\n");
return offset;
}
//_______________________________________________________________
+void AliITSQASDDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset) {
+ // Returns offset number according to the specified task
+ if( task == AliQAv1::kRAWS ) {
+ fGenRawsOffset=offset;
+ }
+ else if( task == AliQAv1::kDIGITSR ) {
+ fGenDigitsOffset=offset;
+ }
+ else if( task == AliQAv1::kRECPOINTS ) {
+ fGenRecPointsOffset=offset;
+ }
+ else {
+ AliInfo("No task has been selected. Offset set to zero.\n");
+ }
+}
+
+//_______________________________________________________________
+
Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task)
{
{
histotot=fSDDhRawsTask ;
}
- else
- if( task == AliQAv1::kRECPOINTS )
- {
- histotot=fSDDhRecPointsTask;
- }
- else
- if(task == AliQAv1::kDIGITSR)
- {
- histotot=fSDDhDigitsTask;
- }
- else AliInfo("No task has been selected. TaskHisto set to zero.\n");
+ else if(task == AliQAv1::kDIGITSR)
+ {
+ histotot=fSDDhDigitsTask;
+ }
+ else if( task == AliQAv1::kRECPOINTS )
+ {
+ histotot=fSDDhRecPointsTask;
+ }
+ else AliInfo("No task has been selected. TaskHisto set to zero.\n");
return histotot;
}
AliITSQASDDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode = kFALSE, Short_t ldc = 0);
AliITSQASDDDataMakerRec(const AliITSQASDDDataMakerRec& qadm);
AliITSQASDDDataMakerRec& operator = (const AliITSQASDDDataMakerRec& qac);
- virtual void InitRaws();
- virtual void InitDigits();
- virtual void InitRecPoints();
- virtual void MakeRaws(AliRawReader *rawReader);
- virtual void MakeDigits(TClonesArray* /*digits*/) {return;}
- virtual void MakeDigits(TTree *clustersTree);
- virtual void MakeRecPoints(TTree *clustersTree);
+ virtual Int_t InitRaws();
+ virtual Int_t InitDigits();
+ virtual Int_t InitRecPoints();
+ virtual Int_t MakeRaws(AliRawReader *rawReader);
+ virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;}
+ virtual Int_t MakeDigits(TTree *clustersTree);
+ virtual Int_t MakeRecPoints(TTree *clustersTree);
virtual void StartOfDetectorCycle();
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
virtual ~AliITSQASDDDataMakerRec(); // dtor
Int_t GetOffset(AliQAv1::TASKINDEX_t task);
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
void SetHLTMode(Bool_t khltmode=kFALSE){fHLTMode=khltmode;};
}\r
\r
//____________________________________________________________________________ \r
-void AliITSQASDDDataMakerSim::InitDigits()\r
+Int_t AliITSQASDDDataMakerSim::InitDigits()\r
{ \r
// Initialization for DIGIT data - SDD - \r
const Bool_t expert = kTRUE ; \r
const Bool_t image = kTRUE ;\r
- \r
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
+ Int_t rv = 0 ; \r
+ //fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5); //hmod\r
h0->GetXaxis()->SetTitle("SDD Module Number");\r
h0->GetYaxis()->SetTitle("# DIGITS");\r
- fAliITSQADataMakerSim->Add2DigitsList(h0,fGenOffsetD, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2DigitsList(h0,fGenOffsetD, !expert, image);\r
fSDDhDTask ++;\r
TH1F* h1=new TH1F("SDD Anode Distribution","SDD DIGITS Anode Distribution",512,-0.5,511.5); //hanocc\r
h1->GetXaxis()->SetTitle("Anode Number");\r
h1->GetYaxis()->SetTitle("# DIGITS");\r
- fAliITSQADataMakerSim->Add2DigitsList(h1,1+fGenOffsetD, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2DigitsList(h1,1+fGenOffsetD, !expert, image);\r
fSDDhDTask ++;\r
TH1F* h2=new TH1F("SDD Tbin Distribution","SDD DIGITS Tbin Distribution",256,-0.5,255.5); //htbocc\r
h2->GetXaxis()->SetTitle("Tbin Number");\r
h2->GetYaxis()->SetTitle("# DIGITS");\r
- fAliITSQADataMakerSim->Add2DigitsList(h2,2+fGenOffsetD, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2DigitsList(h2,2+fGenOffsetD, !expert, image);\r
fSDDhDTask ++;\r
TH1F* h3=new TH1F("SDD ADC Counts Distribution","SDD DIGITS ADC Counts Distribution",200,0.,1024.); //hsig\r
h3->GetXaxis()->SetTitle("ADC Value");\r
h3->GetYaxis()->SetTitle("# DIGITS");\r
- fAliITSQADataMakerSim->Add2DigitsList(h3,3+fGenOffsetD, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2DigitsList(h3,3+fGenOffsetD, !expert, image);\r
fSDDhDTask ++;\r
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Digits histograms booked\n",fSDDhDTask));\r
+ return rv ; \r
}\r
\r
//____________________________________________________________________________\r
-void AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)\r
+Int_t AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)\r
{ \r
\r
// Fill QA for DIGIT - SDD -\r
+ Int_t rv = 0 ; \r
+ // Check id histograms already created for this Event Specie\r
+ if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) )\r
+ rv = InitDigits() ;\r
+ \r
AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");\r
fITS->SetTreeAddress();\r
TClonesArray *iITSdigits = fITS->DigitsAddress(1);\r
fAliITSQADataMakerSim->GetDigitsData(3+fGenOffsetD)->Fill(sig);\r
}\r
}\r
+ return rv ; \r
}\r
\r
//____________________________________________________________________________ \r
-void AliITSQASDDDataMakerSim::InitSDigits()\r
+Int_t AliITSQASDDDataMakerSim::InitSDigits()\r
{ \r
// Initialization for SDIGIT data - SDD -\r
const Bool_t expert = kTRUE ; \r
const Bool_t image = kTRUE ;\r
- \r
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
+ Int_t rv = 0 ; \r
+ //fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
TH1F* h0=new TH1F("SDD SDIGITS Module Pattern","SDIGITS SDD Module Pattern",260,239.5,499.5); //hmod\r
h0->GetXaxis()->SetTitle("SDD Module Number");\r
h0->GetYaxis()->SetTitle("# SDIGITS");\r
- fAliITSQADataMakerSim->Add2SDigitsList(h0,fGenOffsetS, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(h0,fGenOffsetS, !expert, image);\r
fSDDhSTask ++;\r
TH1F* h1=new TH1F("SDD Anode Distribution","SDIGITS SDD Anode Distribution",512,-0.5,511.5); //hanocc\r
h1->GetXaxis()->SetTitle("Anode Number");\r
h1->GetYaxis()->SetTitle("# SDIGITS");\r
- fAliITSQADataMakerSim->Add2SDigitsList(h1,1+fGenOffsetS, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(h1,1+fGenOffsetS, !expert, image);\r
fSDDhSTask ++;\r
TH1F* h2=new TH1F("SDD Tbin Distribution","SDIGITS SDD Tbin Distribution",256,-0.5,255.5); //htbocc\r
h2->GetXaxis()->SetTitle("Tbin Number");\r
h2->GetYaxis()->SetTitle("# SDIGITS");\r
- fAliITSQADataMakerSim->Add2SDigitsList(h2,2+fGenOffsetS);\r
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(h2,2+fGenOffsetS);\r
fSDDhSTask ++;\r
TH1F* h3=new TH1F("SDD ADC Counts Distribution","SDIGITS SDD ADC Counts Distribution",200,0.,1024.); //hsig\r
h3->GetXaxis()->SetTitle("ADC Value");\r
h3->GetYaxis()->SetTitle("# SDIGITS");\r
- fAliITSQADataMakerSim->Add2SDigitsList(h3,3+fGenOffsetS, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(h3,3+fGenOffsetS, !expert, image);\r
fSDDhSTask ++;\r
\r
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD SDigits histograms booked\n",fSDDhSTask));\r
+ return rv ; \r
}\r
\r
//____________________________________________________________________________\r
-void AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)\r
+Int_t AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)\r
{ \r
// Fill QA for SDIGIT - SDD -\r
-\r
- AliITSsegmentationSDD* seg = new AliITSsegmentationSDD();\r
+ Int_t rv = 0 ; \r
+ // Check id histograms already created for this Event Specie\r
+ if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) )\r
+ rv = InitSDigits() ;\r
+ \r
+ AliITSsegmentationSDD* seg = new AliITSsegmentationSDD();\r
Int_t nan=seg->Npz();\r
Int_t ntb=seg->Npx();\r
Int_t scaleSize=4;\r
}\r
delete sdig;\r
}\r
+ return rv ; \r
}\r
\r
//____________________________________________________________________________ \r
-void AliITSQASDDDataMakerSim::InitHits()\r
+Int_t AliITSQASDDDataMakerSim::InitHits()\r
{ \r
\r
// Initialization for HITS data - SDD -\r
const Bool_t expert = kTRUE ; \r
const Bool_t image = kTRUE ;\r
- \r
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();\r
+ Int_t rv = 0 ; \r
+\r
+ //fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
//printf("AliITSQASDDDataMakerSim::InitHits called \n");\r
TH1F *h0=new TH1F("SDD HITS Module Pattern","SDD HITS Module Pattern",260,239.5,499.5); \r
h0->GetXaxis()->SetTitle("SDD Module Number");\r
h0->GetYaxis()->SetTitle("# HITS");\r
- fAliITSQADataMakerSim->Add2HitsList(h0,fGenOffsetH, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2HitsList(h0,fGenOffsetH, !expert, image);\r
fSDDhHTask ++;\r
TH1F *h1=new TH1F("SDD HIT lenght along local Y Coord","SDD HIT lenght along local Y Coord",200,0.,350.);\r
h1->GetXaxis()->SetTitle("HIT lenght (um)");\r
h1->GetYaxis()->SetTitle("# HITS");\r
- fAliITSQADataMakerSim->Add2HitsList(h1,1+fGenOffsetH, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2HitsList(h1,1+fGenOffsetH, !expert, image);\r
fSDDhHTask ++;\r
TH1F *h2=new TH1F("SDD HIT lenght along local Y Coord - Zoom","SDD HIT lenght along local Y Coord - Zoom",200,250.,350.);\r
h2->GetXaxis()->SetTitle("HIT lenght (um)");\r
h2->GetYaxis()->SetTitle("# HITS");\r
- fAliITSQADataMakerSim->Add2HitsList(h2,2+fGenOffsetH, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2HitsList(h2,2+fGenOffsetH, !expert, image);\r
fSDDhHTask ++;\r
TH1F *h3=new TH1F("SDD Deposited Energy Distribution (loc Y > 200um)","SDD HITS Deposited Energy Distribution (loc Y > 200um)",200,0.,350.);\r
h3->GetXaxis()->SetTitle("ADC counts ");\r
h3->GetYaxis()->SetTitle("# HITS");\r
- fAliITSQADataMakerSim->Add2HitsList(h3,3+fGenOffsetH, !expert, image);\r
+ rv = fAliITSQADataMakerSim->Add2HitsList(h3,3+fGenOffsetH, !expert, image);\r
fSDDhHTask ++;\r
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Hits histograms booked\n",fSDDhHTask));\r
+ return rv ; \r
}\r
\r
//____________________________________________________________________________\r
-void AliITSQASDDDataMakerSim::MakeHits(TTree * hits)\r
+Int_t AliITSQASDDDataMakerSim::MakeHits(TTree * hits)\r
{ \r
// Fill QA for HITS - SDD -\r
-\r
- AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");\r
+ Int_t rv = 0 ; \r
+ // Check id histograms already created for this Event Specie\r
+ if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) )\r
+ rv = InitHits() ;\r
+ \r
+ AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");\r
fITS->SetTreeAddress();\r
Int_t nmodules;\r
if(!(fITS->InitModules(-1,nmodules))){\r
AliError("ITS geometry not available - nothing done");\r
- return;\r
+ return rv;\r
}\r
\r
fITS->FillModules(hits,0);\r
fAliITSQADataMakerSim->GetHitsData(1+fGenOffsetH)->Fill(dyloc);\r
Float_t edep=hit->GetIonization()*1000000;\r
if(dyloc>200.){ \r
- fAliITSQADataMakerSim->GetHitsData(2+fGenOffsetH)->Fill(edep);\r
- fAliITSQADataMakerSim->GetHitsData(3+fGenOffsetH)->Fill(dyloc);\r
+ fAliITSQADataMakerSim->GetHitsData(2+fGenOffsetH)->Fill(edep);\r
+ fAliITSQADataMakerSim->GetHitsData(3+fGenOffsetH)->Fill(dyloc);\r
}\r
}\r
}\r
+ return rv ; \r
}\r
\r
//_______________________________________________________________\r
return offset;\r
}\r
\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset){\r
+ // Returns histogram offset according to the specified task\r
+ if( task == AliQAv1::kHITS){\r
+ fGenOffsetH = offset; \r
+ }\r
+ else if( task == AliQAv1::kSDIGITS) {\r
+ fGenOffsetS = offset; \r
+ }\r
+ else if( task == AliQAv1::kDIGITS) {\r
+ fGenOffsetD = offset; \r
+ }\r
+ else {\r
+ AliInfo("No task has been selected. TaskHisto set to zero.\n");\r
+ }\r
+}\r
\r
//_______________________________________________________________\r
\r
virtual void StartOfDetectorCycle();\r
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);\r
virtual ~AliITSQASDDDataMakerSim() {;} // dtor\r
- virtual void InitDigits();\r
- virtual void InitSDigits();\r
- virtual void InitHits();\r
- virtual void MakeDigits(TClonesArray * /*digits*/){;}\r
- virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}\r
- virtual void MakeHits(TClonesArray * /*hits*/){;}\r
- virtual void MakeDigits(TTree * digits);\r
- virtual void MakeSDigits(TTree * sdigits);\r
- virtual void MakeHits(TTree * hits);\r
+ virtual Int_t InitDigits();\r
+ virtual Int_t InitSDigits();\r
+ virtual Int_t InitHits();\r
+ virtual Int_t MakeDigits(TClonesArray * /*digits*/){;}\r
+ virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){;}\r
+ virtual Int_t MakeHits(TClonesArray * /*hits*/){;}\r
+ virtual Int_t MakeDigits(TTree * digits);\r
+ virtual Int_t MakeSDigits(TTree * sdigits);\r
+ virtual Int_t MakeHits(TTree * hits);\r
Int_t GetOffset(AliQAv1::TASKINDEX_t task);\r
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);\r
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);\r
\r
private:\r
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::InitRaws()
+Int_t AliITSQASPDDataMakerRec::InitRaws()
{
// Initialization for RAW data - SPD -
const Bool_t expert = kTRUE ;
const Bool_t saveCorr = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
fAdvLogger = new AliITSRawStreamSPDErrorLog();
AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SPD\n ");
TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RawsList(hlayer, 0+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(hlayer, 0+fGenRawsOffset, expert, !image, !saveCorr);
fSPDhRawsTask++;
TH1F **hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+fGenRawsOffset, !expert, image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+fGenRawsOffset, !expert, image, !saveCorr);
fSPDhRawsTask++;
}
for (Int_t iDDL=0; iDDL<20; iDDL++) {
hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256);
hhitMap[iDDL]->GetXaxis()->SetTitle("Column");
hhitMap[iDDL]->GetYaxis()->SetTitle("Row");
- fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 3+(2*iDDL)+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 3+(2*iDDL)+fGenRawsOffset, expert, !image, !saveCorr);
fSPDhRawsTask++;
sprintf(name,"SPDErrors_SPD_DDL%d",iDDL+1);
sprintf(title,"Error codes - SPD DDL %d",iDDL+1);
herrors[iDDL] = new TH1F (name,title,fAdvLogger->GetNrErrorCodes(),0,fAdvLogger->GetNrErrorCodes());
herrors[iDDL]->SetXTitle("Error Code");
herrors[iDDL]->SetYTitle("Nr of errors");
- fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], 4+(2*iDDL)+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], 4+(2*iDDL)+fGenRawsOffset, expert, !image, !saveCorr);
fSPDhRawsTask++;
}
hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.);
hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity");
hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 43+iLay+fGenRawsOffset, expert, !image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 43+iLay+fGenRawsOffset, expert, !image, !saveCorr);
fSPDhRawsTask++;
}
= new TH2F("SPDHitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)");
hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)");
- fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 45+fGenRawsOffset, !expert, image, !saveCorr);
+ rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 45+fGenRawsOffset, !expert, image, !saveCorr);
fSPDhRawsTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Raws histograms booked\n",fSPDhRawsTask));
+ return rv ;
}
-
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
+Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
{
// Fill QA for RAW - SPD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) )
+ rv = InitRaws() ;
+
rawReader->Reset();
AliITSRawStreamSPD *rawStreamSPD = new AliITSRawStreamSPD(rawReader);
rawStreamSPD->ActivateAdvancedErrorLog(kTRUE,fAdvLogger);
delete rawStreamSPD;
AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::InitDigits()
+Int_t AliITSQASPDDataMakerRec::InitDigits()
{
// Initialization for DIGIT data - SPD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//fSPDhDigitsTask must be incremented by one unit every time a histogram is ADDED to the QA List
Char_t name[50];
TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2DigitsList(hlayer,fGenDigitsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hlayer,fGenDigitsOffset, expert, !image);
fSPDhDigitsTask++;
TH1F **hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,240,0,240);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2DigitsList(hmod[iLay],1+iLay+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hmod[iLay],1+iLay+fGenDigitsOffset, !expert, image);
fSPDhDigitsTask++;
}
TH1F *hcolumns = new TH1F("SPDColumns_SPD","Columns - SPD",160,0.,160.);
hcolumns->GetXaxis()->SetTitle("Column number");
hcolumns->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2DigitsList(hcolumns,3+fGenDigitsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hcolumns,3+fGenDigitsOffset, expert, !image);
fSPDhDigitsTask++;
TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.);
hrows->GetXaxis()->SetTitle("Row number");
hrows->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2DigitsList(hrows,4+fGenDigitsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hrows,4+fGenDigitsOffset, expert, !image);
fSPDhDigitsTask++;
TH1F** hMultSPDdigits = new TH1F*[2];
hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.);
hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity");
hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenDigitsOffset, !expert, image);
fSPDhDigitsTask++;
}
= new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)");
hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)");
- fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenDigitsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenDigitsOffset, !expert, image);
fSPDhDigitsTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDigitsTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::MakeDigits(TTree *digits)
+Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits)
{
// Fill QA for DIGIT - SPD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) )
+ rv = InitDigits() ;
+
// AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
// fITS->SetTreeAddress();
// TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD
TBranch *branchD = digits->GetBranch("ITSDigitsSPD");
if (!branchD) {
AliError("can't get the branch with the SPD ITS digits !");
- return;
+ return rv;
}
static TClonesArray statDigits("AliITSdigitSPD");
TClonesArray *iITSdigits = &statDigits;
fAliITSQADataMakerRec->GetDigitsData(5+fGenDigitsOffset)->Fill(nDigitsL1);
fAliITSQADataMakerRec->GetDigitsData(6+fGenDigitsOffset)->Fill(nDigitsL2);
fAliITSQADataMakerRec->GetDigitsData(7+fGenDigitsOffset)->Fill(nDigitsL1,nDigitsL2);
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::InitRecPoints()
+Int_t AliITSQASPDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SPD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
TH1F** hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDxLoc_SPD%d",iLay+1);
hxl[iLay]=new TH1F(name,title,100,-4.,4.);
hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]");
hxl[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDzLoc_SPD%d",iLay+1);
hzl[iLay]=new TH1F(name,title,100,-4.,4.);
hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]");
hzl[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDxGlob_SPD%d",iLay+1);
hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]");
hxg[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDyGlob_SPD%d",iLay+1);
hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]");
hyg[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDzGlob_SPD%d",iLay+1);
hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]);
hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]");
hzg[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDr_SPD%d",iLay+1);
hr[iLay]=new TH1F(name,title,100,0.,10.);
hr[iLay]->GetXaxis()->SetTitle("r [cm]");
hr[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDphi_SPD%d",iLay+1);
hphi[iLay]=new TH1F(name,title,1000,0.,2*TMath::Pi());
hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]");
hphi[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDSizeYvsZ_SPD%d",iLay+1);
hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.);
hNyNz[iLay]->GetXaxis()->SetTitle("z length");
hNyNz[iLay]->GetYaxis()->SetTitle("y length");
- fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(10*iLay)+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(10*iLay)+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
sprintf(name,"SPDphi_z_SPD%d",iLay+1);
hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],200,0.,2*TMath::Pi());
hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]");
hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
- fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 10+(10*iLay)+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 10+(10*iLay)+fGenRecPointsOffset, !expert, image);
fSPDhRecPointsTask++;
}
TH2F *hrPhi=new TH2F("SPDr_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi());
hrPhi->GetXaxis()->SetTitle("r [cm]");
hrPhi->GetYaxis()->SetTitle("#varphi [rad]");
- fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 21+fGenRecPointsOffset, expert, !image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 21+fGenRecPointsOffset, expert, !image);
fSPDhRecPointsTask++;
TH2F *hxy=new TH2F("SPDx_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.);
hxy->GetXaxis()->SetTitle("Global x [cm]");
hxy->GetYaxis()->SetTitle("Global y [cm]");
- fAliITSQADataMakerRec->Add2RecPointsList(hxy, 22+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hxy, 22+fGenRecPointsOffset, !expert, image);
fSPDhRecPointsTask++;
for (Int_t iLay=0;iLay<2;iLay++) {
hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.);
hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity");
hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 23+iLay+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 23+iLay+fGenRecPointsOffset, !expert, image);
fSPDhRecPointsTask++;
}
new TH2F("SPDMultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)");
hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)");
- fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 25+fGenRecPointsOffset, !expert, image);
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 25+fGenRecPointsOffset, !expert, image);
fSPDhRecPointsTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Recs histograms booked\n",fSPDhRecPointsTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
+Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
{
// Fill QA for RecPoints - SPD -
+ Int_t rv = 0 ;
static TClonesArray statITSCluster("AliITSRecPoint");
TClonesArray *ITSCluster = &statITSCluster;
TBranch* itsClusterBranch=clusterTree->GetBranch("ITSRecPoints");
if (!itsClusterBranch) {
AliError("can't get the branch with the ITS clusters !");
- return;
+ return rv;
}
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) )
+ rv = InitRecPoints() ;
+
itsClusterBranch->SetAddress(&ITSCluster);
Int_t nItsMods = (Int_t)clusterTree->GetEntries();
fAliITSQADataMakerRec->GetRecPointsData(25 +fGenRecPointsOffset)->Fill(nClusters[0],nClusters[1]);
statITSCluster.Clear();
+ return rv ;
}
if( task == AliQAv1::kRAWS ) {
offset=fGenRawsOffset;
}
+ else if( task == AliQAv1::kDIGITSR ) {
+ offset=fGenDigitsOffset;
+ }
else if( task == AliQAv1::kRECPOINTS ) {
offset=fGenRecPointsOffset;
}
//_______________________________________________________________
+void AliITSQASPDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset) {
+ // Returns offset number according to the specified task
+ if( task == AliQAv1::kRAWS ) {
+ fGenRawsOffset=offset;
+ }
+ else if( task == AliQAv1::kDIGITSR ) {
+ fGenDigitsOffset=offset;
+ }
+ else if( task == AliQAv1::kRECPOINTS ) {
+ fGenRecPointsOffset=offset;
+ }
+ else {
+ AliInfo("No task has been selected. Offset set to zero.\n");
+ }
+}
+
+//_______________________________________________________________
+
Int_t AliITSQASPDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
// Returns the number of histograms associated to the specified task
+
Int_t histotot=0;
if( task == AliQAv1::kRAWS ) {
histotot=fSPDhRawsTask;
}
+ else if( task == AliQAv1::kDIGITSR ) {
+ histotot=fSPDhDigitsTask;
+ }
else if( task == AliQAv1::kRECPOINTS ){
histotot=fSPDhRecPointsTask;
}
else {
AliInfo("No task has been selected. TaskHisto set to zero.\n");
}
-
- return histotot;
}
AliITSRawStreamSPDErrorLog *aliITSRawStreamSPDErrorLog = NULL); //ctor
AliITSQASPDDataMakerRec(const AliITSQASPDDataMakerRec& qadm);
AliITSQASPDDataMakerRec& operator = (const AliITSQASPDDataMakerRec& qac);
- virtual void InitRaws();
- virtual void InitDigits();
- virtual void InitRecPoints();
- virtual void MakeRaws(AliRawReader *rawReader);
- virtual void MakeRecPoints(TTree *clustersTree);
- virtual void MakeDigits(TClonesArray* /*digits*/) {return;}
- virtual void MakeDigits(TTree *clustersTree);
- virtual void StartOfDetectorCycle();
- virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
+ virtual Int_t InitRaws();
+ virtual Int_t InitDigits();
+ virtual Int_t InitRecPoints();
+ virtual Int_t MakeRaws(AliRawReader *rawReader);
+ virtual Int_t MakeRecPoints(TTree *clustersTree);
+ virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;}
+ virtual Int_t MakeDigits(TTree *clustersTree);
+ virtual void StartOfDetectorCycle();
+ virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
virtual ~AliITSQASPDDataMakerRec(); // dtor
Int_t GetOffset(AliQAv1::TASKINDEX_t task);
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
private:
Int_t fSPDhDigitsTask; // number of booked SPD histograms for the RecPoints Task
Int_t fSPDhRecPointsTask; // number of booked SPD histograms for the RecPoints Task
Int_t fGenRawsOffset; // QAchecking Raws offset
- Int_t fGenDigitsOffset; // QAchecking RecPoints offset
+ Int_t fGenDigitsOffset; // QAchecking Digits offset
Int_t fGenRecPointsOffset; // QAchecking RecPoints offset
AliITSRawStreamSPDErrorLog *fAdvLogger; // pointer to special error logger object
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::InitDigits()
+Int_t AliITSQASPDDataMakerSim::InitDigits()
{
// Initialization for DIGIT data - SPD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+ //fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//fSPDhDTask must be incremented by one unit every time a histogram is ADDED to the QA List
Char_t name[50];
TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2DigitsList(hlayer,fGenOffsetD, expert, !image);
+ rv = fAliITSQADataMakerSim->Add2DigitsList(hlayer,fGenOffsetD, expert, !image);
fSPDhDTask++;
TH1F **hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,240,0,240);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],1+iLay+fGenOffsetD, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],1+iLay+fGenOffsetD, !expert, image);
fSPDhDTask++;
}
TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.);
hrows->GetXaxis()->SetTitle("Row number");
hrows->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2DigitsList(hrows,4+fGenOffsetD, expert, !image);
+ rv = fAliITSQADataMakerSim->Add2DigitsList(hrows,4+fGenOffsetD, expert, !image);
fSPDhDTask++;
TH1F** hMultSPDdigits = new TH1F*[2];
hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.);
hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity");
hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenOffsetD, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenOffsetD, !expert, image);
fSPDhDTask++;
}
= new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)");
hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)");
- fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenOffsetD, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenOffsetD, !expert, image);
fSPDhDTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
+Int_t AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
{
// Fill QA for DIGIT - SPD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) )
+ rv = InitDigits() ;
+
AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
fITS->SetTreeAddress();
TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD
fAliITSQADataMakerSim->GetDigitsData(5+fGenOffsetD)->Fill(nDigitsL1);
fAliITSQADataMakerSim->GetDigitsData(6+fGenOffsetD)->Fill(nDigitsL2);
fAliITSQADataMakerSim->GetDigitsData(7+fGenOffsetD)->Fill(nDigitsL1,nDigitsL2);
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::InitSDigits()
+Int_t AliITSQASPDDataMakerSim::InitSDigits()
{
// Initialization for SDIGIT data - SPD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+ //fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//printf("--W-- AliITSQASPDDataMakerSim::InitSDigits() fGenOffset= %d \n",fGenOffset);
//fSPDhSTask must be incremented by one unit every time a histogram is ADDED to the QA List
TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2SDigitsList(hlayer,fGenOffsetS, expert, !image);
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(hlayer,fGenOffsetS, expert, !image);
fSPDhSTask++;
TH1F **hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,240,0,240);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],1+iLay+fGenOffsetS, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],1+iLay+fGenOffsetS, !expert, image);
fSPDhSTask++;
}
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD SDigits histograms booked\n",fSPDhSTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
+Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
{
// Fill QA for SDIGIT - SPD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) )
+ rv = InitSDigits() ;
+
TBranch *brchSDigits = sdigits->GetBranch("ITS");
for (Int_t imod=0; imod<240; ++imod){
TClonesArray * sdig = new TClonesArray( "AliITSpListItem",1000 );
}
delete sdig;
}
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::InitHits()
+Int_t AliITSQASPDDataMakerSim::InitHits()
{
// Initialization for HITS data - SPD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
+ Int_t rv = 0 ;
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
+ //fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
//printf("--W-- AliITSQASPDDataMakerSim::InitHits() fGenOffset= %d \n",fGenOffset);
//fSPDhHTask must be incremented by one unit every time a histogram is ADDED to the QA List
Char_t name[50];
TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2HitsList(hlayer,fGenOffsetH, expert, !image);
+ rv = fAliITSQADataMakerSim->Add2HitsList(hlayer,fGenOffsetH, expert, !image);
fSPDhHTask++;
TH1F **hmod = new TH1F*[2];
hmod[iLay]=new TH1F(name,title,240,0,240);
hmod[iLay]->GetXaxis()->SetTitle("Module number");
hmod[iLay]->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],1+iLay+fGenOffsetH, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],1+iLay+fGenOffsetH, !expert, image);
fSPDhHTask++;
}
TH1F *hhitlenght = new TH1F("SPDLenght_SPD","SPD Hit lenght along y_{loc} coord",210,0.,210.);
hhitlenght->GetXaxis()->SetTitle("Hit lenght [#mum]");
hhitlenght->GetYaxis()->SetTitle("# hits");
- fAliITSQADataMakerSim->Add2HitsList(hhitlenght,3+fGenOffsetH, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2HitsList(hhitlenght,3+fGenOffsetH, !expert, image);
fSPDhHTask++;
TH1F *hEdepos = new TH1F("SPDEnergyDeposit_SPD","SPD Deposited energy distribution (y_{loc}>180 #mum)",150,0.,300.);
hEdepos->GetXaxis()->SetTitle("Deposited energy [keV]");
hEdepos->GetYaxis()->SetTitle("# hits");
- fAliITSQADataMakerSim->Add2HitsList(hEdepos,4+fGenOffsetH, !expert, image);
+ rv = fAliITSQADataMakerSim->Add2HitsList(hEdepos,4+fGenOffsetH, !expert, image);
fSPDhHTask++;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Hits histograms booked\n",fSPDhHTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
+Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
{
// Fill QA for HITS - SPD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) )
+ rv = InitHits() ;
+
AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
fITS->SetTreeAddress();
Int_t nmodules;
}
}
}
+ return rv ;
}
return offset;
}
+//____________________________________________________________________________
+void AliITSQASPDDataMakerSim::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset){
+ // Returns histogram offset according to the specified task
+ if( task == AliQAv1::kHITS){
+ fGenOffsetH = offset;
+ }
+ else if( task == AliQAv1::kSDIGITS) {
+ fGenOffsetS = offset;
+ }
+ else if( task == AliQAv1::kDIGITS) {
+ fGenOffsetD = offset;
+ }
+ else {
+ AliInfo("No task has been selected. TaskHisto set to zero.\n");
+ }
+}
//_______________________________________________________________
virtual void StartOfDetectorCycle();
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
virtual ~AliITSQASPDDataMakerSim() {;} // dtor
- virtual void InitDigits();
- virtual void InitSDigits();
- virtual void InitHits();
- virtual void MakeDigits(TClonesArray * /*digits*/){;}
- virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}
- virtual void MakeHits(TClonesArray * /*hits*/){;}
- virtual void MakeDigits(TTree * digits);
- virtual void MakeSDigits(TTree * sdigits);
- virtual void MakeHits(TTree * hits);
+ virtual Int_t InitDigits();
+ virtual Int_t InitSDigits();
+ virtual Int_t InitHits();
+ virtual Int_t MakeDigits(TClonesArray * /*digits*/){;}
+ virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){;}
+ virtual Int_t MakeHits(TClonesArray * /*hits*/){;}
+ virtual Int_t MakeDigits(TTree * digits);
+ virtual Int_t MakeSDigits(TTree * sdigits);
+ virtual Int_t MakeHits(TTree * hits);
Int_t GetOffset(AliQAv1::TASKINDEX_t task);
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
//Int_t GetOffsetH() { return fGenOffsetH; }
//Int_t GetOffsetS() { return fGenOffsetS; }
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::InitRaws() {
+Int_t AliITSQASSDDataMakerRec::InitRaws() {
// Initialization for RAW data - SSD -
const Bool_t expert = kTRUE ;
const Bool_t saveCorr = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
if(fkOnline) {
AliDebug(AliQAv1::GetQADebugLevel(), "Book Online Histograms for SSD\n");
TH1D *fHistSSDEventType = new TH1D("fHistSSDEventType",
"SSD Event Type;Event type;Events",
31,-1,30);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSize = new TH1D("fHistSSDDataSize",
"SSD Data Size;(SSD data size) [KB];Events",
1000,0,500);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSizePercentage = new TH1D("fHistSSDDataSizePercentage",
"SSD Data Size Percentage;SSD data size [%];Events",
1000,0,100);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDDLId = new TH1D("fHistSSDDDLId",
"SSD DDL Id;DDL id;Events",20,510.5,530.5);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSizePerDDL = new TH1D("fHistSSDDataSizePerDDL",
"SSD Data Size Per DDL;DDL id;<SSD data size> [KB]",
20,510.5,530.5);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL,
fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSizeDDL[fgkNumOfDDLs];
fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
1000,0,50);
- fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
- Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
- 1000,0,50);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1],
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1],
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
}
TH1D *fHistSSDLDCId = new TH1D("fHistSSDLDCId","SSD LDC Id;LDC id;Events",10,0.5,10.5);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSizePerLDC = new TH1D("fHistSSDDataSizePerLDC",
"SSD Data Size Per LDC;LDC id;<SSD data size> [KB]",
20,0.5,20.5);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC,
fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
fSSDRawsOffset += 1;
TH1D *fHistSSDDataSizeLDC[fgkNumOfLDCs];
fHistSSDDataSizeLDC[i-1] = new TH1D(gName.Data(),
Form("%s;SSD data size [KB];Events", gTitle.Data()),
1000,0,100);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1],
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1],
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
}
fHistSSDOccupancyModule[i-500] = new TH1D(gName.Data(),Form("%s;N_{strip};Occupancy [%]", gTitle.Data()),
2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
fHistSSDOccupancyModule[i-500]->GetXaxis()->SetTitleColor(1);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500],
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500],
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
}
AliITSgeomTGeo::GetNDetectors(iLayer),
0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
occupancyCounter += 1; fSSDRawsOffset += 1;
//N-side occupancy plots
AliITSgeomTGeo::GetNDetectors(iLayer),
0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
occupancyCounter += 1; fSSDRawsOffset += 1;
}//ladder loop
sprintf(fLabel,"%d",iBin);
fHistSSDOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH2D *fHistSSDOccupancyLayer6 = new TH2D("fHistSSDOccupancyLayer6",
sprintf(fLabel,"%d",iBin);
fHistSSDOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
sprintf(fLabel,"%d",iBin);
fHistSSDOccupancyThresholdLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer5,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer5,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
TH2D *fHistSSDOccupancyThresholdLayer6 = new TH2D("fHistSSDOccupancyThresholdLayer6",
sprintf(fLabel,"%d",iBin);
fHistSSDOccupancyThresholdLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer6,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer6,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1;
sprintf(fLabel,"%d",iBin);
fHistSSDAverageOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer5,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer5,
fGenRawsOffset+fSSDRawsOffset);
fSSDRawsOffset += 1;
TH2D *fHistSSDAverageOccupancyLayer6 = new TH2D("fHistSSDAverageOccupancyLayer6",
sprintf(fLabel,"%d",iBin);
fHistSSDAverageOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
}
- fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer6,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer6,
fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
fSSDRawsOffset += 1;
fHistPSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
- fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer5,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer5,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
fHistNSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
- fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer5,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer5,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
fHistPSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
- fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer6,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer6,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
fHistNSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
- fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer6,
+ rv = fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer6,
fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
}//online flag
AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDhTask));
AliDebug(AliQAv1::GetQADebugLevel(),Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDRawsOffset));
*/
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
+Int_t AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
// Fill QA for RAW - SSD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) )
+ rv = InitRaws() ;
+
Int_t gStripNumber;
Int_t gHistPosition;
Int_t gLayer = 0,gLadder = 0, gModule = 0;
//}//module cut --> to be removed
}//module loop
}//online flag for SSD
+ return rv ;
}
//____________________________________________________________________________ //
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::InitDigits() {
+Int_t AliITSQASSDDataMakerRec::InitDigits() {
// Initialization for DIGIT data - SSD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
";SSD Module Number;N_{DIGITS}",
1698,499.5,2197.5);
- fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModule,
+ rv = fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModule,
fGenDigitsOffset + 0, !expert, image);
fSSDhDigitsTask += 1;
TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",
";N_{Strip};N_{Module}",
1540,0,1540,1698,499.5,2197.5);
- fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModuleStrip,
+ rv = fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModuleStrip,
fGenDigitsOffset + 1, !expert, image);
fSSDhDigitsTask += 1;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Digits histograms booked\n",fSSDhDigitsTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::MakeDigits(TTree *digits) {
+Int_t AliITSQASSDDataMakerRec::MakeDigits(TTree *digits) {
// Fill QA for DIGIT - SSD -
// AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
// fITS->SetTreeAddress();
// TClonesArray *iSSDdigits = fITS->DigitsAddress(2);
+ Int_t rv = 0 ;
TBranch *branchD = digits->GetBranch("ITSDigitsSSD");
if (!branchD) {
AliError("can't get the branch with the SSD ITS digits !");
- return;
+ return rv;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) )
+ rv = InitDigits() ;
+
static TClonesArray statDigits("AliITSdigitSSD");
TClonesArray *iSSDdigits = &statDigits;
branchD->SetAddress(&iSSDdigits);
((TH2F *)fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());
}//digit loop
}//module loop
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::InitRecPoints()
+Int_t AliITSQASSDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SSD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+// fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
//AliDebug(AliQAv1::GetQADebugLevel(), Form("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset));
Int_t nModuleOffset = 500;
Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
fgkSSDMODULESLAYER5,
nModuleOffset - 0.5,
nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer5,
fGenRecPointsOffset + 0, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDModuleIdLayer6 = new TH1F("fHistSSDModuleIdLayer6",
fgkSSDMODULESLAYER6,
nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
nITSTotalModules + 0.5);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer6,
fGenRecPointsOffset + 1, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDClusterPerEventLayer5 = new TH1F("fHistSSDClusterPerEventLayer5",
"N_{clusters} - Layer 5;N_{clusters};Entries;",
100,0.1,5000);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer5,
fGenRecPointsOffset + 2, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDClusterPerEventLayer6 = new TH1F("fHistSSDClusterPerEventLayer6",
"N_{clusters} - Layer 6;N_{clusters};Entries;",
100,0.1,5000);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer6,
fGenRecPointsOffset + 3, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDLocalXLayer5 = new TH1F("fHistSSDLocalXLayer5",
"Local x coord.- Layer 5;x [cm];Entries;",
100,-4.,4.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer5,
fGenRecPointsOffset + 4, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDLocalXLayer6 = new TH1F("fHistSSDLocalXLayer6",
"Local x coord.- Layer 6;x [cm];Entries;",
100,-4.,4.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer6,
fGenRecPointsOffset + 5, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDLocalZLayer5 = new TH1F("fHistSSDLocalZLayer5",
"Local z coord.- Layer 5;z [cm];Entries;",
100,-4.,4.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer5,
fGenRecPointsOffset + 6, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDLocalZLayer6 = new TH1F("fHistSSDLocalZLayer6",
"Local z coord.- Layer 6;z [cm];Entries;",
100,-4.,4.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer6,
fGenRecPointsOffset + 7, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalXLayer5 = new TH1F("fHistSSDGlobalXLayer5",
"Global x - Layer 5;x [cm];Entries;",
100,-40.,40.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer5,
fGenRecPointsOffset + 8, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalXLayer6 = new TH1F("fHistSSDGlobalXLayer6",
"Global x - Layer 6;x [cm];Entries;",
100,-45.,45.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer6,
fGenRecPointsOffset + 9, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalYLayer5 = new TH1F("fHistSSDGlobalYLayer5",
"Global y - Layer 5;y [cm];Entries;",
100,-40.,40);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer5,
fGenRecPointsOffset + 10, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalYLayer6 = new TH1F("fHistSSDGlobalYLayer6",
"Global y - Layer 6;y [cm];Entries;",
100,-45.,45.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer6,
fGenRecPointsOffset + 11, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalZLayer5 = new TH1F("fHistSSDGlobalZLayer5",
"Global z - Layer 5;z [cm];Entries;",
100,-45.,45);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer5,
fGenRecPointsOffset + 12, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDGlobalZLayer6 = new TH1F("fHistSSDGlobalZLayer6",
"Global z - Layer 6;z [cm];Entries;",
100,-55.,55.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer6,
fGenRecPointsOffset + 13, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDPhiLayer5 = new TH1F("fHistSSDPhiLayer5",
"#phi - Layer 5;#phi [rad];Entries;",
100,-TMath::Pi(),TMath::Pi());
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer5,
fGenRecPointsOffset + 14, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDPhiLayer6 = new TH1F("fHistSSDPhiLayer6",
"#phi - Layer 6;#phi [rad];Entries;",
100,-TMath::Pi(),TMath::Pi());
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer6,
fGenRecPointsOffset + 15, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDThetaLayer5 = new TH1F("fHistSSDThetaLayer5",
"#theta - Layer 5;#theta [rad];Entries;",
100,-TMath::Pi(),TMath::Pi());
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer5,
fGenRecPointsOffset + 16, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDThetaLayer6 = new TH1F("fHistSSDThetaLayer6",
"#theta - Layer 6;#theta [rad];Entries;",
100,-TMath::Pi(),TMath::Pi());
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer6,
fGenRecPointsOffset + 17, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDRadiusLayer5 = new TH1F("fHistSSDRadiusLayer5",
"r - Layer 5;r [cm];Entries;",
100,35.,50.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer5,
fGenRecPointsOffset + 18, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDRadiusLayer6 = new TH1F("fHistSSDRadiusLayer6",
"r - Layer 6;r [cm];Entries;",
100,35.,50.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer6,
fGenRecPointsOffset + 19, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDClusterTypeLayer5 = new TH1F("fHistSSDClusterTypeLayer5",
"CL type - Layer 5;Cluster type;Entries;",
150,0,150);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer5,
fGenRecPointsOffset + 20, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDClusterTypeLayer6 = new TH1F("fHistSSDClusterTypeLayer6",
"CL type - Layer 6;Cluster type;Entries;",
150,0,150);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer6,
fGenRecPointsOffset + 21, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeRatioLayer5 = new TH1F("fHistSSDChargeRatioLayer5",
"Charge ratio - Layer 5;q_{ratio};Entries;",
100,-2.0,2.0);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer5,
fGenRecPointsOffset + 22, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeRatioLayer6 = new TH1F("fHistSSDChargeRatioLayer6",
"Charge ratio - Layer 6;q_{ratio};Entries;",
100,-2.0,2.0);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer6,
fGenRecPointsOffset + 23, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargekeVLayer5 = new TH1F("fHistSSDChargekeVLayer5",
"Charge - Layer 5;q [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer5,
fGenRecPointsOffset + 24, !expert, image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargekeVLayer6 = new TH1F("fHistSSDChargekeVLayer6",
"Charge - Layer 6;q [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer6,
fGenRecPointsOffset + 25, !expert, image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargePSideLayer5 = new TH1F("fHistSSDChargePSideLayer5",
"Charge P- Layer 5;q_{P} [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer5,
fGenRecPointsOffset + 26, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargePSideLayer6 = new TH1F("fHistSSDChargePSideLayer6",
"Charge P- Layer 6;q_{P} [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer6,
fGenRecPointsOffset + 27, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeNSideLayer5 = new TH1F("fHistSSDChargeNSideLayer5",
"Charge N- Layer 5;q_{N} [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer5,
fGenRecPointsOffset + 28, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeNSideLayer6 = new TH1F("fHistSSDChargeNSideLayer6",
"Charge N- Layer 6;q_{N} [keV];Entries;",
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer6,
fGenRecPointsOffset + 29, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeRatio2Layer5 = new TH1F("fHistSSDChargeRatio2Layer5",
"Charge Ratio qN/qP - Layer 5;q_{N}/q_{P};Entries;",
100,0,2);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer5,
fGenRecPointsOffset + 30, expert, !image);
fSSDhRecPointsTask += 1;
TH1F *fHistSSDChargeRatio2Layer6 = new TH1F("fHistSSDChargeRatio2Layer6",
"Charge Ratio qN/qP - Layer 6;q_{N}/q_{P};Entries;",
100,0,2);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer6,
fGenRecPointsOffset + 31, expert, !image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDChargePNSideLayer5 = new TH2F("fHistSSDChargePNSideLayer5",
"Charge correlation - Layer 5;q_{P} [keV];q_{N} [keV]",
100,0.,300.,
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer5,
fGenRecPointsOffset + 32, expert, !image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDChargePNSideLayer6 = new TH2F("fHistSSDChargePNSideLayer6",
"Charge correlation - Layer 6;q_{P} [keV];q_{N} [keV]",
100,0.,300.,
100,0.,300.);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer6,
fGenRecPointsOffset + 33, expert, !image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDChargeMapLayer5 = new TH2F("fHistSSDChargeMapLayer5",
-0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
3*fgkSSDLADDERSLAYER5,
-0.5,fgkSSDLADDERSLAYER5+0.5);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer5,
fGenRecPointsOffset + 34, expert, !image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDChargeMapLayer6 = new TH2F("fHistSSDChargeMapLayer6",
-0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
3*fgkSSDLADDERSLAYER6,
-0.5,fgkSSDLADDERSLAYER6+0.5);
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer6,
fGenRecPointsOffset + 35, expert, !image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDClusterMapLayer5 = new TH2F("fHistSSDClusterMapLayer5",
fHistSSDClusterMapLayer5->GetYaxis()->SetLabelSize(0.03);
fHistSSDClusterMapLayer5->GetZaxis()->SetTitleOffset(1.4);
fHistSSDClusterMapLayer5->GetZaxis()->SetTitle("N_{clusters}");
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer5,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer5,
fGenRecPointsOffset + 36, !expert, image);
fSSDhRecPointsTask += 1;
TH2F *fHistSSDClusterMapLayer6 = new TH2F("fHistSSDClusterMapLayer6",
fHistSSDClusterMapLayer6->GetYaxis()->SetLabelSize(0.03);
fHistSSDClusterMapLayer6->GetZaxis()->SetTitleOffset(1.4);
fHistSSDClusterMapLayer6->GetZaxis()->SetTitle("N_{clusters}");
- fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer6,
+ rv = fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer6,
fGenRecPointsOffset + 37, !expert, image);
fSSDhRecPointsTask += 1;
//printf ("%d SSD Recs histograms booked\n",fSSDhRecPointsTask);
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Recs histograms booked\n",fSSDhRecPointsTask));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
+Int_t AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
{
// Fill QA for recpoints - SSD -
//printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints called \n");
+ Int_t rv = 0 ;
Int_t gLayer = 0, gLadder = 0, gModule = 0;
Int_t lLadderLocationY = 0;
TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
if (!branchRecP) {
AliError("can't get the branch with the ITS clusters !");
- return;
+ return rv;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) )
+ rv = InitRecPoints() ;
+
static TClonesArray statRecpoints("AliITSRecPoint");
TClonesArray *recpoints = &statRecpoints;
branchRecP->SetAddress(&recpoints);
fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 3)->Fill(nClustersLayer6);
statRecpoints.Clear();
+ return rv ;
}
//____________________________________________________________________________
return offset;
}
+//_______________________________________________________________
+
+void AliITSQASSDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset) {
+ // Returns offset number according to the specified task
+ if( task == AliQAv1::kRAWS ) {
+ fGenRawsOffset=offset;
+ }
+ else if( task == AliQAv1::kDIGITSR ) {
+ fGenDigitsOffset=offset;
+ }
+ else if( task == AliQAv1::kRECPOINTS ) {
+ fGenRecPointsOffset=offset;
+ }
+ else {
+ AliInfo("No task has been selected. Offset set to zero.\n");
+ }
+}
+
//____________________________________________________________________________
Int_t AliITSQASSDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
// Returns the number of histograms associated to the specified task
AliITSQASSDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode = kFALSE, Int_t ldc=0); //ctor
AliITSQASSDDataMakerRec(const AliITSQASSDDataMakerRec& qadm);
AliITSQASSDDataMakerRec& operator = (const AliITSQASSDDataMakerRec& qac);
- virtual void InitRaws();
- virtual void InitDigits();
- virtual void InitRecPoints();
- virtual void MakeRaws(AliRawReader *rawReader);
- virtual void MakeDigits(TClonesArray* /*digits*/) {return;}
- virtual void MakeDigits(TTree *digitsTree);
- virtual void MakeRecPoints(TTree *clustersTree);
+ virtual Int_t InitRaws();
+ virtual Int_t InitDigits();
+ virtual Int_t InitRecPoints();
+ virtual Int_t MakeRaws(AliRawReader *rawReader);
+ virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;}
+ virtual Int_t MakeDigits(TTree *digitsTree);
+ virtual Int_t MakeRecPoints(TTree *clustersTree);
virtual void StartOfDetectorCycle();
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
virtual ~AliITSQASSDDataMakerRec(); // dtor
Int_t GetOffset(AliQAv1::TASKINDEX_t task);
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
private:
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::InitDigits() {
+Int_t AliITSQASSDDataMakerSim::InitDigits() {
// Initialization for DIGIT data - SSD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+ // fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
"SSD Digits Module;SSD Module Number;N_{DIGITS}",
1698,499.5,2197.5);
- fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModule,
+ rv = fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModule,
fGenOffsetD + 0, !expert, image);
fSSDhDTask += 1;
TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",
"SSD Digits Module Strip;N_{Strip};N_{Module}",
1540,0,1540,1698,499.5,2197.5);
- fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModuleStrip,
+ rv = fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModuleStrip,
fGenOffsetD + 1, !expert, image);
fSSDhDTask += 1;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Digits histograms booked\n",fSSDhDTask));
-
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) {
+Int_t AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) {
// Fill QA for DIGIT - SSD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) )
+ rv = InitDigits() ;
+
AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
fITS->SetTreeAddress();
TClonesArray *iSSDdigits = fITS->DigitsAddress(2);
((TH2F *)fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD + 1))->Fill(fStripNumber,iModule,dig->GetSignal());
}//digit loop
}//module loop
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::InitSDigits() {
+Int_t AliITSQASSDDataMakerSim::InitSDigits() {
// Initialization for SDIGIT data - SSD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+ //fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDSDigitsModule",
"SSD SDigits Module;SSD Module Number;N_{SDIGITS}",
1698,499.5,2197.5);
- fAliITSQADataMakerSim->Add2SDigitsList(fHistSSDModule,
+ rv = fAliITSQADataMakerSim->Add2SDigitsList(fHistSSDModule,
fGenOffsetS + 0, !expert, image);
fSSDhSTask += 1;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD SDigits histograms booked\n",fSSDhSTask));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) {
+Int_t AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) {
// Fill QA for SDIGIT - SSD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) )
+ rv = InitSDigits() ;
+
static TClonesArray iSSDEmpty("AliITSpListItem",10000);
iSSDEmpty.Clear();
TClonesArray *iSSDsdigits = &iSSDEmpty;
dig=0;
}//digit loop
}//module loop
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::InitHits() {
+Int_t AliITSQASSDDataMakerSim::InitHits() {
// Initialization for HITS data - SSD -
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
+ Int_t rv = 0 ;
+
+ //fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[fEventSpecie])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDHitsModule",
"SSD Hits Module;SDD Module Number;N_{HITS}",
1698,499.5,2197.5);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDModule,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDModule,
fGenOffsetH + 0, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDGlobalX = new TH1F("fHistSSDHitsGlobalX",
"SSD Hits Global X;x [cm];Entries",
1000,-50.,50.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalX,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalX,
fGenOffsetH + 1, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDGlobalY = new TH1F("fHistSSDHitsGlobalY",
"SSD Hits Global Y;y [cm];Entries",
1000,-50.,50.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalY,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalY,
fGenOffsetH + 2, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDGlobalZ = new TH1F("fHistSSDHitsGlobalZ",
"SSD Hits Global Z ;z [cm];Entries",
1000,-60.,60.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalZ,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalZ,
fGenOffsetH + 3, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDLocalX = new TH1F("fHistSSDHitsLocalX",
"SSD Hits Local X;x [cm];Entries",
1000,-4.,4.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalX,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalX,
fGenOffsetH + 4, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDLocalY = new TH1F("fHistSSDHitsLocalY",
"SSD Hits Local Y;y [cm];Entries",
1000,-0.1,0.1);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalY,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalY,
fGenOffsetH + 5, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDLocalZ = new TH1F("fHistSSDHitsLocalZ",
"SSD Hits Local Z;z [cm];Entries",
1000,-4.,4.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalZ,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalZ,
fGenOffsetH + 6, !expert, image);
fSSDhHTask += 1;
TH1F *fHistSSDIonization = new TH1F("fHistSSDHitsIonization",
"SSD Hits Ionization;log(dE/dx) [KeV];N_{Hits}",
100,-7,-2);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDIonization,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDIonization,
fGenOffsetH + 7, !expert, image);
fSSDhHTask += 1;
TH2F *fHistSSDGlobalXY = new TH2F("fHistSSDHitsGlobalXY",
"SSD Hits Global XY;x [cm];y [cm]",
1000,-50.,50.,
1000,-50.,50.);
- fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalXY,
+ rv = fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalXY,
fGenOffsetH + 8, !expert, image);
fSSDhHTask += 1;
AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Hits histograms booked\n",fSSDhHTask));
+ return rv ;
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::MakeHits(TTree *hits) {
+Int_t AliITSQASSDDataMakerSim::MakeHits(TTree *hits) {
// Fill QA for HITS - SSD -
+ Int_t rv = 0 ;
+ // Check id histograms already created for this Event Specie
+ if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) )
+ rv = InitHits() ;
+
AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
fITS->SetTreeAddress();
Int_t nmodules;
fAliITSQADataMakerSim->GetHitsData(fGenOffsetH + 8)->Fill(hit->GetXG(),hit->GetYG());
}//hit loop
}//module loop
+ return rv ;
}
-
-
-
//____________________________________________________________________________
Int_t AliITSQASSDDataMakerSim::GetOffset(AliQAv1::TASKINDEX_t task){
// Returns histogram offset according to the specified task
}
+//____________________________________________________________________________
+void AliITSQASSDDataMakerSim::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset){
+ // Returns histogram offset according to the specified task
+ if( task == AliQAv1::kHITS){
+ fGenOffsetH = offset;
+ }
+ else if( task == AliQAv1::kSDIGITS) {
+ fGenOffsetS = offset;
+ }
+ else if( task == AliQAv1::kDIGITS) {
+ fGenOffsetD = offset;
+ }
+ else {
+ AliInfo("No task has been selected. TaskHisto set to zero.\n");
+ }
+}
+
//____________________________________________________________________________
Int_t AliITSQASSDDataMakerSim::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
// Returns the number of booked histograms for the selected task
virtual void StartOfDetectorCycle();
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
virtual ~AliITSQASSDDataMakerSim() {;} // dtor
- virtual void InitDigits();
- virtual void InitSDigits();
- virtual void InitHits();
- virtual void MakeDigits(TClonesArray * /*digits*/){;}
- virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}
- virtual void MakeHits (TClonesArray * /*hits*/){;}
- virtual void MakeDigits(TTree * digits);
- virtual void MakeSDigits(TTree * sdigits);
- virtual void MakeHits(TTree * hits);
+ virtual Int_t InitDigits();
+ virtual Int_t InitSDigits();
+ virtual Int_t InitHits();
+ virtual Int_t MakeDigits(TClonesArray * /*digits*/){;}
+ virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){;}
+ virtual Int_t MakeHits (TClonesArray * /*hits*/){;}
+ virtual Int_t MakeDigits(TTree * digits);
+ virtual Int_t MakeSDigits(TTree * sdigits);
+ virtual Int_t MakeHits(TTree * hits);
Int_t GetOffset(AliQAv1::TASKINDEX_t task);
+ void SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset);
Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
private:
DisplayTriggerInfo(task);
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- SetEventSpecie(specie) ;
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
+ SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
if ( task == AliQAv1::kRAWS && fTrackerDataMaker )
{
TIter next(list[specie]);
// loop over chambers
for (Int_t iCh = 0; iCh < AliMUONConstants::NTrackingCh(); iCh++) {
- TH1* hTrackerClusterChargePerChamber = GetRecPointsData(kTrackerClusterChargePerChamber+iCh);
- Double_t sigmaCharge = hTrackerClusterChargePerChamber->GetRMS();
- hTrackerClusterChargePerChMean->SetBinContent(iCh+1, hTrackerClusterChargePerChamber->GetMean());
- hTrackerClusterChargePerChMean->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetMeanError());
- hTrackerClusterChargePerChSigma->SetBinContent(iCh+1, sigmaCharge);
- hTrackerClusterChargePerChSigma->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetRMSError());
-
- TH1* hTrackerClusterMultiplicityPerChamber = GetRecPointsData(kTrackerClusterMultiplicityPerChamber+iCh);
- Double_t sigmaSize = hTrackerClusterMultiplicityPerChamber->GetRMS();
- hTrackerClusterMultiplicityPerChMean->SetBinContent(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMean());
- hTrackerClusterMultiplicityPerChMean->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMeanError());
- hTrackerClusterMultiplicityPerChSigma->SetBinContent(iCh+1, sigmaSize);
- hTrackerClusterMultiplicityPerChSigma->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetRMSError());
-
- // loop over DE into chamber iCh
- AliMpDEIterator it;
- it.First(iCh);
- while ( !it.IsDone()) {
-
- Int_t iDE = it.CurrentDEId();
-
- TH1* hTrackerClusterChargePerDE = GetRecPointsData(kTrackerClusterChargePerDE+iDE);
- hTrackerClusterChargePerDEMean->SetBinContent(iDE+1, hTrackerClusterChargePerDE->GetMean());
- Double_t nClusters = hTrackerClusterChargePerDE->GetEntries();
- if (nClusters > 1) hTrackerClusterChargePerDEMean->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters));
- else hTrackerClusterChargePerDEMean->SetBinError(iDE+1, hTrackerClusterChargePerChamber->GetXaxis()->GetXmax());
-
- TH1* hTrackerClusterMultiplicityPerDE = GetRecPointsData(kTrackerClusterMultiplicityPerDE+iDE);
- hTrackerClusterMultiplicityPerDEMean->SetBinContent(iDE+1, hTrackerClusterMultiplicityPerDE->GetMean());
- nClusters = hTrackerClusterMultiplicityPerDE->GetEntries();
- if (nClusters > 1) hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nClusters));
- else hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, hTrackerClusterMultiplicityPerChamber->GetXaxis()->GetXmax());
-
- it.Next();
- }
-
+ TH1* hTrackerClusterChargePerChamber = GetRecPointsData(kTrackerClusterChargePerChamber+iCh);
+ Double_t sigmaCharge = hTrackerClusterChargePerChamber->GetRMS();
+ hTrackerClusterChargePerChMean->SetBinContent(iCh+1, hTrackerClusterChargePerChamber->GetMean());
+ hTrackerClusterChargePerChMean->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetMeanError());
+ hTrackerClusterChargePerChSigma->SetBinContent(iCh+1, sigmaCharge);
+ hTrackerClusterChargePerChSigma->SetBinError(iCh+1, hTrackerClusterChargePerChamber->GetRMSError());
+
+ TH1* hTrackerClusterMultiplicityPerChamber = GetRecPointsData(kTrackerClusterMultiplicityPerChamber+iCh);
+ Double_t sigmaSize = hTrackerClusterMultiplicityPerChamber->GetRMS();
+ hTrackerClusterMultiplicityPerChMean->SetBinContent(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMean());
+ hTrackerClusterMultiplicityPerChMean->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetMeanError());
+ hTrackerClusterMultiplicityPerChSigma->SetBinContent(iCh+1, sigmaSize);
+ hTrackerClusterMultiplicityPerChSigma->SetBinError(iCh+1, hTrackerClusterMultiplicityPerChamber->GetRMSError());
+
+ // loop over DE into chamber iCh
+ AliMpDEIterator it;
+ it.First(iCh);
+ while ( !it.IsDone()) {
+
+ Int_t iDE = it.CurrentDEId();
+
+ TH1* hTrackerClusterChargePerDE = GetRecPointsData(kTrackerClusterChargePerDE+iDE);
+ hTrackerClusterChargePerDEMean->SetBinContent(iDE+1, hTrackerClusterChargePerDE->GetMean());
+ Double_t nClusters = hTrackerClusterChargePerDE->GetEntries();
+ if (nClusters > 1) hTrackerClusterChargePerDEMean->SetBinError(iDE+1, sigmaCharge/TMath::Sqrt(nClusters));
+ else hTrackerClusterChargePerDEMean->SetBinError(iDE+1, hTrackerClusterChargePerChamber->GetXaxis()->GetXmax());
+
+ TH1* hTrackerClusterMultiplicityPerDE = GetRecPointsData(kTrackerClusterMultiplicityPerDE+iDE);
+ hTrackerClusterMultiplicityPerDEMean->SetBinContent(iDE+1, hTrackerClusterMultiplicityPerDE->GetMean());
+ nClusters = hTrackerClusterMultiplicityPerDE->GetEntries();
+ if (nClusters > 1) hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, sigmaSize/TMath::Sqrt(nClusters));
+ else hTrackerClusterMultiplicityPerDEMean->SetBinError(iDE+1, hTrackerClusterMultiplicityPerChamber->GetXaxis()->GetXmax());
+
+ it.Next();
+ }
+
}
}
{
/// make QA for rawdata
- if ( ! fIsInitRaws ) {
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
+ if ( ! fIsInitRaws ) {
AliWarningStream()
<< "Skipping function due to a failure in Init" << endl;
return;
}
+ // Check id histograms already created for this Event Specie
+
if ( rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent )
{
rawReader->Reset();
void AliMUONQADataMakerRec::MakeDigits(TTree* digitsTree)
{
/// makes data from Digits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
if (!fDigitStore)
fDigitStore = AliMUONVDigitStore::Create(*digitsTree);
fDigitStore->Connect(*digitsTree, false);
{
/// Fill histograms from treeR
- if (fIsInitRecPointsTracker) MakeRecPointsTracker(clustersTree);
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
+ if (fIsInitRecPointsTracker) MakeRecPointsTracker(clustersTree);
if (fIsInitRecPointsTrigger) MakeRecPointsTrigger(clustersTree);
}
{
/// make QA data from ESDs
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
if ( ! fIsInitESDs ) {
AliWarningStream()
<< "Skipping function due to a failure in Init" << endl;
return;
- }
+ }
// load ESD event in the interface
AliMUONESDInterface esdInterface;
/// Display trigger information in a user-friendly way:
/// from local board and strip numbers to their position on chambers
//
+
if(task!=AliQAv1::kRECPOINTS && task!=AliQAv1::kRAWS) return;
void AliMUONQADataMakerSim::MakeHits(TTree* hitsTree)
{
/// makes data from Hits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
if (!fHitStore)
fHitStore = AliMUONVHitStore::Create(*hitsTree);
fHitStore->Connect(*hitsTree, false);
void AliMUONQADataMakerSim::MakeSDigits(TTree* sdigitsTree)
{
/// makes data from SDigits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
if (!fDigitStore)
fDigitStore = AliMUONVDigitStore::Create(*sdigitsTree);
fDigitStore->Connect(*sdigitsTree, false);
void AliMUONQADataMakerSim::MakeDigits(TTree* digitsTree)
{
/// makes data from Digits
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
if (!fDigitStore)
fDigitStore = AliMUONVDigitStore::Create(*digitsTree);
fDigitStore->Connect(*digitsTree, false);
{
// make QA data from ESDs
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(kESDSpec) )
+ InitESDs() ;
+
Int_t nTot = 0 ;
Double_t eTot = 0 ;
for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) {
void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
{
//Fill prepared histograms with Raw digit properties
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(kLGpedRMS) )
+ InitRaws() ;
+
rawReader->Reset() ;
AliPHOSRawDecoder * decoder ;
if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0)
{
// makes data from Digits
- GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(kDigits) )
+ InitDigits() ;
+
+ TH1 * hist = GetDigitsData(kDigitsMul) ;
+ if ( ! hist )
+ InitDigits() ;
+ GetDigitsData(kDigitsMul)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliPHOSDigit * digit ;
while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
AliError("can't get the branch with the PHOS EMC clusters !");
return;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(kRPSpec) )
+ InitRecPoints() ;
+
TObjArray * emcrecpoints = new TObjArray(100) ;
emcbranch->SetAddress(&emcrecpoints);
emcbranch->GetEntry(0);
TIter next(emcrecpoints) ;
AliPHOSEmcRecPoint * rp ;
Double_t eTot = 0. ;
- while ( (rp = dynamic_cast<AliPHOSEmcRecPoint *>(next())) ) {
+ while ( (rp = static_cast<AliPHOSEmcRecPoint *>(next())) ) {
GetRecPointsData(kRPSpec)->Fill( rp->GetEnergy()) ;
Int_t mod = rp->GetPHOSMod() ;
TVector3 pos ;
{
//make QA data from Hits
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(kHits) )
+ InitHits() ;
+
+
TIter next(fHits) ;
AliPHOSHit * hit ;
while ( (hit = dynamic_cast<AliPHOSHit *>(next())) ) {
void AliPHOSQADataMakerSim::MakeDigits(TClonesArray * digits)
{
// makes data from Digits
-
- GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(kDigits) )
+ InitDigits() ;
+
+ GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliPHOSDigit * digit ;
while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
{
// makes data from SDigits
- GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ;
- TIter next(sdigits) ;
- AliPHOSDigit * sdigit ;
- while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
- GetSDigitsData(kSDigits)->Fill( sdigit->GetEnergy()) ;
- }
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(kSDigits) )
+ InitSDigits() ;
+
+ GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ;
+ TIter next(sdigits) ;
+ AliPHOSDigit * sdigit ;
+ while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
+ GetSDigitsData(kSDigits)->Fill( sdigit->GetEnergy()) ;
+ }
}
//____________________________________________________________________________
{
//Fill prepared histograms with Raw digit properties
- TObjArray *pmdddlcont = 0x0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
+ TObjArray *pmdddlcont = 0x0;
pmdddlcont = new TObjArray();
AliPMDRawStream stream(rawReader);
{
// makes data from Digits
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
Int_t cpvmul = 0, premul = 0;
TIter next(digits) ;
{
// makes data from RecPoints
- Int_t multDdl0 = 0, multDdl1 = 0, multDdl2 = 0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
+ Int_t multDdl0 = 0, multDdl1 = 0, multDdl2 = 0;
Int_t multDdl3 = 0, multDdl4 = 0, multDdl5 = 0;
AliPMDrecpoint1 * recpoint;
GetRecPointsData(7)->Fill(multDdl2,multDdl3);
GetRecPointsData(8)->Fill(multDdl4,multDdl5);
+ recpoints->Delete() ;
delete recpoints;
}
{
// make QA data from ESDs
- Int_t premul = 0, cpvmul = 0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
+ Int_t premul = 0, cpvmul = 0;
for (Int_t icl = 0; icl < esd->GetNumberOfPmdTracks(); icl++)
{
{
//make QA data from Hits
- Int_t premul = 0, cpvmul = 0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
+ Int_t premul = 0, cpvmul = 0;
Float_t edepkev = 0.;
TIter next(hits);
AliPMDhit * hit;
{
// makes data from SDigits
- Int_t cpvmul = 0, premul = 0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
+ Int_t cpvmul = 0, premul = 0;
Float_t edepkev = 0.;
TIter next(sdigits) ;
{
// makes data from Digits
- Int_t cpvmul = 0, premul = 0;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
+ Int_t cpvmul = 0, premul = 0;
TIter next(digits) ;
AliPMDdigit * digit ;
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++ ;
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[(Int_t)TMath::Log2(fEventSpecie)]))->Fill(varvalue);
delete [] varvalue;
}
}
// This function fills the ESD QA histograms
// as a part of global QA
//-----------------------------------------------------------
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(kClr0) )
+ InitESDs() ;
+
const AliESDEvent *esd=event;
Int_t ntrk=esd->GetNumberOfTracks() ;
GetESDsData(kL0off)->Fill(mass);
}
-}
+}
\ No newline at end of file
AliGlobalQADataMaker(const AliQADataMakerRec& qadm):
AliQADataMakerRec(qadm) {;}
+ void InitRecPointsForTracker() { InitRecPoints(); }
+
private:
void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
void InitRaws();
- void InitRecPoints();
+ void InitRecPoints();
void InitESDs();
-
+
void MakeRaws(AliRawReader* rawReader) ;
void MakeESDs(AliESDEvent *event);
AliCDBEntry * entry = manQA->Get(detOCDBDir, manQA->GetRun()) ;
if (entry) {
dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;
- TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ TList * listDetQAD =static_cast<TList *>(entry->GetObject()) ;
+ if ( strcmp(listDetQAD->ClassName(), "TList") != 0 ) {
+ AliError(Form("Expected a Tlist and found a %s for detector %s", listDetQAD->ClassName(), det)) ;
+ continue ;
+ }
TIter next(listDetQAD) ;
TObjArray * ar ;
while ( (ar = (TObjArray*)next()) )
if ( listDetQAD )
- dirOCDB[specie] = dynamic_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
+ dirOCDB[specie] = static_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
}
}
}
AliGRPObject* grpObject = 0x0;
if (entry) {
- TMap* m = dynamic_cast<TMap*>(entry->GetObject()); // old GRP entry
+ TMap* m = static_cast<TMap*>(entry->GetObject()); // old GRP entry
if (m) {
AliDebug(AliQAv1::GetQADebugLevel(), "It is a map");
else {
AliDebug(AliQAv1::GetQADebugLevel(), "It is a new GRP object");
- grpObject = dynamic_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
+ grpObject = static_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
}
entry->SetOwner(0);
TList * detKeyList = AliQAv1::GetQADataFile(fileName)->GetListOfKeys() ;
TIter nextd(detKeyList) ;
TKey * detKey ;
- while ( (detKey = dynamic_cast<TKey *>(nextd()) ) ) {
+ while ( (detKey = static_cast<TKey *>(nextd()) ) ) {
AliDebug(AliQAv1::GetQADebugLevel(), Form("Found %s", detKey->GetName())) ;
//Check which detector
TString detName ;
AliDebug(AliQAv1::GetQADebugLevel(), "Default setting is:") ;
if ( AliDebugLevel() == AliQAv1::GetQADebugLevel() ) {
- printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO]) ;
- printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING]) ;
- printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR]) ;
- printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ;
+ 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",
+ fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO],
+ fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING],
+ fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR],
+ fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ;
+ AliInfo(Form("%s", text)) ;
}
}
TIter next(list[specie]) ;
TH1 * hdata ;
count[specie] = 0 ;
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ while ( (hdata = static_cast<TH1 *>(next())) ) {
+ TString cln(hdata->ClassName()) ;
+ if ( ! cln.Contains("TH1") )
+ continue ;
if ( hdata) {
if ( hdata->TestBit(AliQAv1::GetExpertBit()) ) // does not perform the test for expert data
continue ;
{
AliDebug(AliQAv1::GetQADebugLevel(), "Previous setting was:") ;
if ( AliDebugLevel() == AliQAv1::GetQADebugLevel() ) {
- printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO]) ;
- printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING]) ;
- printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR]) ;
- printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ;
+ 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",
+ fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO],
+ fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING],
+ fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR],
+ fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ;
+ AliInfo(Form("%s", text)) ;
}
for (Int_t index = 0 ; index < AliQAv1::kNBIT ; index++) {
fLowTestValue[index] = lowValue[index] ;
- fUpTestValue[index] = hiValue[index] ;
+ fUpTestValue[index] = hiValue[index] ;
}
AliDebug(AliQAv1::GetQADebugLevel(), "Current setting is:") ;
if ( AliDebugLevel() == AliQAv1::GetQADebugLevel() ) {
- printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO]) ;
- printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING]) ;
- printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR]) ;
- printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ;
+ 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",
+ fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO],
+ fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING],
+ fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR],
+ fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]) ; AliInfo(Form("%s", text)) ;
}
}
//
// --- ROOT system ---
+#include <TROOT.h>
#include <TCanvas.h>
#include <TPaveText.h>
#include <TSystem.h>
{
//copy ctor
fDetectorDirName = GetName() ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fParameterList[specie] = qadm.fParameterList[specie] ;
+ fImage[specie] = qadm.fImage[specie] ;
+ }
}
//____________________________________________________________________________
AliError(Form("QA data Object must be a generic ROOT object and derive fom TH1 and not %s", className.Data())) ;
} else if ( index > 10000 ) {
AliError("Max number of authorized QA objects is 10000") ;
- } else {
+ } else {
+ hist->SetDirectory(0) ;
if (expert)
hist->SetBit(AliQAv1::GetExpertBit()) ;
if (image)
hist->SetBit(AliQAv1::GetImageBit()) ;
- TH1 * histClone[AliRecoParam::kNSpecies] ;
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- histClone[specie] = CloneMe(hist, specie) ;
- histClone[specie]->SetDirectory(0) ;
- list[specie]->AddAtAndExpand(histClone[specie], index) ;
- if(saveForCorr) {
- const Char_t * name = Form("%s_%s", list[AliRecoParam::AConvert(AliRecoParam::kDefault)]->GetName(), hist->GetName()) ;
- TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
- if ( fParameterList[specie] == NULL )
- fParameterList[specie] = new TList() ;
- fParameterList[specie]->Add(p) ;
- }
+ const Char_t * name = Form("%s_%s", AliRecoParam::GetEventSpecieName(fEventSpecie), hist->GetName()) ;
+ hist->SetName(name) ;
+ if(saveForCorr) {
+ const Char_t * cname = Form("%s_%s", list[AliRecoParam::AConvert(AliRecoParam::kDefault)]->GetName(), hist->GetName()) ;
+ TParameter<double> * p = new TParameter<double>(cname, 9999.9999) ;
+ if ( fParameterList[AliRecoParam::AConvert(fEventSpecie)] == NULL )
+ fParameterList[AliRecoParam::AConvert(fEventSpecie)] = new TList() ;
+ fParameterList[AliRecoParam::AConvert(fEventSpecie)]->Add(p) ;
}
- rv = list[AliRecoParam::kDefault]->GetLast() ;
+ list[AliRecoParam::AConvert(fEventSpecie)]->AddAtAndExpand(hist, index) ;
+ rv = list[AliRecoParam::AConvert(fEventSpecie)]->GetLast() ;
}
- delete hist ;
return rv ;
}
{
// clones a histogram
const Char_t * name = Form("%s_%s", AliRecoParam::GetEventSpecieName(specie), hist->GetName()) ;
- TH1 * hClone = dynamic_cast<TH1 *>(hist->Clone(name)) ;
+ TH1 * hClone = static_cast<TH1 *>(hist->Clone(name)) ;
if ( hist->TestBit(AliQAv1::GetExpertBit()) )
hClone->SetBit(AliQAv1::GetExpertBit()) ;
if ( hist->TestBit(AliQAv1::GetImageBit()) )
}
SetEventSpecie(fEventSpecie) ;
- if ( GetRecoParam() ) {
- if ( AliRecoParam::Convert(GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault) {
- SetEventSpecie(GetRecoParam()->GetEventSpecie()) ;
- } else {
- AliError(Form("Event Specie from RecoParam of %s is = %d\n", GetName(), fEventSpecie));
- }
- }
- if (list[AliRecoParam::AConvert(fEventSpecie)]) {
+ Int_t esindex = AliRecoParam::AConvert(fEventSpecie) ;
+ TH1 * histClone = NULL ;
+ if (list[esindex]) {
if ( index > 10000 ) {
AliError("Max number of authorized QA objects is 10000") ;
- return NULL ;
} else {
- Int_t esindex = AliRecoParam::AConvert(fEventSpecie) ;
- return list[esindex]->At(index) ;
- }
- } else {
- AliError("Data list is NULL !!") ;
- return NULL ;
- }
+ if ( list[esindex]->At(index) ) {
+ histClone = static_cast<TH1*>(list[esindex]->At(index)) ;
+ }
+ }
+ }
+ return histClone ;
}
//____________________________________________________________________________
}
//____________________________________________________________________________
-void AliQADataMaker::MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, Char_t * mode)
+void AliQADataMaker::MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, const Char_t * mode)
{
// makes the QA image for sim and rec
- TIter next(list[0]) ;
+ TIter next(list[AliRecoParam::AConvert(fEventSpecie)]) ;
TH1 * hdata = NULL ;
Int_t nImages = 0 ;
- while ( (hdata=dynamic_cast<TH1 *>(next())) ) {
+ while ( (hdata=static_cast<TH1 *>(next())) ) {
+ TString cln(hdata->ClassName()) ;
+ if ( ! cln.Contains("TH1") )
+ continue ;
if ( hdata->TestBit(AliQAv1::GetImageBit()) )
nImages++;
}
TH1* hist = NULL ;
Int_t npad = 1 ;
fImage[esIndex]->cd(npad) ;
- while ( (hist=dynamic_cast<TH1*>(nexthist())) ) {
+ while ( (hist=static_cast<TH1*>(nexthist())) ) {
+ TString cln(hist->ClassName()) ;
+ if ( ! cln.Contains("TH1") )
+ continue ;
if(hist->TestBit(AliQAv1::GetImageBit())) {
hist->Draw() ;
fImage[esIndex]->cd(++npad) ;
void SetPrintImage(Bool_t opt = kTRUE) { fPrintImage = opt ; }
virtual void SetRecoParam(const AliDetectorRecoParam *) {;}
-
+ virtual void InitRecPointsForTracker() {;} // needed by AliGlobalQADataMaker
+
protected:
Int_t Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert = kFALSE, const Bool_t image = kFALSE, const Bool_t saveForCorr = kFALSE) ;
virtual void MakeSDigits(TClonesArray * ) = 0 ;
virtual void MakeSDigits(TTree * ) = 0 ;
//virtual void MakeTrackSegments(TTree * ) = 0 ;
- virtual void MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, Char_t * mode) ;
+ virtual void MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, const Char_t * mode) ;
void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; }
virtual void StartOfDetectorCycle() = 0 ;
}
}
delete[] fRecPointsQAList ;
- }
+ }
}
//__________________________________________________________________
return ;
//DefaultEndOfDetectorCycle(task) ;
EndOfDetectorCycle(task, list) ;
- TDirectory * subDir = NULL ;
- if (fDetectorDir)
- subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
- if ( subDir ) {
- subDir->cd() ;
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
- if (eventSpecieDir) {
- eventSpecieDir->cd() ;
- if (list[specie]) {
- TIter next(list[specie]) ;
- TObject * obj ;
- while( (obj = next()) ) {
- if (!obj->TestBit(AliQAv1::GetExpertBit()))
- obj->Write() ;
- }
- if (WriteExpert()) {
- TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
- if ( expertDir ) { // Write only if requested
- expertDir->cd() ;
- next.Reset() ;
- while( (obj = next()) ) {
- if (!obj->TestBit(AliQAv1::GetExpertBit()))
- continue ;
- obj->Write() ;
- }
- }
- }
- }
- if ( !fCorrNt )
- continue ;
- if (fCorrNt[specie] && AliQAv1::GetDetIndex(GetName()) == AliQAv1::kCORR) {
- eventSpecieDir->cd() ;
- fCorrNt[specie]->Write() ;
- }
+ fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
+ if (!fDetectorDir)
+ fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
+ TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
+ if (!subDir)
+ subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
+ subDir->cd() ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+ if (!eventSpecieDir)
+ eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ;
+ eventSpecieDir->cd() ;
+ if (list[specie]) {
+ TIter next(list[specie]) ;
+ TObject * obj ;
+ while( (obj = next()) ) {
+ if (!obj->TestBit(AliQAv1::GetExpertBit()))
+ obj->Write() ;
}
+ if (WriteExpert()) {
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
+ if (!expertDir)
+ expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
+ expertDir->cd() ;
+ next.Reset() ;
+ while( (obj = next()) ) {
+ if (!obj->TestBit(AliQAv1::GetExpertBit()))
+ continue ;
+ obj->Write() ;
+ }
+ }
+ }
+ if ( !fCorrNt )
+ continue ;
+ if (fCorrNt[specie] && AliQAv1::GetDetIndex(GetName()) == AliQAv1::kCORR) {
+ eventSpecieDir->cd() ;
+ fCorrNt[specie]->Write() ;
}
fOutput->Save() ;
- }
- MakeImage(task) ;
+ }
+ MakeImage(task) ;
}
//____________________________________________________________________________
if ( task == AliQAv1::kRAWS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing Raws QA") ;
- AliRawReader * rawReader = dynamic_cast<AliRawReader *>(data) ;
+ AliRawReader * rawReader = static_cast<AliRawReader *>(data) ;
if (rawReader)
MakeRaws(rawReader) ;
else
AliDebug(AliQAv1::GetQADebugLevel(), "Raw data are not processed") ;
} else if ( task == AliQAv1::kDIGITSR ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing Digits QA") ;
- TTree * tree = dynamic_cast<TTree *>(data) ;
- if (tree) {
+ TTree * tree = static_cast<TTree *>(data) ;
+ if (strcmp(tree->ClassName(), "TTree") == 0) {
MakeDigits(tree) ;
} else {
AliWarning("data are not a TTree") ;
}
} else if ( task == AliQAv1::kRECPOINTS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing RecPoints QA") ;
- TTree * tree = dynamic_cast<TTree *>(data) ;
- if (tree) {
+ TTree * tree = static_cast<TTree *>(data) ;
+ if (strcmp(tree->ClassName(), "TTree") == 0) {
MakeRecPoints(tree) ;
} else {
AliWarning("data are not a TTree") ;
}
} else if ( task == AliQAv1::kESDS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing ESDs QA") ;
- AliESDEvent * esd = dynamic_cast<AliESDEvent *>(data) ;
- if (esd)
+ AliESDEvent * esd = static_cast<AliESDEvent *>(data) ;
+ if (strcmp(esd->ClassName(), "AliESDEvent") == 0)
MakeESDs(esd) ;
else
AliError("Wrong type of esd container") ;
if (! fRawsQAList ) {
fRawsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fRawsQAList[specie] = new TObjArray(100) ;
+ fRawsQAList[specie] = new TObjArray(1) ;
fRawsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitRaws() ;
}
rv = fRawsQAList ;
} else if ( task == AliQAv1::kDIGITSR ) {
if ( ! fDigitsQAList ) {
fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fDigitsQAList[specie] = new TObjArray(100) ;
+ fDigitsQAList[specie] = new TObjArray(1) ;
fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitDigits() ;
}
rv = fDigitsQAList ;
} else if ( task == AliQAv1::kRECPOINTS ) {
if ( ! fRecPointsQAList ) {
fRecPointsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fRecPointsQAList[specie] = new TObjArray(100) ;
+ fRecPointsQAList[specie] = new TObjArray(1) ;
fRecPointsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitRecPoints() ;
- }
+ }
rv = fRecPointsQAList ;
} else if ( task == AliQAv1::kESDS ) {
if ( ! fESDsQAList ) {
fESDsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fESDsQAList[specie] = new TObjArray(100) ;
+ fESDsQAList[specie] = new TObjArray(1) ;
fESDsQAList[specie]->SetName(Form("%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitESDs() ;
}
rv = fESDsQAList ;
}
}
else {
TObject * recoParamObj = entry->GetObject() ;
- if (dynamic_cast<TObjArray*>(recoParamObj)) {
+ if ( strcmp(recoParamObj->ClassName(), "TObjArray") == 0 ) {
// The detector has only one set of reco parameters
AliDebug(AliQAv1::GetQADebugLevel(), Form("Array of reconstruction parameters found for detector %s",GetName()));
- TObjArray *recoParamArray = dynamic_cast<TObjArray*>(recoParamObj) ;
+ TObjArray *recoParamArray = static_cast<TObjArray*>(recoParamObj) ;
for (Int_t iRP=0; iRP<recoParamArray->GetEntriesFast(); iRP++) {
- fRecoParam = dynamic_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
- if (fRecoParam->IsDefault()) break;
+ fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
+ if (!fRecoParam)
+ break ;
+ else if (fRecoParam->IsDefault())
+ break ;
}
}
- else if (dynamic_cast<AliDetectorRecoParam*>(recoParamObj)) {
- // The detector has only onse set of reco parameters
+ else if (recoParamObj->InheritsFrom("AliDetectorRecoParam")) {
+ // The detector has only one set of reco parameters
// Registering it in AliRecoParam
AliDebug(AliQAv1::GetQADebugLevel(), Form("Single set of reconstruction parameters found for detector %s",GetName()));
- dynamic_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
- fRecoParam = dynamic_cast<AliDetectorRecoParam*>(recoParamObj) ;
+ fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamObj) ;
+ static_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
} else {
AliError(Form("No valid RecoParam object found in the OCDB for detector %s",GetName()));
}
AliDebug(AliQAv1::GetQADebugLevel(), Form(" Run %d Cycle %d task %s file %s",
fRun, fCurrentCycle, AliQAv1::GetTaskName(task).Data(), fOutput->GetName() )) ;
- fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
- if (!fDetectorDir)
- fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
-
- TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
- if (!subDir)
- subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
-
- for ( Int_t specie = AliRecoParam::kDefault ; specie < AliRecoParam::kNSpecies ; specie++ ) {
- TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
- if (!eventSpecieDir)
- eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ;
- TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
- if (!expertDir)
- expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
- }
+// fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
+// if (!fDetectorDir)
+// fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
+//
+// TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
+// if (!subDir)
+// subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
+//
+// for ( Int_t specie = AliRecoParam::kDefault ; specie < AliRecoParam::kNSpecies ; specie++ ) {
+// TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+// if (!eventSpecieDir)
+// eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ;
+// TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
+// if (!expertDir)
+// expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
+// }
StartOfDetectorCycle() ;
}
virtual ~AliQADataMakerRec() ; // dtor
virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
- { return Add2List(hist, index, fDigitsQAList, expert, image) ; }
- virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
+ { return Add2List(hist, index, fDigitsQAList, expert, image) ; }
+ virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
{ return Add2List(hist, index, fESDsQAList, expert, image) ; }
- virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/)
+ virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/)
{ return -1 ; }
- virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
+ virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
{ return Add2List(hist, index, fRecPointsQAList, expert, image) ; }
- virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE, const Bool_t saveForCorr = kFALSE) {
- return Add2List(hist, index, fRawsQAList, expert, image, saveForCorr) ; }
- virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/) { return -1 ; }
- virtual void Exec(AliQAv1::TASKINDEX_t task, TObject * data) ;
+ virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE, const Bool_t saveForCorr = kFALSE)
+ { return Add2List(hist, index, fRawsQAList, expert, image, saveForCorr) ; }
+ virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/) { return -1 ; }
+
+ virtual void Exec(AliQAv1::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQAv1::TASKINDEX_t task) ;
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");}
virtual void MakeSDigits(TTree * ) {AliWarning("Call not valid") ; }
virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
- TObjArray * * fDigitsQAList ; //! list of the digits QA data objects
- TObjArray * * fESDsQAList ; //! list of the ESDs QA data objects
- TObjArray * * fRawsQAList ; //! list of the raws QA data objects
- TObjArray * * fRecPointsQAList ; //! list of the RecPoints QA data objects
- TNtupleD * * fCorrNt ; //! This is used by Corr only to hold its Ntuple.
- const AliDetectorRecoParam *fRecoParam; //! const pointer to the reco parameters to be used in the reco QA
+ TObjArray * * fDigitsQAList ; //! list of the digits QA data objects
+ TObjArray * * fESDsQAList ; //! list of the ESDs QA data objects
+ TObjArray * * fRawsQAList ; //! list of the raws QA data objects
+ TObjArray * * fRecPointsQAList ; //! list of the RecPoints QA data objects
+ TNtupleD ** fCorrNt ; //! This is used by Corr only to hold its Ntuple.
+ const AliDetectorRecoParam *fRecoParam; //! const pointer to the reco parameters to be used in the reco QA
- ClassDef(AliQADataMakerRec,3) // description
+ ClassDef(AliQADataMakerRec,4) // description
};
//____________________________________________________________________________
AliQADataMakerSim::AliQADataMakerSim(const char * name, const char * title) :
AliQADataMaker(name, title),
- fDigitsQAList(0x0),
- fHitsQAList(0x0),
- fSDigitsQAList(0x0)
+ fDigitsQAList(NULL),
+ fHitsQAList(NULL),
+ fSDigitsQAList(NULL)
{
// ctor
fDetectorDirName = GetName() ;
AliQADataMaker(qadm.GetName(), qadm.GetTitle()),
fDigitsQAList(qadm.fDigitsQAList),
fHitsQAList(qadm.fHitsQAList),
- fSDigitsQAList(qadm.fSDigitsQAList)
+ fSDigitsQAList(qadm.fSDigitsQAList)
{
//copy ctor
fDetectorDirName = GetName() ;
if ( fDigitsQAList[specie]->IsOwner() )
fDigitsQAList[specie]->Delete() ;
}
- delete[] fDigitsQAList ;
- }
+ delete[] fDigitsQAList ;
+ }
if ( fHitsQAList ) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
if ( fHitsQAList[specie]->IsOwner() )
fHitsQAList[specie]->Delete() ;
}
- delete[] fHitsQAList ;
- }
+ delete[] fHitsQAList ;
+ }
if ( fSDigitsQAList ) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
if ( fSDigitsQAList[specie]->IsOwner() )
fSDigitsQAList[specie]->Delete() ;
}
- delete[] fSDigitsQAList ;
- }
+ delete[] fSDigitsQAList ;
+ }
}
//__________________________________________________________________
if ( ! list )
return ;
EndOfDetectorCycle(task, list) ;
- TDirectory * subDir = NULL ;
- if (fDetectorDir)
- subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
- if (subDir) {
- subDir->cd() ;
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
- if (eventSpecieDir) {
- eventSpecieDir->cd() ;
- TIter next(list[specie]) ;
- TObject * obj ;
- while ( (obj = next()) ) {
- if (!obj->TestBit(AliQAv1::GetExpertBit()))
- obj->Write() ;
- }
- if (WriteExpert()) {
- TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
- if ( expertDir ) {
- expertDir->cd() ;
- next.Reset() ;
- while ( (obj = next()) ) {
- if (!obj->TestBit(AliQAv1::GetExpertBit()))
- continue ;
- obj->Write() ;
- }
- }
- }
- }
+ fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
+ if (!fDetectorDir)
+ fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
+ TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
+ if (!subDir)
+ subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
+ subDir->cd() ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+ if (!eventSpecieDir)
+ eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ;
+ eventSpecieDir->cd() ;
+ TIter next(list[specie]) ;
+ TObject * obj ;
+ while ( (obj = next()) ) {
+ if (!obj->TestBit(AliQAv1::GetExpertBit()))
+ obj->Write() ;
+ }
+ if (WriteExpert()) {
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
+ if (!expertDir)
+ expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
+ expertDir->cd() ;
+ next.Reset() ;
+ while ( (obj = next()) ) {
+ if (!obj->TestBit(AliQAv1::GetExpertBit()))
+ continue ;
+ obj->Write() ;
+ }
}
fOutput->Save() ;
}
if (fPrintImage)
MakeImage(task) ;
}
-
+
//____________________________________________________________________________
void AliQADataMakerSim::Exec(AliQAv1::TASKINDEX_t task, TObject * data)
{
// creates the quality assurance data for the various tasks (Hits, SDigits, Digits, ESDs)
-
+
if ( task == AliQAv1::kHITS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing Hits QA") ;
- TClonesArray * arr = dynamic_cast<TClonesArray *>(data) ;
- if (arr) {
+ if (strcmp(data->ClassName(), "TClonesArray") == 0) {
+ TClonesArray * arr = static_cast<TClonesArray *>(data) ;
MakeHits(arr) ;
- } else {
- TTree * tree = dynamic_cast<TTree *>(data) ;
- if (tree) {
- MakeHits(tree) ;
- } else {
- AliWarning("data are neither a TClonesArray nor a TTree") ;
- }
- }
+ } else if (strcmp(data->ClassName(), "TTree") == 0) {
+ TTree * tree = static_cast<TTree *>(data) ;
+ MakeHits(tree) ;
+ } else {
+ AliWarning("data are neither a TClonesArray nor a TTree") ;
+ }
} else if ( task == AliQAv1::kSDIGITS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing SDigits QA") ;
- TClonesArray * arr = dynamic_cast<TClonesArray *>(data) ;
- if (arr) {
+ if (strcmp(data->ClassName(), "TClonesArray") == 0) {
+ TClonesArray * arr = static_cast<TClonesArray *>(data) ;
MakeSDigits(arr) ;
- } else {
- TTree * tree = dynamic_cast<TTree *>(data) ;
- if (tree) {
- MakeSDigits(tree) ;
- } else {
- AliWarning("data are neither a TClonesArray nor a TTree") ;
- }
- }
- } else if ( task == AliQAv1::kDIGITS ) {
+ } else if (strcmp(data->ClassName(), "TTree") == 0) {
+ TTree * tree = static_cast<TTree *>(data) ;
+ MakeSDigits(tree) ;
+ } else {
+ AliWarning("data are neither a TClonesArray nor a TTree") ;
+ }
+ } else if ( task == AliQAv1::kDIGITS ) {
AliDebug(AliQAv1::GetQADebugLevel(), "Processing Digits QA") ;
- TClonesArray * arr = dynamic_cast<TClonesArray *>(data) ;
- if (arr) {
+ if (strcmp(data->ClassName(), "TClonesArray") == 0) {
+ TClonesArray * arr = static_cast<TClonesArray *>(data) ;
MakeDigits(arr) ;
- } else {
- TTree * tree = dynamic_cast<TTree *>(data) ;
- if (tree) {
- MakeDigits(tree) ;
- } else {
- AliWarning("data are neither a TClonesArray nor a TTree") ;
- }
- }
- }
+ } else if (strcmp(data->ClassName(), "TTree") == 0) {
+ TTree * tree = static_cast<TTree *>(data) ;
+ MakeDigits(tree) ;
+ } else {
+ AliWarning("data are neither a TClonesArray nor a TTree") ;
+ }
+ }
}
//____________________________________________________________________________
if ( ! fHitsQAList ) {
fHitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fHitsQAList[specie] = new TObjArray(100) ;
+ fHitsQAList[specie] = new TObjArray(1) ;
fHitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitHits() ;
}
rv = fHitsQAList ;
} else if ( task == AliQAv1::kSDIGITS ) {
if ( ! fSDigitsQAList ) {
fSDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fSDigitsQAList[specie] = new TObjArray(100) ;
+ fSDigitsQAList[specie] = new TObjArray(1) ;
fSDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitSDigits() ;
}
rv = fSDigitsQAList ;
} else if ( task == AliQAv1::kDIGITS ) {
if ( ! fDigitsQAList ) {
fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- fDigitsQAList[specie] = new TObjArray(100) ;
+ fDigitsQAList[specie] = new TObjArray(1) ;
fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
}
- InitDigits() ;
}
rv = fDigitsQAList ;
}
return rv ;
-}
+}
//____________________________________________________________________________
void AliQADataMakerSim::Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles)
AliDebug(AliQAv1::GetQADebugLevel(), Form(" Run %d Cycle %d task %s file %s",
fRun, fCurrentCycle, AliQAv1::GetTaskName(task).Data(), fOutput->GetName() )) ;
- fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
- if (!fDetectorDir)
- fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
-
- TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
- if (!subDir)
- subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
-
- for ( Int_t index = AliRecoParam::kDefault ; index < AliRecoParam::kNSpecies ; index++ ) {
- TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(index)) ;
- if (!eventSpecieDir)
- eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(index)) ;
- TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
- if (!expertDir)
- expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
- }
+ //fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ;
+// if (!fDetectorDir)
+// fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ;
+//
+// TDirectory * subDir = fDetectorDir->GetDirectory(AliQAv1::GetTaskName(task)) ;
+// if (!subDir)
+// subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ;
+//
+// for ( Int_t index = AliRecoParam::kDefault ; index < AliRecoParam::kNSpecies ; index++ ) {
+// TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(index)) ;
+// if (!eventSpecieDir)
+// eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(index)) ;
+// TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQAv1::GetExpert()) ;
+// if (!expertDir)
+// expertDir = eventSpecieDir->mkdir(AliQAv1::GetExpert()) ;
+// }
StartOfDetectorCycle() ;
}
virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
{ return Add2List(hist, index, fDigitsQAList, expert, image) ; }
virtual Int_t Add2ESDsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/)
- { return -1 ; }
+ { return -1 ; }
virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
- { return Add2List(hist, index, fHitsQAList, expert, image) ; }
+ { return Add2List(hist, index, fHitsQAList, expert, image) ; }
virtual Int_t Add2RecPointsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*image = kFALSE*/)
{ return -1 ; }
- virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*saveForCorr = kFALSE*/, const Bool_t /*image = kFALSE*/)
+ virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*saveForCorr = kFALSE*/, const Bool_t /*image = kFALSE*/)
{ return -1 ; }
- virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
+ virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE)
{ return Add2List(hist, index, fSDigitsQAList, expert, image) ; }
- virtual void Exec(AliQAv1::TASKINDEX_t task, TObject * data) ;
+
+ virtual void Exec(AliQAv1::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQAv1::TASKINDEX_t task) ;
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");}
virtual void MakeSDigits(TTree * ) {AliInfo("To be implemented by detectors");}
virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
- TObjArray * * fDigitsQAList ; //! list of the digits QA data objects
- TObjArray * * fHitsQAList ; //! list of the hits QA data objects
- TObjArray * * fSDigitsQAList ; //! list of the sdigits QA data objects
-
+ TObjArray * * fDigitsQAList ; //! list of the digits QA data objects
+ TObjArray * * fHitsQAList ; //! list of the hits QA data objects
+ TObjArray * * fSDigitsQAList ; //! list of the sdigits QA data objects
+
ClassDef(AliQADataMakerSim,1) // description
};
}
//_____________________________________________________________________________
-AliQAManager::AliQAManager(Char_t * mode, const Char_t* gAliceFilename) :
+AliQAManager::AliQAManager(const Char_t * mode, const Char_t* gAliceFilename) :
AliCDBManager(),
fCurrentEvent(0),
fCycleSame(kFALSE),
AliWarning(Form(" Hit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
break ;
}
+ qadm->Exec(taskIndex, data) ;
}
- qadm->Exec(taskIndex, data) ;
break ;
case AliQAv1::kSDIGITS :
if( loader ) {
AliWarning(Form(" SDigit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
break ;
}
+ qadm->Exec(taskIndex, data) ;
}
- qadm->Exec(taskIndex, data) ;
break;
case AliQAv1::kDIGITS :
if( loader ) {
AliWarning(Form(" Digit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
break ;
}
+ qadm->Exec(taskIndex, data) ;
}
+ break;
case AliQAv1::kDIGITSR :
if( loader ) {
loader->LoadDigits() ;
AliWarning(Form(" Digit Tree not found for %s", AliQAv1::GetDetName(iDet))) ;
break ;
}
+ qadm->Exec(taskIndex, data) ;
}
- qadm->Exec(taskIndex, data) ;
break;
case AliQAv1::kRECPOINTS :
if( loader ) {
AliWarning(Form("RecPoints not found for %s", AliQAv1::GetDetName(iDet))) ;
break ;
}
+ qadm->Exec(taskIndex, data) ;
}
- qadm->Exec(taskIndex, data) ;
break;
case AliQAv1::kTRACKSEGMENTS :
break;
TString detOCDBDir(Form("%s/%s/%s", AliQAv1::GetQAName(), AliQAv1::GetDetName((Int_t)det), AliQAv1::GetRefOCDBDirName())) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("Retrieving reference data from %s/%s for %s", AliQAv1::GetQARefStorage(), detOCDBDir.Data(), AliQAv1::GetTaskName(task).Data())) ;
AliCDBEntry* entry = QAManager()->Get(detOCDBDir.Data(), 0) ; //FIXME 0 --> Run Number
- TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ TList * listDetQAD = static_cast<TList *>(entry->GetObject()) ;
if ( listDetQAD )
- rv = dynamic_cast<TObjArray *>(listDetQAD->FindObject(AliQAv1::GetTaskName(task))) ;
+ rv = static_cast<TObjArray *>(listDetQAD->FindObject(AliQAv1::GetTaskName(task))) ;
return rv ;
}
AliError(Form("File %s not found", fileName)) ;
return NULL ;
}
- TTree * tagTree = dynamic_cast<TTree *>(tagFile->Get("T")) ;
+ TTree * tagTree = static_cast<TTree *>(tagFile->Get("T")) ;
if ( !tagTree ) {
AliError(Form("Tree T not found in %s", fileName)) ;
tagFile->Close() ;
{
// get the quality assurance data maker for a detector
- if (fQADataMaker[iDet]) {
- fQADataMaker[iDet]->SetEventSpecie(fEventSpecie) ;
- if ( fQADataMaker[iDet]->GetRecoParam() )
- if ( AliRecoParam::Convert(fQADataMaker[iDet]->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
- fQADataMaker[iDet]->SetEventSpecie(fQADataMaker[iDet]->GetRecoParam()->GetEventSpecie()) ;
- return fQADataMaker[iDet] ;
- }
-
- AliQADataMaker * qadm = NULL ;
-
- if (iDet == AliQAv1::kGLOBAL) { //Global QA
- qadm = new AliGlobalQADataMaker();
- qadm->SetName(AliQAv1::GetDetName(iDet));
- qadm->SetUniqueID(iDet);
- fQADataMaker[iDet] = qadm;
+ AliQADataMaker * qadm = fQADataMaker[iDet] ;
+
+ if (qadm) {
+
qadm->SetEventSpecie(fEventSpecie) ;
if ( qadm->GetRecoParam() )
- if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
+ if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
- return qadm;
- }
- if (iDet == AliQAv1::kCORR) { //the data maker for correlations among detectors
- qadm = new AliCorrQADataMakerRec(fQADataMaker) ;
+ } else if (iDet == AliQAv1::kGLOBAL) { //Global QA
+
+ qadm = new AliGlobalQADataMaker();
qadm->SetName(AliQAv1::GetDetName(iDet));
qadm->SetUniqueID(iDet);
fQADataMaker[iDet] = qadm;
if ( qadm->GetRecoParam() )
if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
- return qadm;
- }
- // load the QA data maker object
- TPluginManager* pluginManager = gROOT->GetPluginManager() ;
- TString detName = AliQAv1::GetDetName(iDet) ;
- TString qadmName = "Ali" + detName + "QADataMaker" + fMode ;
-
- // first check if a plugin is defined for the quality assurance data maker
- TPluginHandler* pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
- // if not, add a plugin for it
- if (!pluginHandler) {
- AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qadmName.Data())) ;
- TString libs = gSystem->GetLibraries() ;
- if (libs.Contains("lib" + detName + fMode + ".so") || (gSystem->Load("lib" + detName + fMode + ".so") >= 0)) {
- pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()") ;
- } else {
- pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()") ;
- }
- pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
- }
- if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
- qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(0) ;
- }
- if (qadm) {
+ } else if (iDet == AliQAv1::kCORR && strcmp(GetMode(), "Rec") == 0 ) { //the data maker for correlations among detectors
+ qadm = new AliCorrQADataMakerRec(fQADataMaker) ;
qadm->SetName(AliQAv1::GetDetName(iDet));
qadm->SetUniqueID(iDet);
- fQADataMaker[iDet] = qadm ;
+ fQADataMaker[iDet] = qadm;
qadm->SetEventSpecie(fEventSpecie) ;
if ( qadm->GetRecoParam() )
if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
- }
+ } else {
+
+ // load the QA data maker object
+ TPluginManager* pluginManager = gROOT->GetPluginManager() ;
+ TString detName = AliQAv1::GetDetName(iDet) ;
+ TString qadmName = "Ali" + detName + "QADataMaker" + GetMode() ;
+
+ // first check if a plugin is defined for the quality assurance data maker
+ TPluginHandler* pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
+ // if not, add a plugin for it
+ if (!pluginHandler) {
+ AliDebug(AliQAv1::GetQADebugLevel(), Form("defining plugin for %s", qadmName.Data())) ;
+ TString libs = gSystem->GetLibraries() ;
+ if (libs.Contains("lib" + detName + GetMode() + ".so") || (gSystem->Load("lib" + detName + GetMode() + ".so") >= 0)) {
+ pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName + "qadm", qadmName + "()") ;
+ } else {
+ pluginManager->AddHandler("AliQADataMaker", detName, qadmName, detName, qadmName + "()") ;
+ }
+ pluginHandler = pluginManager->FindHandler("AliQADataMaker", detName) ;
+ }
+ if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
+ qadm = (AliQADataMaker *) pluginHandler->ExecPlugin(0) ;
+ }
+ if (qadm) {
+ qadm->SetName(AliQAv1::GetDetName(iDet));
+ qadm->SetUniqueID(iDet);
+ fQADataMaker[iDet] = qadm ;
+ qadm->SetEventSpecie(fEventSpecie) ;
+ if ( qadm->GetRecoParam() )
+ if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault)
+ qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ;
+ }
+ }
return qadm ;
}
continue ;
}
qadm->SetPrintImage(fPrintImage) ;
+
for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
if ( fTasks.Contains(Form("%d", taskIndex)) )
qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
fTasks = AliQAv1::GetTaskName(AliQAv1::kESDS) ;
if (!gSystem->AccessPathName("AliESDs.root")) { // AliESDs.root exists
TFile * esdFile = TFile::Open("AliESDs.root") ;
- fESDTree = dynamic_cast<TTree *> (esdFile->Get("esdTree")) ;
+ fESDTree = static_cast<TTree *> (esdFile->Get("esdTree")) ;
if ( !fESDTree ) {
AliError("esdTree not found") ;
return kFALSE ;
loRun = cuRun ;
if (cuRun > hiRun)
hiRun = cuRun ;
- while ( (srun = dynamic_cast<TObjString *> (nextRun())) ) {
+ while ( (srun = static_cast<TObjString *> (nextRun())) ) {
if ( cuRun == (srun->String()).Atoi() ) {
runExist = kTRUE ;
break ;
}
}
}
- while ( (srun = dynamic_cast<TObjString *> (nextRun())) ) {
+ while ( (srun = static_cast<TObjString *> (nextRun())) ) {
runNumber = (srun->String()).Atoi() ;
hisRun->Fill(runNumber) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("Merging run number %d", runNumber)) ;
TList * listOfData = directoryEventSpecie->GetListOfKeys() ;
TIter nextData(listOfData) ;
TKey * key ;
- while ( (key = dynamic_cast<TKey *>(nextData())) ) {
+ while ( (key = static_cast<TKey *>(nextData())) ) {
TString className(key->GetClassName()) ;
if ( className.Contains("TH") || className.Contains("TProfile") ) {
- TH1 * histIn = dynamic_cast<TH1*> (key->ReadObj()) ;
- TH1 * histOu = dynamic_cast<TH1*> (mergedDirectory->FindObjectAny(histIn->GetName())) ;
+ TH1 * histIn = static_cast<TH1*> (key->ReadObj()) ;
+ TH1 * histOu = static_cast<TH1*> (mergedDirectory->FindObjectAny(histIn->GetName())) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("%s %x %x\n", key->GetName(), histIn, histOu)) ;
mergedDirectory->cd() ;
if ( ! histOu ) {
TList * listOfExpertData = dirExpert->GetListOfKeys() ;
TIter nextExpertData(listOfExpertData) ;
TKey * keykey ;
- while ( (keykey = dynamic_cast<TKey *>(nextExpertData())) ) {
+ while ( (keykey = static_cast<TKey *>(nextExpertData())) ) {
TString classNameExpert(keykey->GetClassName()) ;
if (classNameExpert.Contains("TH")) {
- TH1 * histInExpert = dynamic_cast<TH1*> (keykey->ReadObj()) ;
- TH1 * histOuExpert = dynamic_cast<TH1*> (mergedDirectory->FindObjectAny(histInExpert->GetName())) ;
+ TH1 * histInExpert = static_cast<TH1*> (keykey->ReadObj()) ;
+ TH1 * histOuExpert = static_cast<TH1*> (mergedDirectory->FindObjectAny(histInExpert->GetName())) ;
mergedDirectoryExpert->cd() ;
if ( ! histOuExpert ) {
histInExpert->Write() ;
}
//_____________________________________________________________________________
-AliQAManager * AliQAManager::QAManager(Char_t * mode, TMap *entryCache, Int_t run)
+AliQAManager * AliQAManager::QAManager(const Char_t * mode, TMap *entryCache, Int_t run)
{
// returns AliQAManager instance (singleton)
AliCodeTimerStart(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
if (test.Contains("TreeD")) {
qadm->Exec(AliQAv1::kDIGITSR, tree) ;
- AliCodeTimerStop(Form("running Digits quality assurance data maker for %s", AliQAv1::GetDetName(det)));
} else if (test.Contains("TreeR")) {
qadm->Exec(AliQAv1::kRECPOINTS, tree) ;
AliCodeTimerStop(Form("running RecPoints quality assurance data maker for %s", AliQAv1::GetDetName(det)));
TList * taskList = detDir->GetListOfKeys() ;
TIter nextTask(taskList) ;
TKey * taskKey ;
- while ( (taskKey = dynamic_cast<TKey*>(nextTask())) ) {
+ while ( (taskKey = static_cast<TKey*>(nextTask())) ) {
TDirectory * taskDir = detDir->GetDirectory(taskKey->GetName()) ;
TDirectory * esDir = taskDir->GetDirectory(AliRecoParam::GetEventSpecieName(es)) ;
AliDebug(AliQAv1::GetQADebugLevel(), Form("Saving %s", esDir->GetName())) ;
TList * histList = esDir->GetListOfKeys() ;
TIter nextHist(histList) ;
TKey * histKey ;
- while ( (histKey = dynamic_cast<TKey*>(nextHist())) ) {
+ while ( (histKey = static_cast<TKey*>(nextHist())) ) {
TObject * odata = esDir->Get(histKey->GetName()) ;
if ( !odata ) {
AliError(Form("%s in %s/%s returns a NULL pointer !!", histKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
TList * expertHistList = expertDir->GetListOfKeys() ;
TIter nextExpertHist(expertHistList) ;
TKey * expertHistKey ;
- while ( (expertHistKey = dynamic_cast<TKey*>(nextExpertHist())) ) {
+ while ( (expertHistKey = static_cast<TKey*>(nextExpertHist())) ) {
TObject * expertOdata = expertDir->Get(expertHistKey->GetName()) ;
if ( !expertOdata ) {
AliError(Form("%s in %s/%s/Expert returns a NULL pointer !!", expertHistKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
// all associated objects
if (fgQAInstance) {
- delete fgQAInstance;
- fgQAInstance = 0x0;
+ delete fgQAInstance ;
+ fgQAInstance = NULL ;
}
}
class AliQAManager : public AliCDBManager {
private:
AliQAManager() ;
- AliQAManager(Char_t * mode, const Char_t * gAliceFilename = "galice.root") ;
+ AliQAManager(const Char_t * mode, const Char_t * gAliceFilename = "galice.root") ;
AliQAManager(const AliQAManager & qas) ;
AliQAManager & operator = (const AliQAManager & qas) ;
+ ~AliQAManager() ;
public:
- virtual ~AliQAManager() ;
void EndOfCycle(TObjArray * detArray=0x0) ;
void EndOfCycle(TString detectors) ;
UInt_t GetCurrentEvent() const { return fCurrentEvent ; }
Bool_t Merge(Int_t runNumber = -1, const char *fileName = NULL) const ;
void MergeCustom() const ;
Bool_t MergeXML(const Char_t * collection, const Char_t * subFile = 0, const Char_t * outFile = 0) ;
- static AliQAManager * QAManager(Char_t * mode = "", TMap *entryCache = NULL, Int_t run = -1) ;
+ static AliQAManager * QAManager(const Char_t * mode = "", TMap *entryCache = NULL, Int_t run = -1) ;
void Reset(const Bool_t sameCycle = kFALSE) ;
TString Run(const Char_t * detectors, const AliQAv1::TASKINDEX_t taskIndex=AliQAv1::kNULLTASKINDEX, Bool_t const sameCycle = kFALSE, const Char_t * fileName = NULL) ;
TString Run(const Char_t * detectors, AliRawReader * rawReader, Bool_t const sameCycle = kFALSE) ;
ClassDef(AliQAManager, 1) // class for running the QA makers
};
-#endif
+#endif
\ No newline at end of file
fgQADataFile = TFile::Open(temp, opt.Data()) ;
} else {
if ( strcmp(temp, fgQADataFile->GetName()) != 0 ) {
- fgQADataFile = dynamic_cast<TFile *>(gROOT->FindObject(temp)) ;
+ fgQADataFile = static_cast<TFile *>(gROOT->FindObject(temp)) ;
if ( !fgQADataFile ) {
- if (gSystem->AccessPathName(temp))
- opt = "NEW" ;
- else
- opt = "UPDATE" ;
+ if (gSystem->AccessPathName(temp))
+ opt = "NEW" ;
+ else
+ opt = "UPDATE" ;
fgQADataFile = TFile::Open(temp, opt.Data()) ;
}
}
if ( ! fgQA) {
TFile * f = GetQAResultFile() ;
- fgQA = dynamic_cast<AliQAv1 *>(f->Get("QA")) ;
+ fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
if ( ! fgQA )
fgQA = new AliQAv1() ;
- }
+ }
return fgQA ;
}
if ( ! fgQA) {
TFile * f = GetQAResultFile() ;
- fgQA = dynamic_cast<AliQAv1 *>(f->Get("QA")) ;
+ fgQA = static_cast<AliQAv1 *>(f->Get("QA")) ;
if ( ! fgQA )
- fgQA = new AliQAv1(det) ;
+ fgQA = new AliQAv1(det) ;
}
fgQA->Set(det) ;
return fgQA ;
AliInfoClass("fgQA = gAlice->GetQA()") ;
break ;
case kESD:
- AliInfoClass("fgQA = dynamic_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
+ AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
break ;
case kANA:
- AliInfoClass("fgQA = dynamic_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
+ AliInfoClass("fgQA = static_cast<AliQAv1 *> (esdFile->Get(\"QA\")") ;
break ;
case kNTASK:
break ;
if ( det == kNULLDET)
det = fDet ;
for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
- const Bool_t what = IsEventSpecieSet(ies) ;
- if ( what )
- ShowStatus(det, kNULLTASK, AliRecoParam::Convert(ies)) ;
+ if ( IsEventSpecieSet(ies) )
+ ShowStatus(det, kNULLTASK, AliRecoParam::ConvertIndex(ies)) ;
}
}
for (index = 0 ; index < kNDET ; index++) {
for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
for (Int_t ies = 0 ; ies < fNEventSpecies ; ies++) {
- const Bool_t what = IsEventSpecieSet(ies) ;
- if ( what )
- ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::Convert(ies)) ;
+ if ( IsEventSpecieSet(ies) )
+ ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::ConvertIndex(ies)) ;
}
}
}
fInitCDBCalled(kFALSE),
fSetRunNumberFromDataCalled(kFALSE),
fQADetectors("ALL"),
- fQAManager(NULL),
fQATasks("ALL"),
fRunQA(kTRUE),
fRunGlobalQA(kTRUE),
fInitCDBCalled(rec.fInitCDBCalled),
fSetRunNumberFromDataCalled(rec.fSetRunNumberFromDataCalled),
fQADetectors(rec.fQADetectors),
- fQAManager(NULL),
fQATasks(rec.fQATasks),
fRunQA(rec.fRunQA),
fRunGlobalQA(rec.fRunGlobalQA),
fInitCDBCalled = rec.fInitCDBCalled;
fSetRunNumberFromDataCalled = rec.fSetRunNumberFromDataCalled;
fQADetectors = rec.fQADetectors;
- fQAManager = NULL;
fQATasks = rec.fQATasks;
fRunQA = rec.fRunQA;
fRunGlobalQA = rec.fRunGlobalQA;
if (fInitQACalled) return;
fInitQACalled = kTRUE;
- fQAManager = AliQAManager::QAManager("rec") ;
+ AliQAManager * qam = AliQAManager::QAManager("rec") ;
if (fWriteQAExpertData)
- fQAManager->SetWriteExpert() ;
+ qam->SetWriteExpert() ;
- if (fQAManager->IsDefaultStorageSet()) {
+ if (qam->IsDefaultStorageSet()) {
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliWarning("Default QA reference storage has been already set !");
AliWarning(Form("Ignoring the default storage declared in AliReconstruction: %s",fQARefUri.Data()));
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- fQARefUri = fQAManager->GetDefaultStorage()->GetURI();
+ fQARefUri = qam->GetDefaultStorage()->GetURI();
} else {
if (fQARefUri.Length() > 0) {
AliDebug(2,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
- fQAManager->SetDefaultStorage(fQARefUri);
+ qam->SetDefaultStorage(fQARefUri);
}
if (fRunQA) {
- fQAManager->SetActiveDetectors(fQADetectors) ;
+ qam->SetActiveDetectors(fQADetectors) ;
for (Int_t det = 0 ; det < AliQAv1::kNDET ; det++) {
- fQAManager->SetCycleLength(AliQAv1::DETECTORINDEX_t(det), fQACycles[det]) ;
- fQAManager->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
+ qam->SetCycleLength(AliQAv1::DETECTORINDEX_t(det), fQACycles[det]) ;
+ qam->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
}
if (!fRawReader && !fInput && fQATasks.Contains(AliQAv1::kRAWS))
fQATasks.ReplaceAll(Form("%d",AliQAv1::kRAWS), "") ;
- fQAManager->SetTasks(fQATasks) ;
- fQAManager->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ;
+ qam->SetTasks(fQATasks) ;
+ qam->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ;
}
if (fRunGlobalQA) {
Bool_t sameCycle = kFALSE ;
- AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQAv1::kGLOBAL);
+ AliQADataMaker *qadm = qam->GetQADataMaker(AliQAv1::kGLOBAL);
AliInfo(Form("Initializing the global QA data maker"));
if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS))) {
qadm->StartOfCycle(AliQAv1::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
{
//Initialize the QA and start of cycle
AliCodeTimerAuto("") ;
- if ( ! fQAManager ) {
- AliFatal("Hum... this should not happen") ;
- } else {
- fQAManager->Merge(AliCDBManager::Instance()->GetRun(),fileName) ;
- }
+ AliQAManager::QAManager()->Merge(AliCDBManager::Instance()->GetRun(),fileName) ;
AliSysInfo::AddStamp("MergeQA") ;
}
const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
reconstructor->SetRecoParam(par);
if (fRunQA) {
- fQAManager->SetRecoParam(iDet, par) ;
+ AliQAManager::QAManager()->SetRecoParam(iDet, par) ;
}
}
}
// QA on single raw
if (fRunQA) {
- fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- fQAManager->RunOneEvent(fRawReader) ;
+ AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+ AliQAManager::QAManager()->RunOneEvent(fRawReader) ;
}
// local single event reconstruction
if (!fRunLocalReconstruction.IsNull()) {
if (fCleanESD) CleanESD(fesd);
if (fRunQA) {
- fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- fQAManager->RunOneEvent(fesd) ;
+ AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+ AliQAManager::QAManager()->RunOneEvent(fesd) ;
}
if (fRunGlobalQA) {
- AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQAv1::kGLOBAL);
+ AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
if (qadm && fQATasks.Contains(Form("%d", AliQAv1::kESDS)))
qadm->Exec(AliQAv1::kESDS, fesd);
}
if (fRunQA || fRunGlobalQA)
- fQAManager->Increment() ;
+ AliQAManager::QAManager()->Increment() ;
return kTRUE;
}
// End of cycle for the in-loop
if (fRunQA)
- fQAManager->EndOfCycle() ;
+ AliQAManager::QAManager()->EndOfCycle() ;
if (fRunGlobalQA) {
- AliQADataMaker *qadm = fQAManager->GetQADataMaker(AliQAv1::kGLOBAL);
+ AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
if (qadm) {
if (fQATasks.Contains(Form("%d", AliQAv1::kRECPOINTS)))
qadm->EndOfCycle(AliQAv1::kRECPOINTS);
} else {
reconstructor->Reconstruct(digitsTree, clustersTree);
if (fRunQA) {
- fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- fQAManager->RunOneEventInOneDetector(iDet, digitsTree) ;
+ AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+ AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, digitsTree) ;
}
}
loader->UnloadDigits();
}
-
- TString detQAStr(fQADetectors) ;
if (fRunQA) {
- fQAManager->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
- fQAManager->RunOneEventInOneDetector(iDet, clustersTree) ;
+ AliQAManager::QAManager()->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+ AliQAManager::QAManager()->RunOneEventInOneDetector(iDet, clustersTree) ;
}
- loader->WriteRecPoints("OVERWRITE");
- loader->UnloadRecPoints();
- AliSysInfo::AddStamp(Form("LRec%s_%d",fgkDetectorName[iDet],eventNr), iDet,1,eventNr);
+ loader->WriteRecPoints("OVERWRITE");
+ loader->UnloadRecPoints();
+ AliSysInfo::AddStamp(Form("LRec%s_%d",fgkDetectorName[iDet],eventNr), iDet,1,eventNr);
}
if ((detStr.CompareTo("ALL") != 0) && !detStr.IsNull()) {
AliError(Form("the following detectors were not found: %s",
AliInfo("running tracking");
+
//Fill the ESD with the T0 info (will be used by the TOF)
if (fReconstructor[11] && fLoader[11]) {
fLoader[11]->LoadRecPoints("READ");
AliSysInfo::AddStamp(Form("RLoadCluster0%s_%d",fgkDetectorName[iDet],eventNr), iDet,1, eventNr);
tree = fLoader[iDet]->TreeR();
if (!tree) {
- AliError(Form("Can't get the %s cluster tree", fgkDetectorName[iDet]));
- return kFALSE;
+ AliError(Form("Can't get the %s cluster tree", fgkDetectorName[iDet]));
+ return kFALSE;
}
fTracker[iDet]->LoadClusters(tree);
AliSysInfo::AddStamp(Form("TLoadCluster0%s_%d",fgkDetectorName[iDet],eventNr), iDet,2, eventNr);
// run tracking
if (iDet>1) // start filling residuals for the "outer" detectors
- if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
-
+ if (fRunGlobalQA) {
+ AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
+ TObjArray ** arr = AliTracker::GetResidualsArray() ;
+ if ( ! arr[fRecoParam.GetEventSpecie()]->At(0) ) {
+ AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
+ qadm->InitRecPointsForTracker() ;
+ }
+ }
if (fTracker[iDet]->PropagateBack(esd) != 0) {
AliError(Form("%s backward propagation failed", fgkDetectorName[iDet]));
// return kFALSE;
// run tracking
if (iDet<2) // start filling residuals for TPC and ITS
- if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
-
+ if (fRunGlobalQA) {
+ AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
+ TObjArray ** arr = AliTracker::GetResidualsArray() ;
+ if ( ! arr[fRecoParam.GetEventSpecie()]->At(0) ) {
+ AliQADataMaker *qadm = AliQAManager::QAManager()->GetQADataMaker(AliQAv1::kGLOBAL);
+ qadm->InitRecPointsForTracker() ;
+ }
+ }
+
if (fTracker[iDet]->RefitInward(esd) != 0) {
AliError(Form("%s inward refit failed", fgkDetectorName[iDet]));
// return kFALSE;
ffile = NULL;
}
- delete fQAManager;
- fQAManager = NULL;
-
+ AliQAManager::Destroy() ;
+
TGeoGlobalMagField::Instance()->SetField(NULL);
}
Int_t fQACycles[ AliQAv1::kNDET]; // # events over which QA data are accumulated
Bool_t fQAWriteExpert[AliQAv1::kNDET]; // Flag to save or not expert QA data
TString fQADetectors ; // list of detectors to be QA'ed
- AliQAManager * fQAManager ; //! steering class to run QA
TString fQATasks ; // list of QA tasks to be performed
Bool_t fRunQA ; // Run QA flag
Bool_t fRunGlobalQA; // Run global QA flag
fLego(NULL),
fQADetectors("ALL"),
fQATasks("ALL"),
- fQAManager(NULL),
fRunQA(kTRUE),
fEventSpecie(AliRecoParam::kDefault),
fWriteQAExpertData(kTRUE),
SetGAliceFile("galice.root");
// for QA
- fQAManager = AliQAManager::QAManager("sim") ;
- fQAManager->SetActiveDetectors(fQADetectors) ;
+ AliQAManager * qam = AliQAManager::QAManager("sim") ;
+ qam->SetActiveDetectors(fQADetectors) ;
fQATasks = Form("%d %d %d", AliQAv1::kHITS, AliQAv1::kSDIGITS, AliQAv1::kDIGITS) ;
- fQAManager->SetTasks(fQATasks) ;
+ qam->SetTasks(fQATasks) ;
}
//_____________________________________________________________________________
fSpecCDBUri.Delete();
if (fgInstance==this) fgInstance = 0;
- delete fQAManager ;
-
+ AliQAManager:: Destroy() ;
AliCodeTimer::Instance()->Print();
}
if (fInitCDBCalled) return;
fInitCDBCalled = kTRUE;
- fQAManager = AliQAManager::QAManager("sim") ;
- fQAManager->SetActiveDetectors(fQADetectors) ;
+ AliQAManager * qam = AliQAManager::QAManager("sim") ;
+ qam->SetActiveDetectors(fQADetectors) ;
fQATasks = Form("%d %d %d", AliQAv1::kHITS, AliQAv1::kSDIGITS, AliQAv1::kDIGITS) ;
- fQAManager->SetTasks(fQATasks) ;
+ qam->SetTasks(fQATasks) ;
if (fWriteQAExpertData)
- fQAManager->SetWriteExpert() ;
+ qam->SetWriteExpert() ;
- if (fQAManager->IsDefaultStorageSet()) {
+ if (qam->IsDefaultStorageSet()) {
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliWarning("Default QA reference storage has been already set !");
AliWarning(Form("Ignoring the default storage declared in AliSimulation: %s",fQARefUri.Data()));
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- fQARefUri = fQAManager->GetDefaultStorage()->GetURI();
+ fQARefUri = qam->GetDefaultStorage()->GetURI();
} else {
if (fQARefUri.Length() > 0) {
AliDebug(2,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
AliWarning(Form("Setting it now to: %s", fQARefUri.Data()));
AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
- fQAManager->SetDefaultStorage(fQARefUri);
+ qam->SetDefaultStorage(fQARefUri);
}
}
{
// run the digitization and produce summable digits
static Int_t eventNr=0;
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("") ;
// initialize CDB storage, run number, set CDB lock
InitCDB();
// run the QA on summable hits, digits or digits
if(!gAlice) return kFALSE;
- fQAManager->SetRunLoader(AliRunLoader::Instance()) ;
+ AliQAManager::QAManager()->SetRunLoader(AliRunLoader::Instance()) ;
TString detectorsw("") ;
Bool_t rv = kTRUE ;
- fQAManager->SetEventSpecie(fEventSpecie) ;
- detectorsw = fQAManager->Run(fQADetectors.Data()) ;
+ AliQAManager::QAManager()->SetEventSpecie(fEventSpecie) ;
+ detectorsw = AliQAManager::QAManager()->Run(fQADetectors.Data()) ;
if ( detectorsw.IsNull() )
rv = kFALSE ;
return rv ;
tempo.ReplaceAll(Form("%d", AliQAv1::kDIGITS), AliQAv1::GetTaskName(AliQAv1::kDIGITS)) ;
AliInfo( Form("QA will be done on \"%s\" for \"%s\"\n", fQADetectors.Data(), tempo.Data()) ) ;
fRunQA = kTRUE ;
- fQAManager->SetActiveDetectors(fQADetectors) ;
- fQAManager->SetTasks(fQATasks) ;
+ AliQAManager::QAManager()->SetActiveDetectors(fQADetectors) ;
+ AliQAManager::QAManager()->SetTasks(fQATasks) ;
for (Int_t det = 0 ; det < AliQAv1::kNDET ; det++)
- fQAManager->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
+ AliQAManager::QAManager()->SetWriteExpert(AliQAv1::DETECTORINDEX_t(det)) ;
return kTRUE;
}
//Quality Assurance
Int_t GetDetIndex(const char * detector);
- void SetQACycles(AliQAv1::DETECTORINDEX_t det, const Int_t cycles) { fQAManager->SetCycleLength(det, cycles) ; }
+ void SetQACycles(AliQAv1::DETECTORINDEX_t det, const Int_t cycles) { AliQAManager::QAManager()->SetCycleLength(det, cycles) ; }
Bool_t RunQA() ;
Bool_t SetRunQA(TString detAndAction="ALL:ALL") ;
- void SetQAWriteExpert(AliQAv1::DETECTORINDEX_t det) { fQAManager->SetWriteExpert(det) ; }
+ void SetQAWriteExpert(AliQAv1::DETECTORINDEX_t det) { AliQAManager::QAManager()->SetWriteExpert(det) ; }
void SetQARefDefaultStorage(const char* uri);
void InitQA();
void SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; }
static const char * fgkDetectorName[fgkNDetectors] ; // names of detectors
TString fQADetectors ; // list of detectors to be QA'ed
TString fQATasks ; // list of QA tasks to be performed
- AliQAManager * fQAManager ; // steering object to run QA
Bool_t fRunQA ; // Runs the QA at the end of simulation
AliRecoParam::EventSpecie_t fEventSpecie ; // type of event (see AliRecoParam::EventSpecie_t)
Bool_t fWriteQAExpertData ; //! decides wheter or not to write experts QA data; true by default
#include "AliGeomManager.h"
#include "AliCluster.h"
#include "AliKalmanTrack.h"
+#include "AliGlobalQADataMaker.h"
extern TGeoManager *gGeoManager;
if (!residuals) return;
TH1F *h=0;
+ Int_t esIndex = AliRecoParam::AConvert(fEventSpecie) ;
AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
- h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-2);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-2);
h->Fill(residuals[0]);
- h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-1);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-1);
h->Fill(residuals[1]);
if (layer==5) {
if (p[1]<0) { // SSD1 absolute residuals
- ((TH1F*)fResiduals[fEventSpecie]->At(40))->Fill(t->GetY()-p[0]); //C side
- ((TH1F*)fResiduals[fEventSpecie]->At(41))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[esIndex]->At(40))->Fill(t->GetY()-p[0]); //C side
+ ((TH1F*)fResiduals[esIndex]->At(41))->Fill(t->GetZ()-p[1]);
} else {
- ((TH1F*)fResiduals[fEventSpecie]->At(42))->Fill(t->GetY()-p[0]); //A side
- ((TH1F*)fResiduals[fEventSpecie]->At(43))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[esIndex]->At(42))->Fill(t->GetY()-p[0]); //A side
+ ((TH1F*)fResiduals[esIndex]->At(43))->Fill(t->GetZ()-p[1]);
}
}
if (layer==6) { // SSD2 absolute residuals
if (p[1]<0) {
- ((TH1F*)fResiduals[fEventSpecie]->At(44))->Fill(t->GetY()-p[0]); //C side
- ((TH1F*)fResiduals[fEventSpecie]->At(45))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[esIndex]->At(44))->Fill(t->GetY()-p[0]); //C side
+ ((TH1F*)fResiduals[esIndex]->At(45))->Fill(t->GetZ()-p[1]);
} else {
- ((TH1F*)fResiduals[fEventSpecie]->At(46))->Fill(t->GetY()-p[0]); //A side
- ((TH1F*)fResiduals[fEventSpecie]->At(47))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[esIndex]->At(46))->Fill(t->GetY()-p[0]); //A side
+ ((TH1F*)fResiduals[esIndex]->At(47))->Fill(t->GetZ()-p[1]);
}
}
Double_t residuals[2]={trkLoc[0]-clsLoc[0], trkLoc[2]-clsLoc[2]};
TH1F *h=0;
+ Int_t esIndex = AliRecoParam::AConvert(fEventSpecie) ;
AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
- h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-2);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-2);
h->Fill(residuals[0]);
- h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-1);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-1);
h->Fill(residuals[1]);
}
const AliCluster *c, Bool_t updated=kTRUE);
static void SetFillResiduals(AliRecoParam::EventSpecie_t es, Bool_t flag=kTRUE) { fFillResiduals=flag; fEventSpecie = es ;}
static void SetResidualsArray(TObjArray **arr) { fResiduals=arr; }
+ static TObjArray ** GetResidualsArray() { return fResiduals; }
protected:
AliTracker(const AliTracker &atr);
// do the QA checking
AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
if ( task == AliQAv1::kRAWS ) {
const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
}
- GetRawsData(205)->SetOption("COLZ");
- GetRawsData(206)->SetOption("COLZ");
- GetRawsData(207)->SetOption("COLZ");
- GetRawsData(205)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(206)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(205)->GetYaxis()->SetTitle("NeventsReg/Nevents");
- GetRawsData(206)->GetYaxis()->SetTitle("NeventsReg/Nevents");
- GetRawsData(207)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(207)->GetYaxis()->SetTitle("Charge, #channels");
- }
- if ( task == AliQAv1::kDIGITSR) {
- GetDigitsData(0)->SetOption("COLZ");
- GetDigitsData(1)->SetOption("COLZ");
- GetDigitsData(2)->SetOption("COLZ");
-
- }
- if ( task == AliQAv1::kRECPOINTS) {
- GetRecPointsData(0)->SetOption("COLZ");
- GetRecPointsData(1)->SetOption("COLZ");
- GetRecPointsData(0)->GetXaxis()->SetTitle("#PMT");
- GetRecPointsData(1)->GetXaxis()->SetTitle("#PMT");
- GetRecPointsData(0)->GetYaxis()->SetTitle("CFD time");
- GetRecPointsData(1)->GetYaxis()->SetTitle("Charge, #channels");
}
}
}
// TH2F* fhEffCFD = new TH2F("hEffCFD"," CFD time",24, 0 ,24,
// 100,-500,500);
TH2F* fhEffCFD = new TH2F("hEffCFD"," CFD time;Time [ns];Counts",24, 0 ,24, 50, 0,5);
-
+ fhEffCFD->SetOption("COLZ");
Add2RawsList( fhEffCFD,205, !expert, !image, saveCorr);
TH2F* fhEffLED = new TH2F("hEffLED","LED time;Time [ns];Counts",24, 0 ,24,
100, 0, 5);
//100,-500,500);
-
+ fhEffLED->SetOption("COLZ");
Add2RawsList( fhEffLED,206, !expert, !image, saveCorr);
TH2F* fhEffQTC = new TH2F("hEffQTC","QTC amplitude%s;Amplitude [ADC counts];Counts",24, 0 ,24, 100,0,7000);
+ fhEffQTC->SetOption("COLZ");
Add2RawsList( fhEffQTC,207, !expert, !image, saveCorr);
//eyes guide line
// TH2F* fhLineQTC = new TH2F("hLineQTC","QTC amplitude boeder",24, 0 ,24,
// 100,0,7000);
// Add2RawsList( fhLineQTC,208, !expert, !image, saveCorr);
+ const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
+ for (Int_t itr=0; itr<6; itr++) {
+ GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
+ GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
+ }
}
//____________________________________________________________________________
const Bool_t image = kTRUE ;
TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD digits[#channels]",25,-0.5,24.5,100,0,1000);
+ fhDigCFD->SetOption("COLZ");
Add2DigitsList( fhDigCFD,0, !expert, image);
TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; LED-CFD amplitude ",25,-0.5,24.5,100,100,1000);
+ fhDigLEDamp->SetOption("COLZ");
Add2DigitsList( fhDigLEDamp,1, !expert, image);
TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; QTC amplitude",25,-0.5,24.5,100,100,10000);
+ fhDigQTC->SetOption("COLZ");
Add2DigitsList( fhDigQTC,2, !expert, image);}
//____________________________________________________________________________
TH2F* fhRecCFD = new TH2F("hRecCFD"," CFD time;Time [ns];Counts",24, 0 ,24,
100,-50,50);
+ fhRecCFD->SetOption("COLZ");
Add2RecPointsList ( fhRecCFD,0, !expert, image);
TH2F* fhRecAmpDiff = new TH2F("hRecAmpDiff"," LED-CFD min QTC amplitude;Amplitude [ADC counts];Counts",
24, 0 ,24, 200,-10,10);
+ fhRecAmpDiff->SetOption("COLZ");
Add2RecPointsList (fhRecAmpDiff, 1, !expert, image);
TH1F *fhMean = new TH1F("hMean","online - rec mean;online - rec mean[#channels];",2000, -1000, 1000);
Add2RecPointsList ( fhMean,2, !expert, image);
- }
+
+}
//____________________________________________________________________________
void AliT0QADataMakerRec::InitESDs()
//____________________________________________________________________________
void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
{
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
rawReader->Reset() ;
//fills QA histos for RAW
Int_t shift=0;
{
//fills QA histos for Digits
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
TArrayI *digCFD = new TArrayI(24);
TArrayI *digLED = new TArrayI(24);
TArrayI *digQT0 = new TArrayI(24);
return;
}
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
brRec->GetEntry(0);
for ( Int_t i=0; i<24; i++) {
{
//fills QA histos for ESD
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
GetESDsData(0) -> Fill(esd->GetT0());
GetESDsData(1)-> Fill(esd->GetT0zVertex());
-/**************************************************************************
+;/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
if (ntracks<=0) return;
// Start loop on tracks in the hits containers
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
for (Int_t track=0; track<ntracks;track++) {
branch->GetEntry(track);
Int_t nhits = hits->GetEntriesFast();
AliError(Form("EXEC Branch T0 digits not found"));
return;
}
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
digitsTree->GetEvent(0);
digitsTree->GetEntry(0);
brDigits->GetEntry(0);
Int_t count[AliRecoParam::kNSpecies] = { 0 };
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
test[specie] = 1.0 ;
if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
continue ;
TIter next(list[specie]) ;
TH1 * hdata ;
count[specie] = 0 ;
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
- if (hdata) {
+ while ( (hdata = static_cast<TH1 *>(next())) ) {
+ if (hdata && hdata->InheritsFrom("TH1")) {
Double_t rv = 0.;
if(hdata->GetEntries()>0)rv=1;
AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ;
h3->Sumw2() ;
h3->GetYaxis()->SetTitleOffset(1.15);
Add2DigitsList(h3, 3, !expert, image) ;
-
}
//____________________________________________________________________________
const Bool_t expert = kTRUE ;
const Bool_t image = kTRUE ;
-
+
TH1F * h0 = new TH1F("hTOFRecPoints", "Number of TOF RecPoints;TOF recPoint number [10 power];Counts",301, -1.02, 5.) ;
h0->Sumw2() ;
Add2RecPointsList(h0, 0, !expert, image) ;
h4->Sumw2() ;
h4->GetYaxis()->SetTitleOffset(1.15);
Add2RecPointsList(h4, 4, !expert, image) ;
-
}
//____________________________________________________________________________
//
// makes data from Raws
//
-
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
//
// makes data from Digits
//
+
Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
Int_t in[5];
GetMapIndeces(in,out);
GetDigitsData(3)->Fill( out[0],out[1]) ;//digit map
}
-
}
//____________________________________________________________________________
//
// makes data from Digit Tree
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
TClonesArray * digits = new TClonesArray("AliTOFdigit", 1000) ;
TBranch * branch = digitTree->GetBranch("TOF") ;
// Make data from Clusters
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
//
// make QA data from ESDs
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
Int_t ntrk = esd->GetNumberOfTracks() ;
Int_t ntof=0;
Int_t ntofpid=0;
Float_t ratio = (Float_t)ntofpid/(Float_t)ntof*100.;
GetESDsData(4)->Fill(ratio) ;
}
-
}
//____________________________________________________________________________
{
//Detector specific actions at end of cycle
// do the QA checking
-
AliQAChecker::Instance()->Run(AliQAv1::kTOF, task, list) ;
}
//____________________________________________________________________________
//make QA data from Hits
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
Int_t in[5];
Int_t out[5];
//
if(!hitTree){
AliError("can't get the tree with TOF hits !");
- return;
+ return;
}
TBranch * branch = hitTree->GetBranch("TOF") ;
//
// makes data from Digits
//
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3;
Int_t in[5];
// makes data from SDigits
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3;
Int_t in[5];
Int_t out[5];
void AliTPCQADataMakerRec::MakeESDs(AliESDEvent * esd)
{
// make QA data from ESDs
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(KClusters) )
+ InitESDs() ;
const Int_t nESDTracks = esd->GetNumberOfTracks();
Int_t nTPCtracks = 0;
// To make QA for the RAW data we use the TPC Calibration framework
// to handle the data and then in the end extract the data
//
- rawReader->Reset() ;
+ if ( ! GetRawsData(kOccupancy) )
+ InitRaws() ;
+
+ rawReader->Reset() ;
fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)]->ProcessEvent(rawReader);
}
//____________________________________________________________________________
void AliTPCQADataMakerRec::MakeDigits(TTree* digitTree)
{
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(kDigitsADC) )
+ InitDigits() ;
+
TBranch* branch = digitTree->GetBranch("Segment");
AliSimDigits* digArray = 0;
branch->SetAddress(&digArray);
//____________________________________________________________________________
void AliTPCQADataMakerRec::MakeRecPoints(TTree* recTree)
{
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(kQmaxShort) )
+ InitRecPoints() ;
+
AliTPCClustersRow *clrow = new AliTPCClustersRow();
clrow->SetClass("AliTPCclusterMI");
clrow->SetArray(0);
//____________________________________________________________________________
void AliTPCQADataMakerSim::MakeDigits(TTree* digitTree)
{
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(kDigitsADC) )
+ InitDigits() ;
+
TBranch* branch = digitTree->GetBranch("Segment");
AliSimDigits* digArray = 0;
branch->SetAddress(&digArray);
void AliTPCQADataMakerSim::MakeHits(TTree * hitTree)
{
// make QA data from Hit Tree
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(kNhits) )
+ InitHits() ;
+
const Int_t nTracks = hitTree->GetEntries();
TBranch* branch = hitTree->GetBranch("TPC2");
AliTPCv2* tpc = (AliTPCv2*)gAlice->GetDetector("TPC");
// loop over event types
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
//list[specie]->Print();
// fill detector map;
// create ratios
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
for(Int_t type = 0 ; type < 2 ; type++) {
for(Int_t i = 0 ; i < knRatio ; i++) {
TH1D *ratio = (TH1D*)list[specie]->At(19 + 2*i + type);
// Make QA data from ESDs
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
Int_t nTracks = esd->GetNumberOfTracks();
GetESDsData(0)->Fill(nTracks);
//
AliInfo("Execution of QA for Raw data");
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
//printf("Execution of QA for Raw data\n");
// create raw reader TB
// Info("MakeRecPoints", "making");
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRecPointsData(0) )
+ InitRecPoints() ;
+
Int_t nsize = Int_t(clustersTree->GetTotBytes() / (sizeof(AliTRDcluster)));
TObjArray *clusterArray = new TObjArray(nsize+1000);
// Make QA data from Hits
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
TIter next(hits);
AliTRDhit * hit;
TBranch *branch = hitTree->GetBranch("TRD");
if (!CheckPointer(branch, "TRD hits branch")) return;
-
+
Int_t nhits = (Int_t)(hitTree->GetTotBytes()/sizeof(AliTRDhit));
TClonesArray *hits = new TClonesArray("AliTRDhit", nhits+1000);
TClonesArray *tmp = new TClonesArray("AliTRDhit", 1000);
// Makes data from Digits
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
TIter next(digits) ;
AliTRDdigit * digit ;
//
// Makes data from digits tree
//
-
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
// Info("Make digits", "From a tree");
AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager();
Int_t nTbins = digitsIn->GetNtime();
for(Int_t row = 0; row < nRows; row++)
- for(Int_t col = 0; col < nCols; col++)
- for(Int_t time = 0; time < nTbins; time++)
- {
- Float_t signal = digitsIn->GetData(row,col,time);
- if (signal < 1) continue;
- histDet->Fill(i);
- histTime->Fill(time);
- histSignal->Fill(signal);
- }
-
- //delete digitsIn;
- }
+ for(Int_t col = 0; col < nCols; col++)
+ for(Int_t time = 0; time < nTbins; time++)
+ {
+ Float_t signal = digitsIn->GetData(row,col,time);
+ if (signal < 1) continue;
+ histDet->Fill(i);
+ histTime->Fill(time);
+ histSignal->Fill(signal);
+ }
+
+ //delete digitsIn;
+ }
delete digitsManager;
}
// Makes data from Digits
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
TIter next(sdigits) ;
AliTRDdigit * digit ;
while ( (digit = dynamic_cast<AliTRDdigit *>(next())) ) {
//
// Makes data from SDigits
//
-
+ // Check id histograms already created for this Event Specie
+ if ( ! GetSDigitsData(0) )
+ InitSDigits() ;
+
AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager();
digitsManager->SetSDigits(kTRUE);
digitsManager->CreateArrays();
AliQAChecker::Instance()->Run(AliQAv1::kVZERO, task, list) ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
+ continue ;
SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
if(task == AliQAv1::kRAWS){
int nMaxBin = GetRawsData(kPedestalTimeInt0)->GetNbinsY();
{
// makes data from Digits
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
GetDigitsData(0)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliVZEROdigit *VZERODigit ;
{
// Creates QA data from ESDs
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(kCellMultiV0A) )
+ InitESDs() ;
+
UInt_t eventType = esd->GetEventType();
switch (eventType){
{
// Fills histograms with Raws, computes average ADC values dynamically (pedestal subtracted)
- rawReader->Reset() ;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(kPedestalInt0) )
+ InitRaws() ;
+
+ rawReader->Reset() ;
AliVZERORawStream* rawStream = new AliVZERORawStream(rawReader);
rawStream->Next();
{
//make QA data from Hits
- GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
+ GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity
Int_t nhits = hits->GetEntriesFast();
for (Int_t ihit=0;ihit<nhits;ihit++)
{
AliError("Branch VZERO hit not found");
exit(111);
}
+ // Check id histograms already created for this Event Specie
+ if ( ! GetHitsData(0) )
+ InitHits() ;
+
Int_t ntracks = (Int_t) hitTree->GetEntries();
if (ntracks<=0) return;
{
// makes data from Digits
- GetDigitsData(0)->Fill(digits->GetEntriesFast()) ;
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
+ GetDigitsData(0)->Fill(digits->GetEntriesFast()) ;
TIter next(digits) ;
AliVZEROdigit *VZERODigit ;
while ( (VZERODigit = dynamic_cast<AliVZEROdigit *>(next())) ) {
//____________________________________________________________________________
AliZDCQADataMakerRec::AliZDCQADataMakerRec() :
- AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kZDC), "ZDC Quality Assurance Data Maker")
+ AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kZDC), "ZDC Quality Assurance Data Maker"),
+ fDigit(0)
{
// ctor
}
//____________________________________________________________________________
AliZDCQADataMakerRec::AliZDCQADataMakerRec(const AliZDCQADataMakerRec& qadm) :
- AliQADataMakerRec()
+ AliQADataMakerRec(),
+ fDigit(0)
{
//copy ctor
SetName((const char*)qadm.GetName());
{
// Filling Raws QA histos
//
+ // Check id histograms already created for this Event Specie
+ if ( ! GetRawsData(0) )
+ InitRaws() ;
+
rawReader->Reset() ;
Float_t sum_ZNC=0., sum_ZNA=0., sum_ZPC=0., sum_ZPA=0.;
Float_t sumQ_ZNC=0., sumQ_ZNA=0., sumQ_ZPC=0., sumQ_ZPA=0.;
//___________________________________________________________________________
void AliZDCQADataMakerRec::MakeDigits(TTree *digitTree )
{
- // makes data from Digit Tree
TBranch * branch = digitTree->GetBranch("ZDC");
if(!branch){
AliError("ZDC branch in Digit Tree not found");
return;
}
- AliZDCDigit* fDigit = NULL ;
- char** add = (char**) (branch->GetAddress());
- if(add){
- fDigit = (AliZDCDigit*)(*add);
- }
- else{
- if(!fDigit) fDigit = new AliZDCDigit();
- branch->SetAddress(&fDigit);
- }
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetDigitsData(0) )
+ InitDigits() ;
+
+ branch->SetAddress(&fDigit);
Int_t ndig = digitTree->GetEntries();
GetDigitsData(7)->Fill(adcSumQ_ZPA);
//
/*GetDigitsData(12)->Fill(adcSum_ZNC_lg);
- GetDigitsData(13)->Fill(adcSum_ZNA_lg);
- GetDigitsData(14)->Fill(adcSum_ZPC_lg);
- GetDigitsData(15)->Fill(adcSum_ZPA_lg);
- //
- GetDigitsData(16)->Fill(adcSumQ_ZNC_lg);
- GetDigitsData(17)->Fill(adcSumQ_ZNA_lg);
- GetDigitsData(18)->Fill(adcSumQ_ZPC_lg);
- GetDigitsData(19)->Fill(adcSumQ_ZPA_lg);*/
+ GetDigitsData(13)->Fill(adcSum_ZNA_lg);
+ GetDigitsData(14)->Fill(adcSum_ZPC_lg);
+ GetDigitsData(15)->Fill(adcSum_ZPA_lg);
+ //
+ GetDigitsData(16)->Fill(adcSumQ_ZNC_lg);
+ GetDigitsData(17)->Fill(adcSumQ_ZNA_lg);
+ GetDigitsData(18)->Fill(adcSumQ_ZPC_lg);
+ GetDigitsData(19)->Fill(adcSumQ_ZPA_lg);*/
}
//____________________________________________________________________________
{
// make QA data from ESDs
//
+
+ // Check id histograms already created for this Event Specie
+ if ( ! GetESDsData(0) )
+ InitESDs() ;
+
AliESDZDC * zdcESD = esd->GetESDZDC();
//
Double32_t * centr_ZNC = zdcESD->GetZNCCentroid();
#include "AliQADataMakerRec.h"
+
+class AliZDCDigit;
+
class AliZDCQADataMakerRec: public AliQADataMakerRec {
public:
virtual void StartOfDetectorCycle() ;
virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) ;
+ AliZDCDigit *fDigit; //! Pointer to digit in tree
+
ClassDef(AliZDCQADataMakerRec,1) // description
};
{\r
//filling QA histos for Hits\r
//\r
- TIter next(fHits); \r
+\r
+ // Check id histograms already created for this Event Specie\r
+ if ( ! GetHitsData(0) )\r
+ InitHits() ;\r
+ \r
+ TIter next(fHits); \r
AliZDCHit * hit; \r
while((hit = dynamic_cast<AliZDCHit *>(next()))){\r
if(hit->GetVolume(0)==1) GetHitsData(0)->Fill(hit->GetXImpact(),hit->GetYImpact());\r
AliError("ZDC branch in Digit Tree not found"); \r
return;\r
} \r
- char** add = (char**) (branch->GetAddress());\r
- if(add){\r
- fDigit = (AliZDCDigit*)(*add);\r
- } \r
- else{\r
- if(!fDigit) fDigit = new AliZDCDigit();\r
- branch->SetAddress(&fDigit);\r
- }\r
+ \r
+ // Check id histograms already created for this Event Specie\r
+ if ( ! GetDigitsData(0) )\r
+ InitDigits() ;\r
+ \r
+ branch->SetAddress(&fDigit);\r
\r
Int_t ndig = digitTree->GetEntries();\r
\r