1 #ifndef ALITRDRAWDATA_H
2 #define ALITRDRAWDATA_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////////
10 // Converts TRD digits into a raw data stream //
12 ///////////////////////////////////////////////////////////////////////////////
16 #include "AliTRDgeometry.h"
25 class AliTRDdigitsManager;
28 class AliTRDdigitsParam;
31 class AliTRDrawData : public TObject {
36 AliTRDrawData(const AliTRDrawData &r);
37 virtual ~AliTRDrawData();
39 AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
41 virtual Bool_t Digits2Raw(TTree *digits, const TTree *tracks = NULL);
43 virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
45 void SetTracklets(TClonesArray*) { AliError("Deprecated, not doing anything."); }
46 void SetTracks(TClonesArray*) { AliError("Deprecated, not doing anything"); }
48 UInt_t GetTriggerFlags(const Int_t sector) const { return fTrgFlags[sector]; }
52 virtual Bool_t Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
53 virtual Int_t ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM);
54 void ProduceSMIndexData(UInt_t *buf, Int_t& nw); // SM index words and header - real data format
55 void WriteIntermediateWords(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // real data format
56 void AssignStackMask(UInt_t *buf, Int_t nStack); // re-assignment of stack mask in the SM index word
57 void AssignLinkMask(UInt_t *buf, Int_t nLayer); // re-assignment of link mask in the stack index word
58 Int_t AddStackIndexWords(UInt_t *buf, Int_t nStack, Int_t nMax); // add stack index words and stack header when there is no data for the stack
59 Bool_t ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words
61 AliRunLoader *fRunLoader; //! Run Loader
62 AliTRDgeometry *fGeo; //! Geometry
63 AliTRDfeeParam *fFee; //! Fee Parameters
64 Int_t fNumberOfDDLs; // Number of DDLs
65 TTree *fTrackletTree; //! Tree for tracklets
67 TClonesArray *fTracklets; //! Array of online tracklets
68 TClonesArray *fTracks; //! Array of GTU tracks
72 static Int_t fgDataSuppressionLevel; // Data suppression level - 0:no su, 1: su, 2: deep suppression
73 static const UInt_t fgkEndOfTrackletMarker = 0x10001000; // This marks the end of tracklet data words
74 static const UInt_t fgkEndOfDataMarker = 0x00000000; // This marks the end of HC data words
76 Int_t fSMindexPos; // Position of SM index word
77 Int_t fStackindexPos; // Position of SM index word
78 UInt_t fEventCounter; // Event counter(starting from 1)
79 UInt_t fTrgFlags[AliTRDgeometry::kNsector]; // trigger flags
80 AliTRDmcmSim *fMcmSim; //! MCM simulation for raw data output
81 AliTRDdigitsParam *fDigitsParam; // Digits parameter
83 ClassDef(AliTRDrawData,8) // TRD raw data class