]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDrawStream.h
2D Centrality files
[u/mrichter/AliRoot.git] / TRD / AliTRDrawStream.h
index bfc56b5bb19ab9fdb0b392a6866c6d90d4f8d118..4b50242b09abb00d62d47b256f29fcd270277931 100644 (file)
@@ -15,8 +15,6 @@
 #include "TClonesArray.h"
 #include "TTree.h"
 
-#include "AliTRDrawStreamBase.h"
-
 class TObjArray;
 class TString;
 class TBranch;
@@ -28,12 +26,19 @@ class AliTRDarrayADC;
 class AliTRDSignalIndex;
 class AliTRDtrackletContainer;
 
-class AliTRDrawStream : public AliTRDrawStreamBase
+#define TRDMAXTBINS 63
+#define TRDMAXADC   21
+#define TRDMAXMCM   4 * 16
+#define MAXTRACKLETSPERHC 256
+
+class AliTRDrawStream : public TObject
 {
  public:
   AliTRDrawStream(AliRawReader *rawReader = 0x0);
   ~AliTRDrawStream();
 
+  enum { kDDLOffset = 0x400 };                                // Offset for DDL numbers
+
   Bool_t SetReader(AliRawReader *rawReader) { fRawReader = rawReader; return kTRUE; }
   void SetDigitsManager(AliTRDdigitsManager *digMgr) { fDigitsManager = digMgr; }
   void SetTrackletArray(TClonesArray *ar) { fTracklets = ar; }
@@ -51,7 +56,7 @@ class AliTRDrawStream : public AliTRDrawStreamBase
 
   Bool_t NextDDL();
   Int_t NextChamber(AliTRDdigitsManager *digMgr, 
-                   UInt_t ** /* trackletContainer */, UShort_t ** /* errorContainer */);
+                   UInt_t ** /* trackletContainer */=NULL, UShort_t ** /* errorContainer */=NULL);
 
   Bool_t ConnectTracklets(TTree *trklTree);
 
@@ -60,11 +65,6 @@ class AliTRDrawStream : public AliTRDrawStreamBase
   void EnableErrorStorage()  { fStoreError = &AliTRDrawStream::StoreErrorTree; }
   void DisableErrorStorage() { fStoreError = &AliTRDrawStream::ForgetError; }
 
-  // legacy code, to be removed
-  Bool_t SetRawVersion(Int_t) { return kTRUE; }
-  void SetSharedPadReadout(Bool_t) {}
-  void SetNoErrorWarning() {}
-
   // error handling
   enum ErrorCode_t { 
     kUnknown = 0, 
@@ -143,16 +143,16 @@ class AliTRDrawStream : public AliTRDrawStreamBase
   AliTRDrawStats fStats;            // event statistics, clearing must be done by the user
 
   AliTRDrawStats* GetStats() { return &fStats; }
-  Int_t GetEventSize(Int_t sector) { return fStats.fStatsSector[sector].fBytes; }
-  Int_t GetNTracklets(Int_t sector) { return fStats.fStatsSector[sector].fNTracklets; }
-  Int_t GetNMCMs(Int_t sector) { return fStats.fStatsSector[sector].fNMCMs; }
-  Int_t GetNChannels(Int_t sector) { return fStats.fStatsSector[sector].fNChannels; }
+  Int_t GetEventSize(Int_t sector)  const { return fStats.fStatsSector[sector].fBytes; }
+  Int_t GetNTracklets(Int_t sector) const { return fStats.fStatsSector[sector].fNTracklets; }
+  Int_t GetNMCMs(Int_t sector)      const { return fStats.fStatsSector[sector].fNMCMs; }
+  Int_t GetNChannels(Int_t sector)  const { return fStats.fStatsSector[sector].fNChannels; }
 
   // raw data dumping
   void SetDumpMCM(Int_t det, Int_t rob, Int_t mcm, Bool_t dump = kTRUE);
 
-  Bool_t IsDumping() { return (fNDumpMCMs > 0); }
-  Bool_t DumpingMCM(Int_t det, Int_t rob, Int_t mcm);
+  Bool_t IsDumping() const { return (fNDumpMCMs > 0); }
+  Bool_t DumpingMCM(Int_t det, Int_t rob, Int_t mcm) const;
 
   void DumpRaw(TString title, UInt_t *start, Int_t length); 
 
@@ -199,8 +199,8 @@ class AliTRDrawStream : public AliTRDrawStreamBase
   void ForgetError() { return; }
   void (AliTRDrawStream::*fStoreError)();       //! function pointer to method used for storing the error
 
-  static const char* fgErrorMessages[kLastErrorCode];     // error messages corresponding to the error codes
-  static const Int_t fgErrorDebugLevel[kLastErrorCode];   // error debug level
+  static const char* fgkErrorMessages[kLastErrorCode];     // error messages corresponding to the error codes
+  static       Int_t fgErrorDebugLevel[kLastErrorCode];   // error debug level
   static       ErrorBehav_t fgErrorBehav[kLastErrorCode]; // bevhaviour in case of error of given type
 
   // I/O
@@ -209,7 +209,7 @@ class AliTRDrawStream : public AliTRDrawStreamBase
   AliTRDdigitsParam   *fDigitsParam;            // pointer to the parameters belonging to the digits
 
   TTree *fErrors;                               // tree containing the occured error codes
-  class AliTRDrawStreamError 
+  class AliTRDrawStreamError : public TObject {
   public: 
     AliTRDrawStreamError(Int_t error = 0, Int_t sector = -1, Int_t stack = -1, Int_t link = -1, Int_t rob = -1, Int_t mcm = -1); 
     virtual ~AliTRDrawStreamError() {}