]>
Commit | Line | Data |
---|---|---|
a38a7850 | 1 | // XEmacs -*-C++-*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTTPCDIGITREADER_H | |
5 | #define ALIHLTTPCDIGITREADER_H | |
6 | ||
7 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
8 | * See cxx source for full Copyright notice */ | |
9 | ||
84645eb0 | 10 | /** @file AliHLTTPCDigitReaderRaw.h |
11 | @author Timm Steinbeck, Jochen Thaeder, Matthias Richter | |
12 | @date | |
13 | @brief An abstract reader class for TPC data. | |
14 | */ | |
a38a7850 | 15 | |
db16520a | 16 | #include "AliHLTLogging.h" |
a38a7850 | 17 | #include "TObject.h" |
18 | ||
84645eb0 | 19 | /** |
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. | |
25 | * @ingroup alihlt_tpc | |
26 | */ | |
db16520a | 27 | class AliHLTTPCDigitReader : public AliHLTLogging { |
a38a7850 | 28 | public: |
84645eb0 | 29 | /** standard constructor */ |
a38a7850 | 30 | AliHLTTPCDigitReader(); |
84645eb0 | 31 | /** destructor */ |
a38a7850 | 32 | virtual ~AliHLTTPCDigitReader(); |
33 | ||
84645eb0 | 34 | /** |
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 | |
38 | * by the child class. | |
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) | |
43 | */ | |
44 | virtual int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice)=0; | |
45 | ||
46 | /** | |
47 | * Old Init function. | |
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. | |
51 | * | |
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) | |
58 | */ | |
59 | int InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice); | |
60 | ||
61 | /** | |
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). | |
66 | */ | |
a38a7850 | 67 | virtual bool Next()=0; |
84645eb0 | 68 | |
69 | /** | |
70 | * Get the row number of the current value. | |
71 | */ | |
a38a7850 | 72 | virtual int GetRow()=0; |
84645eb0 | 73 | |
74 | /** | |
75 | * Get the pad number of the current value. | |
76 | */ | |
a38a7850 | 77 | virtual int GetPad()=0; |
84645eb0 | 78 | |
79 | /** | |
80 | * Get the current ADC value. | |
81 | */ | |
a38a7850 | 82 | virtual int GetSignal()=0; |
84645eb0 | 83 | |
84 | /** | |
85 | * Get the time bin of the current value. | |
86 | */ | |
a38a7850 | 87 | virtual int GetTime()=0; |
88 | ||
89 | protected: | |
90 | ||
91 | private: | |
92 | ||
93 | ClassDef(AliHLTTPCDigitReader, 0) | |
94 | ||
95 | }; | |
96 | #endif | |
97 |