Added docs and fixed a bug
[u/mrichter/AliRoot.git] / FMD / AliFMDRawReader.cxx
index 36ea8b9157760310ea0210b6a4dd9f5442da5c0f..95bfb86cb56d00c3815ec763cfd030eba87369d9 100644 (file)
 //
 // Class to read ADC values from a AliRawReader object. 
 //
-#include "AliLog.h"            // ALILOG_H
+// This class uses the AliFMDRawStreamer class to read the ALTRO
+// formatted data. 
+// 
+//          +-------+
+//          | TTask |
+//          +-------+
+//              ^
+//              |
+//      +-----------------+  <<references>>  +--------------+
+//      | AliFMDRawReader |<>----------------| AliRawReader |
+//      +-----------------+                  +--------------+
+//              |                                  ^
+//              | <<uses>>                         |
+//              V                                  |
+//      +-----------------+      <<uses>>          |
+//      | AliFMDRawStream |------------------------+
+//      +-----------------+
+//              |
+//              V
+//      +----------------+
+//      | AliAltroStream |
+//      +----------------+
+//
+#include <AliLog.h>            // ALILOG_H
 #include "AliFMD.h"            // ALIFMD_H
 #include "AliFMDDigit.h"       // ALIFMDDIGIT_H
 #include "AliFMDRawStream.h"   // ALIFMDRAWSTREAM_H 
 #include "AliRawReader.h"      // ALIRAWREADER_H 
 #include "AliFMDRawReader.h"   // ALIFMDRAWREADER_H 
-#include "TArrayI.h"           // ROOT_TArrayI
+#include <TArrayI.h>           // ROOT_TArrayI
 // #include <TClonesArray.h>   // ROOT_TClonesArray
 
 //____________________________________________________________________
@@ -37,7 +60,8 @@ AliFMDRawReader::AliFMDRawReader(AliFMD* fmd, AliRawReader* reader)
     fFMD(fmd),
     fReader(reader)
 {
-  SetSampleRate();
+  // Default CTOR
+  SetSampleRate(fmd->GetSampleRate());
 }
 
 
@@ -45,6 +69,7 @@ AliFMDRawReader::AliFMDRawReader(AliFMD* fmd, AliRawReader* reader)
 void
 AliFMDRawReader::Exec(Option_t*) 
 {
+  // Read raw data into the digits array
   if (!fReader->ReadHeader()) {
     Error("ReadAdcs", "Couldn't read header");
     return;