]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDigitReaderPacked.h
enhanced interface of DigitReaders (channel locking, generic sorting)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderPacked.h
1 // XEmacs -*-C++-*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTTPCDIGITREADERPACKED_H
5 #define ALIHLTTPCDIGITREADERPACKED_H
6
7 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
8  * See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTTPCDigitReaderPacked.h
11     @author Timm Steinbeck, Jochen Thaeder, Matthias Richter, Kenneth Aamodt
12     @date   
13     @brief  A digit reader implementation for simulated, packed TPC 'raw' data.
14 */
15
16 #define ENABLE_PAD_SORTING 1
17
18 #include "AliHLTTPCDigitReader.h"
19
20 #if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H)
21
22 class AliRawReaderMemory;
23
24 class AliTPCRawStream;
25
26 /**
27  * @class AliHLTTPCDigitReaderPacked
28  * A digit reader implementation for simulated, packed TPC 'raw' data.
29  * Includes reordering of the pads if @ref ENABLE_PAD_SORTING is 1.
30  * @ingroup alihlt_tpc
31  */
32 class AliHLTTPCDigitReaderPacked : public AliHLTTPCDigitReader{
33 public:
34   /** standard constructor */
35   AliHLTTPCDigitReaderPacked(); 
36   /** destructor */
37   virtual ~AliHLTTPCDigitReaderPacked();
38   
39   /**
40    * Init the reader with a data block.
41    * The function fetches the first and last row for the readout partition
42    * from @ref AliHLTTransform.
43    * @param ptr     pointer to data buffer
44    * @param size    size of the data buffer
45    * @param patch   patch (readout partition) number within the slice
46    * @param slice   sector no (0 to 35)
47    */
48   Int_t InitBlock(void* ptr,ULong_t size, Int_t patch, Int_t slice);
49   void SetOldRCUFormat(bool oldrcuformat){fOldRCUFormat=oldrcuformat;}
50   Bool_t NextSignal();
51   Int_t GetRow();
52   Int_t GetPad();
53   Int_t GetSignal();
54   Int_t GetTime();
55     
56 protected:
57     
58 private:
59   /** copy constructor prohibited */
60   AliHLTTPCDigitReaderPacked(const AliHLTTPCDigitReaderPacked&);
61   /** assignment operator prohibited */
62   AliHLTTPCDigitReaderPacked& operator=(const AliHLTTPCDigitReaderPacked&);
63
64   // Initialize AliROOT TPC raw stream parsing class
65   AliRawReaderMemory *fRawMemoryReader;
66
67   AliTPCRawStream *fTPCRawStream;
68     
69 #if ENABLE_PAD_SORTING 
70   Int_t fCurrentRow;
71   Int_t fCurrentPad;
72   Int_t fCurrentBin;
73  
74   Int_t fRowOffset;
75   Int_t fNRows;
76
77   Int_t fNMaxRows;
78   Int_t fNMaxPads;
79   Int_t fNTimeBins;
80
81   Int_t *fData;
82 #endif // ENABLE_PAD_SORTING
83
84   Bool_t fOldRCUFormat;
85
86   ClassDef(AliHLTTPCDigitReaderPacked, 0)
87         
88 };
89
90 #else
91 // add a dummy class to make CINT happy
92 class AliHLTTPCDigitReaderPacked : public AliHLTLogging{
93 public:
94   AliHLTTPCDigitReaderPacked()
95   {
96     HLTFatal("AliHLTTPCDigitReaderPacked not build");
97   }
98
99   ClassDef(AliHLTTPCDigitReaderPacked, 0)
100 };
101 #endif //defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H)
102
103 #endif