]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Enabled the rawreader to deal with ddl=-1 in a reasonable manner
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Aug 2008 14:45:39 +0000 (14:45 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Aug 2008 14:45:39 +0000 (14:45 +0000)
FMD/AliFMDRawReader.cxx

index ad896cee6aa032cd07ce7832013699254d449034..fba982b38ccbe345ce9e4edb2221b6563e06cfa5 100644 (file)
@@ -107,7 +107,8 @@ AliFMDRawReader::Exec(Option_t*)
 Bool_t
 AliFMDRawReader::ReadAdcs(TClonesArray* array) 
 {
-
+  
+  fReader->Select("FMD");
   // Read raw data into the digits array, using AliFMDAltroReader. 
   if (!array) {
     AliError("No TClonesArray passed");
@@ -138,6 +139,11 @@ AliFMDRawReader::ReadAdcs(TClonesArray* array)
   while (isGood) {
     isGood = input.ReadChannel(ddl, hwaddr, last, data);
     // if (!isGood) break;
+    if (ddl >= UInt_t(-1)) { 
+      AliFMDDebug(5, ("At end of event with %d digits", 
+                     array->GetEntriesFast()));
+      break;
+    }
 
     AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
     UShort_t det, sec, str;
@@ -147,6 +153,7 @@ AliFMDRawReader::ReadAdcs(TClonesArray* array)
                    "and hardware address 0x%x", ddl, hwaddr));
       continue;
     }
+    
     rate     = pars->GetSampleRate(det, ring, sec, str);
     stripMin = pars->GetMinStrip(det, ring, sec, str);
     stripMax = pars->GetMaxStrip(det, ring, sec, str);