]>
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; |
2cb20be6 | 17 | |
b864d801 | 18 | class AliRawReader; |
5990c064 | 19 | |
2cb20be6 | 20 | class AliTRDdigitsManager; |
8c703901 | 21 | class AliTRDgeometry; |
dfd03fc3 | 22 | class AliTRDfeeParam; |
b65e5048 | 23 | class AliTRDarrayADC; |
2cb20be6 | 24 | |
5990c064 | 25 | class AliTRDrawData : public TObject { |
26 | ||
27 | public: | |
28 | ||
29 | AliTRDrawData(); | |
8c703901 | 30 | AliTRDrawData(const AliTRDrawData &r); |
5990c064 | 31 | virtual ~AliTRDrawData(); |
5990c064 | 32 | |
7925de54 | 33 | AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; } |
8c703901 | 34 | |
7925de54 | 35 | virtual Bool_t Digits2Raw(TTree *digits, TTree *tracks = NULL); |
8c703901 | 36 | |
625f5260 | 37 | virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader); |
dfbb4bb9 | 38 | virtual AliTRDdigitsManager *Raw2DigitsOLD(AliRawReader *rawReader); |
987ba9a3 | 39 | static void SetRawFormatVersion(Int_t iver){ fgRawFormatVersion=iver; }; |
6a04e92b | 40 | static void SetSuppressionLevel(Int_t ilevel){ fgDataSuppressionLevel=ilevel; }; |
987ba9a3 | 41 | |
42 | enum FORMATTYPE | |
43 | { | |
44 | kRawOldFormat = 0, | |
45 | kRawNewFormat = 1 | |
46 | }; | |
5990c064 | 47 | |
48 | protected: | |
49 | ||
50378239 | 50 | virtual Bool_t Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0 |
6a04e92b | 51 | virtual Int_t ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM); |
b65e5048 | 52 | virtual Int_t ProduceHcDataV1andV2(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize); |
53 | virtual Int_t ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent); | |
54 | //virtual Int_t ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize); | |
987ba9a3 | 55 | void ProduceSMIndexData(UInt_t *buf, Int_t& nw); // SM index words and header - real data format |
1d93b218 | 56 | void WriteIntermediateWords(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // writes tracklet-endmarker and additional words between tracklet and raw-data |
987ba9a3 | 57 | void WriteIntermediateWordsV2(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // real data format |
6a04e92b | 58 | void AssignStackMask(UInt_t *buf, Int_t nStack); // re-assignment of stack mask in the SM index word |
59 | void AssignLinkMask(UInt_t *buf, Int_t nLayer); // re-assignment of link mask in the stack index word | |
60 | 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 | |
61 | Bool_t ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words | |
50378239 | 62 | |
8c703901 | 63 | AliTRDgeometry *fGeo; //! Geometry |
dfd03fc3 | 64 | AliTRDfeeParam *fFee; //! Fee Parameters |
8c703901 | 65 | Int_t fNumberOfDDLs; // Number of DDLs |
66 | ||
dfd03fc3 | 67 | ClassDef(AliTRDrawData,5) // TRD raw data class |
5990c064 | 68 | |
987ba9a3 | 69 | private: |
70 | ||
b65e5048 | 71 | static Int_t fgRawFormatVersion; // simulation raw data version - 0:old , 1:new(real data format) |
6a04e92b | 72 | static Int_t fgDataSuppressionLevel; // Data suppression level - 0:no su, 1: su, 2: deep suppression |
b65e5048 | 73 | static const UInt_t fgkEndOfTrackletMarker = 0x10001000; // This marks the end of tracklet data words |
987ba9a3 | 74 | |
6a04e92b | 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) | |
78 | ||
79 | ||
987ba9a3 | 80 | |
81 | ||
5990c064 | 82 | }; |
83 | #endif | |
96e6312d | 84 | |
85 | ||
86 | ||
87 | ||
88 | ||
89 |