#include "TClonesArray.h"
#include "TTree.h"
-#include "AliTRDrawStreamBase.h"
-
class TObjArray;
class TString;
class TBranch;
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; }
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);
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,
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);
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
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() {}