]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCDigitReaderDecoder.h
adding pointer protection
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReaderDecoder.h
CommitLineData
f8121cb1 1// XEmacs -*-C++-*-
7e914051 2// $Id$
f8121cb1 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
f8121cb1 17#include "AliHLTTPCDigitReader.h"
7dceaa9b 18#include "AliAltroData.h"
19class AliHLTTPCMapping;
20class AliAltroDecoder;
21class AliAltroBunch;
f8121cb1 22
23/**
24 * @class AliHLTTPCDigitReaderDecoder
2efb85be 25 * Digit reader implementation for real ALTRO/RCU data using the fast
26 * AliAltroDecoder class.
297174de 27 *
f8121cb1 28 * @ingroup alihlt_tpc
29 */
30class AliHLTTPCDigitReaderDecoder : public AliHLTTPCDigitReader {
31public:
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);
5863c71a 40 int Reset();
900fdfb2 41 void SetUnsorted(bool unsorted);
f8121cb1 42 bool NextChannel();
43 int NextBunch();
44 int GetRow();
45 int GetPad();
46 int GetSignal();
7dceaa9b 47 const UInt_t* GetSignals();
f8121cb1 48 int GetTime();
7dceaa9b 49 int GetBunchSize();
d2f725e4 50 int GetRowOffset() const;
7c9a4e09 51 AliHLTUInt32_t GetAltroBlockHWaddr() const;
092a1374 52 AliHLTUInt32_t GetAltroBlockHWaddr(Int_t row, Int_t pad) const;
436467f5 53 int GetRCUTrailerSize();
4ea087a6 54 bool GetRCUTrailerData(UChar_t*& trData);
436467f5 55
f8121cb1 56protected:
57 bool NextSignal();
58
59private:
7dceaa9b 60 /** copy constructor prohibited */
61 AliHLTTPCDigitReaderDecoder(const AliHLTTPCDigitReaderDecoder&);
62 /** assignment operator prohibited */
63 AliHLTTPCDigitReaderDecoder& operator=(const AliHLTTPCDigitReaderDecoder&);
64
5863c71a 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
7dceaa9b 82 AliAltroDecoder *fAltroDecoder; //! transient
83 AliAltroData fAltroData; //! transient
84 AliAltroBunch *fAltroBunch; //! transient
85 AliHLTTPCMapping *fMapping; //! transient
86
7c9a4e09 87 int fNextCounter; //! transient
88 bool fNextSignalMethodUsed; //! transient
f8121cb1 89
5863c71a 90 static AliAltroDecoder* fgpFreeInstance; //! transient
91 static AliAltroDecoder* fgpIssuedInstance; //! transient
92
22240104 93 ClassDef(AliHLTTPCDigitReaderDecoder, 0)
f8121cb1 94
95};
96#endif
97