///////////////////////////////////////////////////////////////////////
/*
+ Modified by bvonhall on 03/11/2010
+ - modified declaration of hTrmChannels035 and hTrmChannels3671 in EndOfDetectorCycle()
+ to prevent memory corruption
+
Modified by adecaro on 18/10/2010
- fTOFRawStream object set as private member
#include "AliTOFChannelOnlineStatusArray.h"
+
ClassImp(AliTOFQADataMakerRec)
//____________________________________________________________________________
for (Int_t sm=0;sm<10;sm++){
delete fLineSMid035[sm];
delete fLineSMid3671[sm];
- }
+ }
}
//----------------------------------------------------------------------------
//Detector specific actions at end of cycle
// do the QA checking
- TH1F * hTrmChannels035 = new TH1F("hTrmchannels035", "Active channels per TRM - crates 0 to 35;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 0., 361.) ;
- TH1F * hTrmChannels3671 = new TH1F("hTrmChannels3671","Active channels per TRM - crates 36 to 71 ;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 360., 721.) ;
-
-
+ TH1F hTrmChannels035("hTrmchannels035", "Active channels per TRM - crates 0 to 35;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 0., 361.) ;
+ TH1F hTrmChannels3671("hTrmChannels3671","Active channels per TRM - crates 36 to 71 ;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 360., 721.) ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
//normalize TRM hits plots to the number of enabled channels from OCDB object
//TH1F * hTrmChannels035 = new TH1F("hTrmchannels035", "Active channels per TRM - crates 0 to 35;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 0., 361.) ;
//TH1F * hTrmChannels3671 = new TH1F("hTrmChannels3671","Active channels per TRM - crates 36 to 71 ;TRM index = SMid(crate*10)+TRM(0-9);Active channels", 361, 360., 721.) ;
- if (hTrmChannels035) hTrmChannels035->Clear();
- if (hTrmChannels3671) hTrmChannels3671->Clear();
+ hTrmChannels035.Clear();
+ hTrmChannels3671.Clear();
for (Int_t ch = 0; ch < fCalibData->GetSize(); ch++) {
if (!(fCalibData->GetNoiseStatus(ch)==AliTOFChannelOnlineStatusArray::kTOFNoiseBad)
&& (fCalibData->GetHWStatus(ch) == AliTOFChannelOnlineStatusArray::kTOFHWOk)){
Int_t detId[5];
AliTOFGeometry::GetVolumeIndices(ch,geoId);
AliTOFRawStream::Geant2EquipmentId(geoId,detId); //detID=(ddl,trm,tdc, chain,channel)
- if (detId[0]<36) hTrmChannels035->Fill((detId[1]-3)+detId[0]*10);
- else hTrmChannels3671->Fill((detId[1]-3)+detId[0]*10);
+ if (detId[0]<36) hTrmChannels035.Fill((detId[1]-3)+detId[0]*10);
+ else hTrmChannels3671.Fill((detId[1]-3)+detId[0]*10);
}
}
- GetRawsData(16)->Divide(hTrmChannels035);
+ GetRawsData(16)->Divide(&hTrmChannels035);
GetRawsData(16)->SetTitle("TRMs average hit number per active channel - crates 0-35");
GetRawsData(16)->GetYaxis()->SetTitle("hits/active channels");
- GetRawsData(17)->Divide(hTrmChannels3671);
+ GetRawsData(17)->Divide(&hTrmChannels3671);
GetRawsData(17)->SetTitle("TRMs average hit number per active channel - crates 36-71");
GetRawsData(17)->GetYaxis()->SetTitle("hits/active channels");
-
- //if (hTrmChannels035) delete hTrmChannels035;
- //if (hTrmChannels3671) delete hTrmChannels3671;
-
}
//set minima and maxima to allow log scale
}
}
- if (hTrmChannels035) delete hTrmChannels035;
- if (hTrmChannels3671) delete hTrmChannels3671;
-
AliQAChecker::Instance()->Run(AliQAv1::kTOF, task, list) ;
}
//____________________________________________________________________________