Adding protection in case calibrations contain invalid value markers.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 18:10:43 +0000 (18:10 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 18:10:43 +0000 (18:10 +0000)
HLT/MUON/OnlineAnalysis/AliHLTMUONClusterFinderComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.cxx

index ce3188c..8396698 100644 (file)
@@ -517,6 +517,8 @@ int AliHLTMUONClusterFinderComponent::ReadConfigFromCDB(
                AliMUONRecoParam* recoParam = NULL;
                try
                {
+                       //TODO:
+                       HLTWarning("Have not yet implemented loading reco params from CDB! Using AliMUONRecoParam::GetLowFluxParam().");
                        //result = LoadRecoParamsFromCDB(recoParam);
                        //if (result != 0) return result;
                        recoParam = AliMUONRecoParam::GetLowFluxParam();
index 6694294..b7f39fa 100644 (file)
@@ -1163,6 +1163,23 @@ int AliHLTMUONHitReconstructorComponent::ReadLutFromCDB()
                                        pedestal = (calibData.Pedestals(detElemId, manuId))->ValueAsFloat(channelId, 0);
                                        sigma = (calibData.Pedestals(detElemId, manuId))->ValueAsFloat(channelId, 1);
                                        
+                                       // Check if any of the values fetched from the calibration data are
+                                       // invalid. If they are then skip this pad.
+                                       if (calibA0Coeff == AliMUONVCalibParam::InvalidFloatValue() or
+                                           calibA1Coeff == AliMUONVCalibParam::InvalidFloatValue() or
+                                           thresold == AliMUONVCalibParam::InvalidFloatValue() or
+                                           saturation == AliMUONVCalibParam::InvalidFloatValue() or
+                                           pedestal == AliMUONVCalibParam::InvalidFloatValue() or
+                                           sigma == AliMUONVCalibParam::InvalidFloatValue()
+                                          )
+                                       {
+                                               HLTWarning("Skipping pad on detection element %d, MANU %d, channel %d, since"
+                                                       " the calibration data contains invalid values in that channel.",
+                                                       detElemId, manuId, channelId
+                                               );
+                                               continue;
+                                       }
+                                       
                                        if (plane == 0)
                                                halfPadSize = padSizeX;
                                        else