- support for no. of timebins != 3*n
authorjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Sep 2012 20:57:05 +0000 (20:57 +0000)
committerjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Sep 2012 20:57:05 +0000 (20:57 +0000)
TRD/AliTRDrawStream.cxx

index c3359e6..64e5fbc 100644 (file)
@@ -1699,7 +1699,11 @@ Int_t AliTRDrawStream::ReadZSData()
          fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb0);
        else
          tb0 = -1;
+       if (currentTimebin >= fCurrNtimebins)
+         break;
        fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb1);
+       if (currentTimebin >= fCurrNtimebins)
+         break;
        fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb2);
 
        adcwc++;
@@ -1859,7 +1863,11 @@ Int_t AliTRDrawStream::ReadNonZSData()
          fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb0);
        else
          tb0 = -1;
+       if (currentTimebin >= fCurrNtimebins)
+         break;
        fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb1);
+       if (currentTimebin >= fCurrNtimebins)
+         break;
        fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb2);
 
        adcwc++;