Minor fixes
[u/mrichter/AliRoot.git] / FMD / AliFMDRawStream.cxx
index 6cc5a330e611209f8c409faca134e02c5b583a40..7c47e9591b704c83df5d060c6e50f2d9eed9d3f0 100644 (file)
@@ -43,6 +43,8 @@ AliFMDRawStream::AliFMDRawStream(AliRawReader* reader)
   : AliAltroRawStream(reader)
 {
   fNoAltroMapping = kFALSE;
+  // Select FMD DDL's 
+  SelectRawData(AliFMDParameters::kBaseDDL>>8);
 }
 
 //_____________________________________________________________________________
@@ -50,7 +52,6 @@ Bool_t
 AliFMDRawStream::ReadChannel(UInt_t& ddl, UInt_t& addr, 
                             UInt_t& len, UShort_t* data)
 {
-  UInt_t       prevddl   = 0;
   Int_t        l         = 0;
   static Int_t last      = 0xFFFF; // 0xFFFF means signal is used
   Bool_t       next      = kTRUE;
@@ -65,13 +66,12 @@ AliFMDRawStream::ReadChannel(UInt_t& ddl, UInt_t& addr,
        AliDebug(15, Form("New hardware address, was 0x%x, now 0x%x", 
                          GetPrevHWAddress(), GetHWAddress()));
        addr = GetPrevHWAddress();
-       ddl  = AliFMDParameters::kBaseDDL + prevddl;
-       len  = l+1;
+       ddl  = AliFMDParameters::kBaseDDL + GetPrevDDLNumber();
+       len  = l+1; // Need to add one - l points to last valid index
        last = signal;
        break;
       }
     }
-    prevddl  = GetPrevDDLNumber();
     Int_t t  = GetTime();
     l        = TMath::Max(l, t);
     data[t]  = signal;