4 #ifndef ALIHLTTPCDIGITREADER_H
5 #define ALIHLTTPCDIGITREADER_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 AliHLTTPCDigitReader.h
12 @author Timm Steinbeck, Jochen Thaeder, Matthias Richter, Kenneth Aamodt
14 @brief An abstract reader class for TPC data.
17 #include "AliHLTLogging.h"
21 * @class AliHLTTPCDigitReader
22 * An abstract reader class for the TPC data. The Data is treated as a stream
23 * of data points, each containing row number, pad number, time bin and ADC
24 * value. The class hides the actual encoding of the data stream for the sub-
25 * sequent components like the cluster finder.
28 class AliHLTTPCDigitReader : public AliHLTLogging {
30 /** standard constructor */
31 AliHLTTPCDigitReader();
33 virtual ~AliHLTTPCDigitReader();
36 * Init the reader with a data block.
37 * The function fetches the first and last row for the readout partition
38 * from @ref AliHLTTPCTransform. The method is pure virtual and must be implemented
40 * @param ptr pointer to data buffer
41 * @param size size of the data buffer
42 * @param patch patch (readout partition) number within the slice
43 * @param slice sector no (0 to 35)
45 virtual int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice)=0;
49 * <b>Note:</b> This method is for backward compatibility only, not for further
50 * use. The <i>firstrow</i> and <i>lastrow</i> parameters are fetched from
51 * @ref AliHLTTPCTransform.
53 * @param ptr pointer to data buffer
54 * @param size size of the data buffer
55 * @param firstrow first row occuring in the data
56 * @param lastrow last row occuring in the data
57 * @param patch patch (readout partition) number within the slice
58 * @param slice sector no (0 to 35)
60 virtual int InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice);
63 * Set the reader position to the next value.
64 * If the reader was not yet initialized, initialization is carried out and
65 * the position set to the beginning of the stream (which is in essence the
66 * end of the data block due to the back-linked list).
68 virtual bool Next()=0;
71 * Get the row number of the current value.
73 virtual int GetRow()=0;
76 * Get the pad number of the current value.
78 virtual int GetPad()=0;
81 * Get the current ADC value.
83 virtual int GetSignal()=0;
86 * Get the time bin of the current value.
88 virtual int GetTime()=0;
91 * Method to use old rcu fomat.
93 virtual void SetOldRCUFormat(Bool_t oldrcuformat);
96 * Method to set read unsorted flag.
98 virtual void SetUnsorted(Bool_t unsorted);
104 ClassDef(AliHLTTPCDigitReader, 0)