4 #ifndef ALIHLTTPCDIGITREADERDECODER_H
5 #define ALIHLTTPCDIGITREADERDECODER_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 AliHLTTPCDigitReaderDecoder.h
12 @author Kenneth Aamodt, Matthias Richter
14 @brief DigitReader for the fast ALTRO Decoder
17 #include "AliHLTTPCDigitReader.h"
18 #include "AliAltroData.h"
19 class AliHLTTPCMapping;
20 class AliAltroDecoder;
24 * @class AliHLTTPCDigitReaderDecoder
25 * Digit reader implementation for real ALTRO/RCU data using the fast
26 * AliAltroDecoder class.
30 class AliHLTTPCDigitReaderDecoder : public AliHLTTPCDigitReader {
32 /** standard constructor
34 AliHLTTPCDigitReaderDecoder();
36 virtual ~AliHLTTPCDigitReaderDecoder();
38 // interface functions
39 int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
41 void SetUnsorted(bool unsorted);
47 const UInt_t* GetSignals();
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);
60 /** copy constructor prohibited */
61 AliHLTTPCDigitReaderDecoder(const AliHLTTPCDigitReaderDecoder&);
62 /** assignment operator prohibited */
63 AliHLTTPCDigitReaderDecoder& operator=(const AliHLTTPCDigitReaderDecoder&);
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.
75 static AliAltroDecoder* GetDecoderInstance();
78 * Release an instance of the decoder.
80 static void ReleaseDecoderInstance(AliAltroDecoder* pInstance);
82 AliAltroDecoder *fAltroDecoder; //! transient
83 AliAltroData fAltroData; //! transient
84 AliAltroBunch *fAltroBunch; //! transient
85 AliHLTTPCMapping *fMapping; //! transient
87 int fNextCounter; //! transient
88 bool fNextSignalMethodUsed; //! transient
90 static AliAltroDecoder* fgpFreeInstance; //! transient
91 static AliAltroDecoder* fgpIssuedInstance; //! transient
93 ClassDef(AliHLTTPCDigitReaderDecoder, 0)