]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDrawData.h
New raw data simulation by WooJin
[u/mrichter/AliRoot.git] / TRD / AliTRDrawData.h
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
16 class TTree;
17
18 class AliRawReader;
19
20 class AliTRDdigitsManager;
21 class AliTRDgeometry;
22 class AliTRDfeeParam;
23 class AliTRDdataArrayS;
24
25 class AliTRDrawData : public TObject {
26
27  public:
28
29   AliTRDrawData();
30   AliTRDrawData(const AliTRDrawData &r);
31   virtual ~AliTRDrawData();
32
33   AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
34
35   virtual Bool_t       Digits2Raw(TTree *digits, TTree *tracks = NULL);
36
37   virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
38   virtual AliTRDdigitsManager *Raw2DigitsOLD(AliRawReader *rawReader);
39   static void SetRawFormatVersion(Int_t iver){ fgRawFormatVersion=iver; };
40
41   enum FORMATTYPE
42     {
43       kRawOldFormat  =  0,
44       kRawNewFormat  =  1
45     };
46
47  protected:
48
49   virtual Bool_t       Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
50   virtual Int_t        ProduceHcData(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent);
51   virtual Int_t        ProduceHcDataV1andV2(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
52   virtual Int_t        ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent);
53   //virtual Int_t      ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
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); // writes tracklet-endmarker and additional words between tracklet and raw-data
56           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
57   
58   AliTRDgeometry      *fGeo;            //! Geometry
59   AliTRDfeeParam      *fFee;            //! Fee Parameters
60   Int_t                fNumberOfDDLs;   //  Number of DDLs
61
62   ClassDef(AliTRDrawData,5)             //  TRD raw data class
63
64  private:
65
66         static       Int_t  fgRawFormatVersion;                                 // simulation raw data version - 0:old , 1:new(real data format)
67         static const UInt_t fgkEndOfTrackletMarker  = 0x10001000;   // This marks the end of tracklet data words
68
69
70
71 };
72 #endif
73
74
75
76
77
78