]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDrawData.h
Moveing AliNeutralTrackParam to STEERBase to avoid dependence of libAOD on libESD
[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 AliRunLoader;
19
20 class AliRawReader;
21
22 class AliTRDdigitsManager;
23 class AliTRDgeometry;
24 class AliTRDfeeParam;
25 class AliTRDarrayADC;
26 class AliTRDdigitsParam;
27
28 class AliTRDrawData : public TObject {
29
30  public:
31
32   AliTRDrawData();
33   AliTRDrawData(const AliTRDrawData &r);
34   virtual ~AliTRDrawData();
35
36   AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
37
38   virtual Bool_t       Digits2Raw(TTree *digits, const TTree *tracks = NULL);
39
40   virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
41   Bool_t WriteTracklets(Int_t det);
42
43  protected:
44
45   virtual Bool_t       Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
46   virtual Int_t        ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM);
47           void         ProduceSMIndexData(UInt_t *buf, Int_t& nw);                              // SM index words and header - real data format
48           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
49           void         AssignStackMask(UInt_t *buf, Int_t nStack);  // re-assignment of stack mask in the SM index word
50           void         AssignLinkMask(UInt_t *buf, Int_t nLayer);   // re-assignment of link mask in the stack index word
51           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 
52           Bool_t       ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words
53   
54   AliRunLoader        *fRunLoader;      //! Run Loader
55   AliTRDgeometry      *fGeo;            //! Geometry
56   AliTRDfeeParam      *fFee;            //! Fee Parameters
57   Int_t                fNumberOfDDLs;   //  Number of DDLs
58   TTree               *fTrackletTree;        //! Tree for tracklets
59   UInt_t              **fTrackletContainer;  //! tracklet container
60
61  private:
62
63   static       Int_t  fgDataSuppressionLevel;               // Data suppression level - 0:no su, 1: su, 2: deep suppression 
64   static const UInt_t fgkEndOfTrackletMarker  = 0x10001000; // This marks the end of tracklet data words
65   static const UInt_t fgkEndOfDataMarker      = 0x00000000; // This marks the end of HC data words
66
67   Int_t   fSMindexPos;                // Position of SM index word
68   Int_t   fStackindexPos;             // Position of SM index word
69   UInt_t  fEventCounter;              // Event counter(starting from 1)
70   AliTRDdigitsParam *fDigitsParam;    // Digits parameter
71
72   ClassDef(AliTRDrawData,7)             //  TRD raw data class
73
74 };
75 #endif