]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDigitReader.h
coding conventions
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReader.h
1 // XEmacs -*-C++-*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTTPCDIGITREADER_H
5 #define ALIHLTTPCDIGITREADER_H
6
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                               */
10
11 /** @file   AliHLTTPCDigitReader.h
12     @author Timm Steinbeck, Jochen Thaeder, Matthias Richter, Kenneth Aamodt
13     @date   
14     @brief  An abstract reader class for TPC data.
15 */
16
17 #include "AliHLTLogging.h"
18 #include "TObject.h"
19
20 /**
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.
26  * @ingroup alihlt_tpc
27  */
28 class AliHLTTPCDigitReader : public AliHLTLogging {
29 public:
30   /** standard constructor */
31   AliHLTTPCDigitReader();
32   /** destructor */
33   virtual ~AliHLTTPCDigitReader();
34   
35   /**
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
39    * by the child class.
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)
44    */
45   virtual int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice)=0;
46
47   /**
48    * Old Init function.
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.
52    *
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)
59    */
60   virtual int InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice);
61
62   /**
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).
67    */
68   virtual bool Next()=0;
69
70   /**
71    * Get the row number of the current value.
72    */
73   virtual int GetRow()=0;
74
75   /**
76    * Get the pad number of the current value.
77    */
78   virtual int GetPad()=0;
79
80   /**
81    * Get the current ADC value.
82    */
83   virtual int GetSignal()=0;
84
85   /**
86    * Get the time bin of the current value.
87    */
88   virtual int GetTime()=0;
89
90   /**
91    * Method to use old rcu fomat.
92    */
93   virtual void SetOldRCUFormat(Bool_t oldrcuformat);
94
95   /**
96    * Method to set read unsorted flag.
97    */
98   virtual void SetUnsorted(Bool_t unsorted);
99
100 protected:
101         
102 private:
103
104   ClassDef(AliHLTTPCDigitReader, 0)
105     
106 };
107 #endif
108