Bug fixed to take care of thearray length going beyond the limit
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Oct 2009 05:12:59 +0000 (05:12 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Oct 2009 05:12:59 +0000 (05:12 +0000)
PMD/AliPMDCalibGain.cxx

index 8bdccaa..61e3d12 100644 (file)
@@ -413,6 +413,10 @@ Bool_t AliPMDCalibGain::ProcessEvent(AliRawReader *rawReader, TObjArray *pmdddlc
                        {
                          id1 = irow + neibx[ii];
                          jd1 = icol + neiby[ii];
+                         if (id1 < 0) id1 = 0;
+                         if (id1 > kMaxRow-1) id1 = kMaxRow - 1;
+                         if (jd1 < 0) jd1 = 0;
+                         if (jd1 > kMaxCol-1) jd1 = kMaxCol - 1;
                          if(d1[idet][ismn][id1][jd1] == 0)
                            {
                              isocount++;