]>
Commit | Line | Data |
---|---|---|
5990c064 | 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 */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Converts TRD digits into a raw data stream // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "TObject.h" | |
15 | ||
b864d801 | 16 | class TTree; |
eba523a2 | 17 | class TClonesArray; |
2cb20be6 | 18 | |
92c7f341 | 19 | class AliRunLoader; |
20 | ||
b864d801 | 21 | class AliRawReader; |
5990c064 | 22 | |
2cb20be6 | 23 | class AliTRDdigitsManager; |
8c703901 | 24 | class AliTRDgeometry; |
dfd03fc3 | 25 | class AliTRDfeeParam; |
b65e5048 | 26 | class AliTRDarrayADC; |
a0446ff1 | 27 | class AliTRDdigitsParam; |
50002f37 | 28 | class AliTRDmcmSim; |
2cb20be6 | 29 | |
5990c064 | 30 | class AliTRDrawData : public TObject { |
31 | ||
32 | public: | |
33 | ||
34 | AliTRDrawData(); | |
8c703901 | 35 | AliTRDrawData(const AliTRDrawData &r); |
5990c064 | 36 | virtual ~AliTRDrawData(); |
5990c064 | 37 | |
7925de54 | 38 | AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; } |
8c703901 | 39 | |
037c5823 | 40 | virtual Bool_t Digits2Raw(TTree *digits, const TTree *tracks = NULL); |
8c703901 | 41 | |
625f5260 | 42 | virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader); |
eba523a2 | 43 | |
44 | virtual TClonesArray *TrackletsArray(); | |
45 | virtual TClonesArray *TracksArray(); | |
46 | void SetTrackletsOwner(TClonesArray *trkl = 0x0) { fTracklets = trkl; } // set to own the given array | |
47 | void SetTracksOwner(TClonesArray *trk = 0x0) { fTracks = trk; } // set to own the given array | |
987ba9a3 | 48 | |
5990c064 | 49 | protected: |
50 | ||
50378239 | 51 | virtual Bool_t Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0 |
6a04e92b | 52 | virtual Int_t ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM); |
d271a0f6 | 53 | void ProduceSMIndexData(UInt_t *buf, Int_t& nw); // SM index words and header - real data format |
54 | 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 | |
55 | void AssignStackMask(UInt_t *buf, Int_t nStack); // re-assignment of stack mask in the SM index word | |
6a04e92b | 56 | void AssignLinkMask(UInt_t *buf, Int_t nLayer); // re-assignment of link mask in the stack index word |
57 | 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 | |
58 | Bool_t ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words | |
50378239 | 59 | |
92c7f341 | 60 | AliRunLoader *fRunLoader; //! Run Loader |
8c703901 | 61 | AliTRDgeometry *fGeo; //! Geometry |
dfd03fc3 | 62 | AliTRDfeeParam *fFee; //! Fee Parameters |
8c703901 | 63 | Int_t fNumberOfDDLs; // Number of DDLs |
eba523a2 | 64 | TTree *fTrackletTree; //! Tree for tracklets |
65 | ||
66 | TClonesArray *fTracklets; //! Array of online tracklets | |
67 | TClonesArray *fTracks; //! Array of GTU tracks | |
8c703901 | 68 | |
987ba9a3 | 69 | private: |
70 | ||
d271a0f6 | 71 | static Int_t fgDataSuppressionLevel; // Data suppression level - 0:no su, 1: su, 2: deep suppression |
72 | static const UInt_t fgkEndOfTrackletMarker = 0x10001000; // This marks the end of tracklet data words | |
73 | static const UInt_t fgkEndOfDataMarker = 0x00000000; // This marks the end of HC data words | |
987ba9a3 | 74 | |
d271a0f6 | 75 | Int_t fSMindexPos; // Position of SM index word |
76 | Int_t fStackindexPos; // Position of SM index word | |
77 | UInt_t fEventCounter; // Event counter(starting from 1) | |
50002f37 | 78 | AliTRDmcmSim *fMcmSim; //! MCM simulation for raw data output |
d271a0f6 | 79 | AliTRDdigitsParam *fDigitsParam; // Digits parameter |
6a04e92b | 80 | |
eba523a2 | 81 | ClassDef(AliTRDrawData,8) // TRD raw data class |
987ba9a3 | 82 | |
5990c064 | 83 | }; |
84 | #endif |