Coverity.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Jun 2011 07:39:05 +0000 (07:39 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Jun 2011 07:39:05 +0000 (07:39 +0000)
VZERO/AliVZEROQADataMakerRec.cxx

index 0f317c0..b86b88b 100644 (file)
@@ -242,13 +242,13 @@ void AliVZEROQADataMakerRec::InitESDs()
        Float_t maxWidth = 0.;
        for(int i=0;i<8;i++){
                if(fCalibData->GetTimeResolution(i)>0.){
-                       Int_t matchWin = 25.*fCalibData->GetMatchWindow(i);
-                       if(matchWin>maxTdc) {
-                               maxTdc = matchWin;
-                               nTdcBin = matchWin/fCalibData->GetTimeResolution(i);
-                       }
+                 Float_t matchWin = 25.*(Float_t)fCalibData->GetMatchWindow(i);
+                 if(matchWin>maxTdc) {
+                   maxTdc = matchWin;
+                   nTdcBin = TMath::Nint(matchWin/fCalibData->GetTimeResolution(i));
+                 }
                }
-               Int_t w = kNTdcWidthBins*fCalibData->GetWidthResolution(i);
+               Float_t w = (Float_t)kNTdcWidthBins*fCalibData->GetWidthResolution(i);
                if(w>maxWidth) maxWidth = w;
        }