4 #ifndef ALIHLTTPCDIGITREADERUNPACKED_H
5 #define ALIHLTTPCDIGITREADERUNPACKED_H
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 *
11 /** @file AliHLTTPCDigitReaderUnpacked.h
12 @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
14 @brief A digit reader implementation for unpacked TPC data.
17 #include "AliHLTTPCDigitReader.h"
18 #include "AliHLTTPCDigitData.h"
19 class AliHLTTPCMapping;
20 class AliHLTTPCDigitRowData;
23 * @class AliHLTTPCDigitReaderUnpacked
24 * A digit reader implementation for unpacked TPC data.
27 class AliHLTTPCDigitReaderUnpacked : public AliHLTTPCDigitReader{
29 /** standard constructor */
30 AliHLTTPCDigitReaderUnpacked();
32 virtual ~AliHLTTPCDigitReaderUnpacked();
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
41 int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
42 using AliHLTTPCDigitReader::InitBlock;
45 * place the reader at the next signal
46 * @return 1 if there was a nest signal, 0 if not
51 * Get row number of the current signal
52 * @return row number of the current signal
57 * Get pad number of the current signal
58 * @return pad number of the current signal
69 * Get time of the current signal
70 * @return time of the current signal
76 AliHLTUInt32_t GetAltroBlockHWaddr() const;
78 const UInt_t* GetSignals();
79 AliHLTTPCDigitData GetSortedDigit();
80 Int_t GetSortedTime();
81 Int_t GetSortedSignal();
82 Int_t GetSortedPad() const;
83 Int_t GetSortedRow() const;
84 int GetRowOffset() const;
86 void SetUnsorted(bool unsorted){fUnsorted=unsorted;}
88 void SortBunchBinVector(); // fills the vector fBinRowPositionSorted so that digits are read in the correct order
90 const AliHLTTPCDigitData* GetBunchDigits();
96 /** copy constructor prohibited */
97 AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked&);
98 /** assignment operator prohibited */
99 AliHLTTPCDigitReaderUnpacked& operator=(const AliHLTTPCDigitReaderUnpacked&);
102 * Increment to the next raw data pointer.
103 * @param pRow [IN] the current row data pointer
104 * [OUT] the new pointer
105 * @return -EBADF in case of format error
107 int GetNextRowData(AliHLTTPCDigitRowData*& pRow) const;
109 /** intermediate row data structure (pointer in fPtr buffer) */
110 AliHLTTPCDigitRowData *fDigitRowData; //!
111 /** current row data structure (pointer in fPtr buffer) */
112 AliHLTTPCDigitRowData *fActRowData; //!
113 /** the current digit data */
114 AliHLTTPCDigitData *fData; //!
118 /** size of the input buffer */
119 unsigned long fSize; // see above
122 Int_t fBin; // see above
124 Int_t fRow; // see above
126 Int_t fFirstRow; // see above
128 Int_t fLastRow; // see above
130 Bool_t fUnsorted; //!transient
132 /** array to hold bunch data */
133 vector<UInt_t> fDataBunch; //! transient
135 vector<Int_t> fTrackIDs; //! transient
136 vector<UInt_t> fTrackIDCounts; //! transient
138 Bool_t fEndOfDataReached; //! transient
140 Bool_t fEndOfChannelReached; //! transient
142 Int_t fPrevTime; //! transient
144 Int_t fEndTimeBinOfBunch; //! transient
146 Int_t fPrevSignal; //! transient
148 Int_t fPrevPad; //! transient
150 Int_t fPrevRow; //! transient
152 Bool_t fNextChannelIsAlreadyConfirmed; //! transient
154 AliHLTTPCMapping *fMapping; //! transient
156 vector<AliHLTTPCDigitData> fDigitsVector; //! transient
158 vector<Int_t>fBinRowPositionSorted; //! transient
162 ClassDef(AliHLTTPCDigitReaderUnpacked, 0)