o small fix
[u/mrichter/AliRoot.git] / TRD / AliTRDrawData.h
CommitLineData
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"
c92d8baf 15#include "AliLog.h"
8eab6a01 16#include "AliTRDgeometry.h"
5990c064 17
b864d801 18class TTree;
eba523a2 19class TClonesArray;
2cb20be6 20
92c7f341 21class AliRunLoader;
22
b864d801 23class AliRawReader;
5990c064 24
2cb20be6 25class AliTRDdigitsManager;
dfd03fc3 26class AliTRDfeeParam;
b65e5048 27class AliTRDarrayADC;
a0446ff1 28class AliTRDdigitsParam;
50002f37 29class AliTRDmcmSim;
2cb20be6 30
5990c064 31class AliTRDrawData : public TObject {
32
33 public:
34
35 AliTRDrawData();
8c703901 36 AliTRDrawData(const AliTRDrawData &r);
5990c064 37 virtual ~AliTRDrawData();
5990c064 38
7925de54 39 AliTRDrawData &operator=(const AliTRDrawData &/*r*/) { return *this; }
8c703901 40
037c5823 41 virtual Bool_t Digits2Raw(TTree *digits, const TTree *tracks = NULL);
8c703901 42
625f5260 43 virtual AliTRDdigitsManager *Raw2Digits(AliRawReader *rawReader);
eba523a2 44
c92d8baf 45 void SetTracklets(TClonesArray*) { AliError("Deprecated, not doing anything."); }
46 void SetTracks(TClonesArray*) { AliError("Deprecated, not doing anything"); }
987ba9a3 47
8eab6a01 48 UInt_t GetTriggerFlags(const Int_t sector) const { return fTrgFlags[sector]; }
49
5990c064 50 protected:
51
50378239 52 virtual Bool_t Digits2Raw(AliTRDdigitsManager* digitsManager); // for fRawVersion > 0
6a04e92b 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);
d271a0f6 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
6a04e92b 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
50378239 60
92c7f341 61 AliRunLoader *fRunLoader; //! Run Loader
8c703901 62 AliTRDgeometry *fGeo; //! Geometry
dfd03fc3 63 AliTRDfeeParam *fFee; //! Fee Parameters
8c703901 64 Int_t fNumberOfDDLs; // Number of DDLs
eba523a2 65 TTree *fTrackletTree; //! Tree for tracklets
66
67 TClonesArray *fTracklets; //! Array of online tracklets
68 TClonesArray *fTracks; //! Array of GTU tracks
8c703901 69
987ba9a3 70 private:
71
d271a0f6 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
987ba9a3 75
d271a0f6 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)
8eab6a01 79 UInt_t fTrgFlags[AliTRDgeometry::kNsector]; // trigger flags
50002f37 80 AliTRDmcmSim *fMcmSim; //! MCM simulation for raw data output
d271a0f6 81 AliTRDdigitsParam *fDigitsParam; // Digits parameter
6a04e92b 82
eba523a2 83 ClassDef(AliTRDrawData,8) // TRD raw data class
987ba9a3 84
5990c064 85};
86#endif