]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDRawStream.cxx
debug is read from option string
[u/mrichter/AliRoot.git] / FMD / AliFMDRawStream.cxx
index 6cc5a330e611209f8c409faca134e02c5b583a40..4f5dc864b3586a16a4574ae5c88af39196db4b5a 100644 (file)
 // and the sample rate should be set explicitly. 
 //
 #include "AliFMDRawStream.h"           // ALIFMDRAWSTREAM_H
-#include <AliRawReader.h>              // ALIRAWREADER_H
+// #include <AliRawReader.h>           // ALIRAWREADER_H
 #include "AliFMDParameters.h"
 #include <AliLog.h>
-#include <iomanip>
-#include <iostream>
+// #include <iomanip>
+// #include <iostream>
 
 //____________________________________________________________________
 ClassImp(AliFMDRawStream)
@@ -42,7 +42,10 @@ ClassImp(AliFMDRawStream)
 AliFMDRawStream::AliFMDRawStream(AliRawReader* reader) 
   : AliAltroRawStream(reader)
 {
+  // CTOR 
   fNoAltroMapping = kFALSE;
+  // Select FMD DDL's 
+  SelectRawData("FMD");
 }
 
 //_____________________________________________________________________________
@@ -50,7 +53,8 @@ Bool_t
 AliFMDRawStream::ReadChannel(UInt_t& ddl, UInt_t& addr, 
                             UInt_t& len, UShort_t* data)
 {
-  UInt_t       prevddl   = 0;
+  // Read one channel and return.   Returns 0 when there's no more
+  // data. 
   Int_t        l         = 0;
   static Int_t last      = 0xFFFF; // 0xFFFF means signal is used
   Bool_t       next      = kTRUE;
@@ -65,13 +69,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  = 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;