]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCDigitReaderUnpacked.h
Adding the vertex requirement
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderUnpacked.h
CommitLineData
a38a7850 1// XEmacs -*-C++-*-
2// @(#) $Id$
3
4#ifndef ALIHLTTPCDIGITREADERUNPACKED_H
5#define ALIHLTTPCDIGITREADERUNPACKED_H
6
297174de 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 AliHLTTPCDigitReaderUnpacked.h
12 @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
13 @date
14 @brief A digit reader implementation for unpacked TPC data.
15*/
a38a7850 16
17#include "AliHLTTPCDigitReader.h"
18#include "AliHLTTPCDigitData.h"
deba5d85 19class AliHLTTPCMapping;
a38a7850 20class AliHLTTPCDigitRowData;
21
84645eb0 22/**
e962f438 23 * @class AliHLTTPCDigitReaderUnpacked
84645eb0 24 * A digit reader implementation for unpacked TPC data.
25 * @ingroup alihlt_tpc
26 */
a38a7850 27class AliHLTTPCDigitReaderUnpacked : public AliHLTTPCDigitReader{
28public:
84645eb0 29 /** standard constructor */
a38a7850 30 AliHLTTPCDigitReaderUnpacked();
84645eb0 31 /** destructor */
a38a7850 32 virtual ~AliHLTTPCDigitReaderUnpacked();
5df0cbb9 33
34 /**
35 * Init the reader
36 * @param ptr pointer to input buffer
37 * @param size size of the input buffer
38 * @param patch readout partition
39 * @param slice sector no
40 */
84645eb0 41 int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
5d2abf3b 42 using AliHLTTPCDigitReader::InitBlock;
5df0cbb9 43
44 /**
45 * place the reader at the next signal
46 * @return 1 if there was a nest signal, 0 if not
47 */
f44e97dc 48 bool NextSignal();
5df0cbb9 49
50 /**
51 * Get row number of the current signal
52 * @return row number of the current signal
53 */
a38a7850 54 int GetRow();
5df0cbb9 55
56 /**
57 * Get pad number of the current signal
58 * @return pad number of the current signal
59 */
a38a7850 60 int GetPad();
5df0cbb9 61
62 /**
63 * Get signal
64 * @return ADC signal
65 */
a38a7850 66 int GetSignal();
5df0cbb9 67
68 /**
69 * Get time of the current signal
70 * @return time of the current signal
71 */
a38a7850 72 int GetTime();
73
deba5d85 74 bool NextChannel();
75 int NextBunch();
76 AliHLTUInt32_t GetAltroBlockHWaddr() const;
77 int GetBunchSize();
78 const UInt_t* GetSignals();
79 Int_t GetSortedTime();
80 Int_t GetSortedSignal();
81 Int_t GetSortedPad() const;
82 Int_t GetSortedRow() const;
83 int GetRowOffset() const;
84
85 void SetUnsorted(bool unsorted){fUnsorted=unsorted;}
86
959cfda3 87 void SortBunchBinVector(); // fills the vector fBinRowPositionSorted so that digits are read in the correct order
88
deba5d85 89 const AliHLTTPCDigitData* GetBunchDigits();
90
a38a7850 91protected:
92
93
94private:
8f8bf0af 95 /** copy constructor prohibited */
96 AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked&);
97 /** assignment operator prohibited */
98 AliHLTTPCDigitReaderUnpacked& operator=(const AliHLTTPCDigitReaderUnpacked&);
99
67fada6b 100 /**
101 * Increment to the next raw data pointer.
102 * @param pRow [IN] the current row data pointer
103 * [OUT] the new pointer
104 * @return -EBADF in case of format error
105 */
106 int GetNextRowData(AliHLTTPCDigitRowData*& pRow) const;
107
5df0cbb9 108 /** intermediate row data structure (pointer in fPtr buffer) */
a38a7850 109 AliHLTTPCDigitRowData *fDigitRowData; //!
5df0cbb9 110 /** current row data structure (pointer in fPtr buffer) */
a38a7850 111 AliHLTTPCDigitRowData *fActRowData; //!
5df0cbb9 112 /** the current digit data */
a38a7850 113 AliHLTTPCDigitData *fData; //!
5df0cbb9 114
115 /** input buffer */
84645eb0 116 void* fPtr; //!
5df0cbb9 117 /** size of the input buffer */
118 unsigned long fSize; // see above
119
120 /** current bin */
121 Int_t fBin; // see above
122 /** current row */
123 Int_t fRow; // see above
124 /** first row */
125 Int_t fFirstRow; // see above
126 /** last row */
127 Int_t fLastRow; // see above
a38a7850 128
deba5d85 129 Bool_t fUnsorted; //!transient
130
131 /** array to hold bunch data */
132 vector<UInt_t> fDataBunch; //! transient
133
134 vector<Int_t> fTrackIDs; //! transient
135 vector<UInt_t> fTrackIDCounts; //! transient
136
137 Bool_t fEndOfDataReached; //! transient
138
139 Bool_t fEndOfChannelReached; //! transient
140
141 Int_t fPrevTime; //! transient
142
143 Int_t fEndTimeBinOfBunch; //! transient
144
145 Int_t fPrevSignal; //! transient
146
147 Int_t fPrevPad; //! transient
148
149 Int_t fPrevRow; //! transient
150
151 Bool_t fNextChannelIsAlreadyConfirmed; //! transient
152
153 AliHLTTPCMapping *fMapping; //! transient
154
155 vector<AliHLTTPCDigitData> fDigitsVector; //! transient
156
959cfda3 157 vector<Int_t>fBinRowPositionSorted; //! transient
158
deba5d85 159 Int_t fPatch;
160
22240104 161 ClassDef(AliHLTTPCDigitReaderUnpacked, 0)
a38a7850 162};
163#endif
164
165
166