protection for det, module, row, col from lower and upper side to avoid crash
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 25 Oct 2009 04:23:29 +0000 (04:23 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 25 Oct 2009 04:23:29 +0000 (04:23 +0000)
PMD/AliPMDClusterFinder.cxx

index c533836..6d838d8 100644 (file)
@@ -394,13 +394,13 @@ void AliPMDClusterFinder::Digits2RecPoints(TTree *digitsTree,
              AliError(Form("*CPV/PRE NUMBER WRONG %d *",det));
              continue; 
            }
-         if(smn == -1)
+         if(smn == -1 || smn > 23)
            {
              AliError(Form("*MODULE NUMBER WRONG %d *",smn));
              continue; 
            }
 
-         if(xpos < 0 || xpos > 48 || ypos < 0 || ypos > 96)
+         if(xpos < 0 || xpos > 47 || ypos < 0 || ypos > 95)
            {
              AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
                            xpos, ypos));
@@ -633,17 +633,18 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
          Int_t col = pmdddl->GetColumn();
          Int_t sig = pmdddl->GetSignal();
 
+
          if(det < 0 || det > 1)
            {
              AliError(Form("*CPV/PRE NUMBER WRONG %d *",det));
              continue; 
            }
-         if(smn == -1)
+         if(smn < 0 || smn > 23)
            {
              AliError(Form("*MODULE NUMBER WRONG %d *",smn));
              continue; 
            }
-         if(row < 0 || row > 48 || col < 0 || col > 96)
+         if(row < 0 || row > 47 || col < 0 || col > 95)
            {
              AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
                            row, col));
@@ -651,6 +652,7 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
              continue; 
            }
 
+
          // Pedestal Subtraction
          Int_t   pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,row,col);
          Int_t   pedrms1    = (Int_t) pedmeanrms%100;