fSuperModuleData.Add(new AliEMCALSuperModuleCalibAbs(i));
}
fSuperModuleData.Compress(); // compress the TObjArray
+ fSuperModuleData.SetOwner(kTRUE);
}
//____________________________________________________________________________
// list of values to be read
// first: overall values for the whole SuperModule
- Int_t iCalibMethod;
- Int_t iCalibPass;
- Float_t absoluteCalib;
+ Int_t iCalibMethod = 0;
+ Int_t iCalibPass = 0;
+ Float_t absoluteCalib = 0;
// third: info for each tower
- Float_t relativeCalib; // (ADC>GeV relative gain/conversion), value around 1
+ Float_t relativeCalib = 0; // (ADC>GeV relative gain/conversion), value around 1
// end - all values
Int_t nAPDPerSM = AliEMCALGeoParams::fgkEMCALCols * AliEMCALGeoParams::fgkEMCALRows;
for (Int_t i = 0; i < fNSuperModule; i++) {
AliEMCALSuperModuleCalibAbs * t = (AliEMCALSuperModuleCalibAbs*) fSuperModuleData[i];
if (!inputFile) {
- printf("AliEMCALCalibAbs::ReadCalibAbsInfo - Error while reading input file; likely EOF..");
+ printf("AliEMCALCalibAbs::ReadCalibAbsInfo - Error while reading input file; likely EOF..\n");
return;
}
inputFile >> iSM;
// third: info for each tower
for (Int_t j=0; j<nAPDPerSM; j++) {
- inputFile >> iCol >> iRow
- >> relativeCalib;
+ inputFile >> iCol >> iRow >> relativeCalib;
+
+ // check that input values are not out bounds
+ if (iCol<0 || iCol>(AliEMCALGeoParams::fgkEMCALCols-1) ||
+ iRow<0 || iRow>(AliEMCALGeoParams::fgkEMCALRows-1) ) {
+ printf("AliEMCALCalibAbs::ReadCalibAbsInfo - Error while reading input file; j %d iCol %d iRow %d\n", j, iCol, iRow);
+ return;
+ }
// assume that this info is already swapped and done for this basis?
if (swapSides) {
Int_t iSM = 0; // SuperModule index
// list of values to be read
// first: overall values for the whole SuperModule
- Int_t iCalibMethod;
+ Int_t iCalibMethod = 0;
Int_t iCalibPass = 0;
Float_t absoluteCalib = 0;
// third: info for each tower