]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- fixing coverity issues
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 16:51:09 +0000 (16:51 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 16:51:09 +0000 (16:51 +0000)
HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.cxx
HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.h
HLT/PHOS/AliHLTPHOSRecoParamHandler.cxx

index de761ed3019090c3d63372eecd1231dbadc3c412..180f53f8b61a51d11f66f848166391e3a4ee1393 100644 (file)
@@ -62,7 +62,14 @@ int AliHLTPHOSClusterizerComponentNbyN::ScanConfigurationArgument(int argc, cons
         if (++i >= argc) return -EPROTO;
         argument = argv[i];
        AliHLTCaloClusterizerNbyN* tmp = dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr);
-        tmp->SetGridDimension(argument.Atoi());
+       if(tmp) 
+         {
+           tmp->SetGridDimension(argument.Atoi());
+         }
+       else 
+         {
+           return -1;
+         }
         return 1;
     }
     
index 8bdd1a1306b481588245d9f31dfb6c79a2f3d63d..3158f1b2ee25a2728e9534dbeb3961d5b0528371 100644 (file)
@@ -163,14 +163,18 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData,
       {
         AliHLTPHOSMapper mapper;
         Int_t module = mapper.GetModuleFromSpec(iter->fSpecification);
-        for(Int_t x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)
-        {
-           for(Int_t z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)
-           {
-               fDigitMakerPtr->SetGain(x, z, fCalibData->GetHighLowRatioEmc(5-module, z+1, x+1), fCalibData->GetADCchannelEmc(5-module, z+1, x+1));
-           }
+        if(module >= 0 && module < 5)
+          {
+            for(Int_t x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)
+              {
+                for(Int_t z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)
+                  {
+                    fDigitMakerPtr->SetGain(x, z, fCalibData->GetHighLowRatioEmc(5-module, z+1, x+1), fCalibData->GetADCchannelEmc(5-module, z+1, x+1));
+                  }
+              }
+            fGainsInitialised = true;
         }
-        fGainsInitialised = true;
+
       }
 
       specification |= iter->fSpecification;
index 13dd4b5213254c573f13363255c096ac444e8663..e3bc1fe4844667ab958ee3b7881f008f3f384c67 100644 (file)
@@ -19,7 +19,7 @@ class AliHLTPHOSRawAnalyzerCrudeComponent: public AliHLTPHOSRawAnalyzerComponent
   AliHLTPHOSRawAnalyzerCrudeComponent();
   virtual ~AliHLTPHOSRawAnalyzerCrudeComponent();
   AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & );
-  AliHLTPHOSRawAnalyzerCrudeComponent & operator = (const AliHLTPHOSRawAnalyzerCrudeComponent)
+  AliHLTPHOSRawAnalyzerCrudeComponent & operator = (const AliHLTPHOSRawAnalyzerCrudeComponent&)
   {
     return *this;
   };
index 7b45b6a46d859181171eeedf072f2850b64b4a3f..20dc530bbb7d7ab7bbcf010ee67f641e8469d2ae 100644 (file)
@@ -46,11 +46,12 @@ Float_t AliHLTPHOSRecoParamHandler::GetCorrectedEnergy ( Float_t e )
 void AliHLTPHOSRecoParamHandler::FillParameters()
 {
    //See header file for class documentation
-   if(fRecoParamPtr)
+  AliPHOSRecoParam *tmp = dynamic_cast<AliPHOSRecoParam*>(fRecoParamPtr);
+   if(tmp)
    {
-      fLogWeight = dynamic_cast<AliPHOSRecoParam*>(fRecoParamPtr)->GetEMCLogWeight();
-      fRecPointMemberThreshold = dynamic_cast<AliPHOSRecoParam*>(fRecoParamPtr)->GetEMCMinE();
-      fRecPointThreshold = dynamic_cast<AliPHOSRecoParam*>(fRecoParamPtr)->GetEMCClusteringThreshold();
+      fLogWeight = tmp->GetEMCLogWeight();
+      fRecPointMemberThreshold = tmp->GetEMCMinE();
+      fRecPointThreshold = tmp->GetEMCClusteringThreshold();
    }
 }