]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDigitReaderDecoder.h
Cleaning up ClassDef. Should have the version == 0 for the algorithmic classes like...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderDecoder.h
1 // XEmacs -*-C++-*-
2 // $Id$
3
4 #ifndef ALIHLTTPCDIGITREADERDECODER_H
5 #define ALIHLTTPCDIGITREADERDECODER_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   AliHLTTPCDigitReaderDecoder.h
12     @author Kenneth Aamodt, Matthias Richter
13     @date   
14     @brief  DigitReader for the fast ALTRO Decoder
15 */
16
17 #include "AliHLTTPCDigitReader.h"
18 #include "AliAltroData.h"
19 class AliHLTTPCMapping;
20 class AliAltroDecoder;
21 class AliAltroBunch;
22
23 /**
24  * @class AliHLTTPCDigitReaderDecoder
25  * Digit reader implementation for real ALTRO/RCU data using the fast
26  * AliAltroDecoder class.
27  *
28  * @ingroup alihlt_tpc
29  */
30 class AliHLTTPCDigitReaderDecoder : public AliHLTTPCDigitReader {
31 public:
32   /** standard constructor 
33    */
34   AliHLTTPCDigitReaderDecoder();
35   /** destructor */
36   virtual ~AliHLTTPCDigitReaderDecoder();
37
38   // interface functions  
39   int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
40   int Reset();
41   void SetUnsorted(bool unsorted);
42   bool NextChannel();
43   int NextBunch();
44   int GetRow();
45   int GetPad();
46   int GetSignal();
47   const UInt_t* GetSignals();
48   int GetTime();
49   int GetBunchSize();
50   int GetRowOffset() const;
51   AliHLTUInt32_t GetAltroBlockHWaddr() const;
52   AliHLTUInt32_t GetAltroBlockHWaddr(Int_t row, Int_t pad) const;
53   int GetRCUTrailerSize();
54   bool GetRCUTrailerData(UChar_t*& trData);
55
56 protected:
57   bool NextSignal();
58
59 private:
60   /** copy constructor prohibited */
61   AliHLTTPCDigitReaderDecoder(const AliHLTTPCDigitReaderDecoder&);
62   /** assignment operator prohibited */
63   AliHLTTPCDigitReaderDecoder& operator=(const AliHLTTPCDigitReaderDecoder&);
64
65   /**
66    * Instance handling of the AltroDecoder
67    * The AliAltroDecoder in it's current implementation (Sep 2008) allocates
68    * 16 MByte per instance. This makes it impossible to run more than a couple
69    * of instances. Though, a common decoder with bulk functionality used and
70    * certified by both off- and on-line application is discussed, a quick
71    * bugfix in the digit reader makes use of one global decoder instance.
72    * This can actually be extended in order to support more than one global
73    * instance provided by a scheduler, but thats overkill for the moment.
74    */
75   static AliAltroDecoder* GetDecoderInstance();
76
77   /**
78    * Release an instance of the decoder.
79    */
80   static void ReleaseDecoderInstance(AliAltroDecoder* pInstance);
81
82   AliAltroDecoder *fAltroDecoder;                                  //! transient
83   AliAltroData fAltroData;                                         //! transient
84   AliAltroBunch *fAltroBunch;                                      //! transient
85   AliHLTTPCMapping *fMapping;                                      //! transient
86
87   int fNextCounter;                                                //! transient
88   bool fNextSignalMethodUsed;                                      //! transient
89
90   static AliAltroDecoder* fgpFreeInstance;                         //! transient
91   static AliAltroDecoder* fgpIssuedInstance;                       //! transient
92   
93   ClassDef(AliHLTTPCDigitReaderDecoder, 0)
94     
95 };
96 #endif
97