]>
Commit | Line | Data |
---|---|---|
a38a7850 | 1 | // XEmacs -*-C++-*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTTPCDIGITREADERPACKED_H | |
5 | #define ALIHLTTPCDIGITREADERPACKED_H | |
6 | ||
e962f438 | 7 | //* This file is property of and copyright by the ALICE HLT Project * |
8 | //* ALICE Experiment at CERN, All rights reserved. * | |
9 | //* See cxx source for full Copyright notice * | |
a38a7850 | 10 | |
84645eb0 | 11 | /** @file AliHLTTPCDigitReaderPacked.h |
27f5f8ed | 12 | @author Timm Steinbeck, Jochen Thaeder, Matthias Richter, Kenneth Aamodt |
84645eb0 | 13 | @date |
14 | @brief A digit reader implementation for simulated, packed TPC 'raw' data. | |
15 | */ | |
16 | ||
aff6e981 | 17 | //#define ENABLE_PAD_SORTING 1 |
a38a7850 | 18 | |
19 | #include "AliHLTTPCDigitReader.h" | |
adc5a9e9 | 20 | #include <vector> |
a38a7850 | 21 | |
22 | class AliRawReaderMemory; | |
23 | class AliTPCRawStream; | |
24 | ||
84645eb0 | 25 | /** |
26 | * @class AliHLTTPCDigitReaderPacked | |
27 | * A digit reader implementation for simulated, packed TPC 'raw' data. | |
aff6e981 | 28 | * Includes reordering of the pads by default, sorting (and time and |
29 | * memory consuming intermediate storing of the data) can be disabled | |
e962f438 | 30 | * by @ref SetUnsorted() with argument <b>kTRUE</b>. |
297174de | 31 | * |
84645eb0 | 32 | * @ingroup alihlt_tpc |
33 | */ | |
a38a7850 | 34 | class AliHLTTPCDigitReaderPacked : public AliHLTTPCDigitReader{ |
35 | public: | |
84645eb0 | 36 | /** standard constructor */ |
37 | AliHLTTPCDigitReaderPacked(); | |
84645eb0 | 38 | /** destructor */ |
39 | virtual ~AliHLTTPCDigitReaderPacked(); | |
a38a7850 | 40 | |
84645eb0 | 41 | /** |
42 | * Init the reader with a data block. | |
43 | * The function fetches the first and last row for the readout partition | |
e962f438 | 44 | * from @ref AliHLTTPCTransform. |
84645eb0 | 45 | * @param ptr pointer to data buffer |
46 | * @param size size of the data buffer | |
47 | * @param patch patch (readout partition) number within the slice | |
48 | * @param slice sector no (0 to 35) | |
49 | */ | |
50 | Int_t InitBlock(void* ptr,ULong_t size, Int_t patch, Int_t slice); | |
5863c71a | 51 | int Reset(); |
aff6e981 | 52 | void SetUnsorted(bool unsorted){fUnsorted=unsorted;} |
f44e97dc | 53 | Bool_t NextSignal(); |
84645eb0 | 54 | Int_t GetRow(); |
55 | Int_t GetPad(); | |
56 | Int_t GetSignal(); | |
57 | Int_t GetTime(); | |
adc5a9e9 | 58 | bool NextChannel(); |
59 | int NextBunch(); | |
70d0b23e | 60 | AliHLTUInt32_t GetAltroBlockHWaddr() const; |
adc5a9e9 | 61 | int GetBunchSize(); |
62 | const UInt_t* GetSignals(); | |
63 | Int_t GetTimeOfUnsortedSignal(); | |
db16520a | 64 | |
a38a7850 | 65 | protected: |
db16520a | 66 | |
a38a7850 | 67 | private: |
8f8bf0af | 68 | /** copy constructor prohibited */ |
69 | AliHLTTPCDigitReaderPacked(const AliHLTTPCDigitReaderPacked&); | |
70 | /** assignment operator prohibited */ | |
71 | AliHLTTPCDigitReaderPacked& operator=(const AliHLTTPCDigitReaderPacked&); | |
72 | ||
5863c71a | 73 | /** |
74 | * Instance handling of the buffer to hold the sorted data. | |
75 | * In order to keep memory consumption small, one global buffer will be used | |
76 | * for the sorted data. | |
77 | * This can actually be extended in order to support more than one global | |
78 | * instance provided by a scheduler, but thats overkill for the moment. | |
79 | */ | |
80 | static Int_t* GetBufferInstance(); | |
81 | ||
82 | /** | |
83 | * Release an instance of the decoder. | |
84 | */ | |
85 | static void ReleaseBufferInstance(Int_t* pInstance); | |
86 | ||
27f5f8ed | 87 | // Initialize AliROOT TPC raw stream parsing class |
aff6e981 | 88 | AliRawReaderMemory *fRawMemoryReader; //!transient |
db16520a | 89 | |
aff6e981 | 90 | AliTPCRawStream *fTPCRawStream; //!transient |
a38a7850 | 91 | |
aff6e981 | 92 | //#if ENABLE_PAD_SORTING |
93 | Int_t fCurrentRow; //!transient | |
94 | Int_t fCurrentPad; //!transient | |
95 | Int_t fCurrentBin; //!transient | |
db16520a | 96 | |
aff6e981 | 97 | Int_t fRowOffset; //!transient |
98 | Int_t fNRows; //!transient | |
db16520a | 99 | |
5863c71a | 100 | static Int_t fNMaxRows; //!transient |
101 | static Int_t fNMaxPads; //!transient | |
102 | static Int_t fNTimeBins; //!transient | |
db16520a | 103 | |
13398559 | 104 | Int_t *fData; //!transient |
aff6e981 | 105 | //#endif // ENABLE_PAD_SORTING |
27f5f8ed | 106 | |
aff6e981 | 107 | Bool_t fUnsorted; //!transient |
27f5f8ed | 108 | |
5863c71a | 109 | vector<UInt_t> fDataBunch; //! transient |
110 | Bool_t fNextChannelFlag; //! transient | |
111 | Int_t fCurrentPatch; //! transient | |
112 | ||
113 | static Int_t* fgpFreeInstance; //! transient | |
114 | static Int_t* fgpIssuedInstance; //! transient | |
115 | ||
116 | ClassDef(AliHLTTPCDigitReaderPacked, 4) | |
db16520a | 117 | |
a38a7850 | 118 | }; |
a38a7850 | 119 | |
74c73e5a | 120 | #endif |