4 #ifndef ALIHLTTPCDIGITREADER_H
5 #define ALIHLTTPCDIGITREADER_H
7 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
10 /** @file AliHLTTPCDigitReaderRaw.h
11 @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
13 @brief An abstract reader class for TPC data.
16 #include "AliHLTLogging.h"
20 * @class AliHLTTPCDigitReader
21 * An abstract reader class for the TPC data. The Data is treated as a stream
22 * of data points, each containing row number, pad number, time bin and ADC
23 * value. The class hides the actual encoding of the data stream for the sub-
24 * sequent components like the cluster finder.
27 class AliHLTTPCDigitReader : public AliHLTLogging {
29 /** standard constructor */
30 AliHLTTPCDigitReader();
32 virtual ~AliHLTTPCDigitReader();
35 * Init the reader with a data block.
36 * The function fetches the first and last row for the readout partition
37 * from @ref AliHLTTransform. The method is pure virtual and must be implemented
39 * @param ptr pointer to data buffer
40 * @param size size of the data buffer
41 * @param patch patch (readout partition) number within the slice
42 * @param slice sector no (0 to 35)
44 virtual int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice)=0;
48 * <b>Note:</b> This method is for backward compatibility only, not for further
49 * use. The <i>firstrow</i> and <i>lastrow</i> parameters are fetched from
50 * @ref AliHLTTPCTransform.
52 * @param ptr pointer to data buffer
53 * @param size size of the data buffer
54 * @param firstrow first row occuring in the data
55 * @param lastrow last row occuring in the data
56 * @param patch patch (readout partition) number within the slice
57 * @param slice sector no (0 to 35)
59 int InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice);
62 * Set the reader position to the next value.
63 * If the reader was not yet initialized, initialization is carried out and
64 * the position set to the beginning of the stream (which is in essence the
65 * end of the data block due to the back-linked list).
67 virtual bool Next()=0;
70 * Get the row number of the current value.
72 virtual int GetRow()=0;
75 * Get the pad number of the current value.
77 virtual int GetPad()=0;
80 * Get the current ADC value.
82 virtual int GetSignal()=0;
85 * Get the time bin of the current value.
87 virtual int GetTime()=0;
93 ClassDef(AliHLTTPCDigitReader, 0)