Fixing ReadTrackerDDL(): resize data size array in subEventTracker if size of data...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Apr 2006 08:07:24 +0000 (08:07 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Apr 2006 08:07:24 +0000 (08:07 +0000)
MUON/AliMUONRawReader.cxx

index e196669..3389bf3 100644 (file)
@@ -273,8 +273,10 @@ Int_t AliMUONRawReader::ReadTrackerDDL(AliRawReader* rawReader)
 
                  index   += kBusPatchHeaderSize;
                  dataSize = subEventTracker->GetLength();
+                 Int_t bufSize = subEventTracker->GetBufSize();
 
                  if(dataSize>0) { // check data present
+                    if (dataSize > bufSize) subEventTracker->SetAlloc(dataSize);
 
                    //copy buffer into data structure
                    memcpy(subEventTracker->GetData(), &buffer[index], dataSize*4); 
@@ -287,6 +289,7 @@ Int_t AliMUONRawReader::ReadTrackerDDL(AliRawReader* rawReader)
                      manuId    = subEventTracker->GetManuId(iData);
                      channelId = subEventTracker->GetChannelId(iData);
                      charge    = subEventTracker->GetCharge(iData);
+                     
                      // set charge
                      digit->SetSignal(charge);
           digit->SetPhysicsSignal(charge);