From f022ce7e01a7d4966d6e693fab29b3576b55afd4 Mon Sep 17 00:00:00 2001 From: fronchet Date: Thu, 23 Jun 2011 08:56:50 +0000 Subject: [PATCH] coverity --- HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx | 50 ++++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx b/HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx index 10d14a6776d..b6acfe9d10c 100644 --- a/HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx +++ b/HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx @@ -158,40 +158,38 @@ AliHLTEMCALDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, if(!fBCMInitialised) { AliHLTEMCALMapper mapper(iter->fSpecification); - module = mapper.GetModuleFromSpec(iter->fSpecification); - for(Int_t x = 0; x < NXCOLUMNSMOD ; x++) // PTH - { - - for(Int_t z = 0; z < NZROWSMOD ; z++) // PTH - { - fDigitMakerPtr->SetBadChannel(x, z, fPedestalData->IsBadChannel(module, z+1, x+1)); - } - } - //delete fBadChannelMap; - fBCMInitialised = true; - } - + if (module = mapper.GetModuleFromSpec(iter->fSpecification)) + + for(Int_t x = 0; x < NXCOLUMNSMOD ; x++) // PTH + + for(Int_t z = 0; z < NZROWSMOD ; z++) // PTH + + fDigitMakerPtr->SetBadChannel(x, z, fPedestalData->IsBadChannel(module, z+1, x+1)); + + //delete fBadChannelMap; + fBCMInitialised = true; + } + if(!fGainsInitialised) { - AliHLTEMCALMapper mapper(iter->fSpecification);; - module = mapper.GetModuleFromSpec(iter->fSpecification); + AliHLTEMCALMapper mapper(iter->fSpecification); + if (module = mapper.GetModuleFromSpec(iter->fSpecification)) + + for(Int_t x = 0; x < NXCOLUMNSMOD; x++) //PTH + for(Int_t z = 0; z < NZROWSMOD; z++) //PTH + // FR setting gains + fDigitMakerPtr->SetGain(x, z, HGLGFACTOR, fCalibData->GetADCchannel(module, z, x)); - for(Int_t x = 0; x < NXCOLUMNSMOD; x++) //PTH - { - - for(Int_t z = 0; z < NZROWSMOD; z++) //PTH - { - // FR setting gains - fDigitMakerPtr->SetGain(x, z, HGLGFACTOR, fCalibData->GetADCchannel(module, z, x)); - } - } - fGainsInitialised = true; - } + + fGainsInitialised = true; + } + specification |= iter->fSpecification; tmpChannelData = reinterpret_cast(iter->fPtr); ret = fDigitMakerPtr->MakeDigits(tmpChannelData, size-(digitCount*sizeof(AliHLTCaloDigitDataStruct))); + if(ret == -1) { HLTError("Trying to write over buffer size"); -- 2.39.3