]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/misc/AliHLTDDLRawReader.h
Gaute: charge added to ESD momentum parameter (p4)
[u/mrichter/AliRoot.git] / HLT / misc / AliHLTDDLRawReader.h
CommitLineData
240d63be 1// @(#) $Id$
2
3#ifndef ALIL3DDLRAWREADER_H
4#define ALIL3DDLRAWREADER_H
5
4aa41877 6#include "AliHLTRootTypes.h"
1f1942b8 7
240d63be 8// see description in upcoming ALICE note
9// by D.Favretto and A.K.Mohanty
4aa41877 10struct AliHLTDDLMiniHeader
240d63be 11{
54b54089 12 UInt_t fSize; // size
13 UChar_t fDetectorID; // detector ID
14 UChar_t fMagicWord[3]; // magic word
15 UChar_t fVersion; // version
16 UChar_t fCompressionFlag;// compression flag
17 UShort_t fDDLID; // DDL ID
240d63be 18};
19
4aa41877 20class AliHLTDDLRawReader
240d63be 21{
22 public :
4aa41877 23 AliHLTDDLRawReader();
24 virtual ~AliHLTDDLRawReader();
240d63be 25
26 void Select(Int_t detectorID, Int_t minDDLID = -1, Int_t maxDDLID = -1);
27
54b54089 28 Int_t GetDataSize() const {return fMiniHeader->fSize;};
29 Int_t GetDetectorID() const {return fMiniHeader->fDetectorID;};
30 Int_t GetDDLID() const {return fMiniHeader->fDDLID;};
31 Int_t GetVersion() const {return fMiniHeader->fVersion;};
32 Bool_t IsCompressed() const {return fMiniHeader->fCompressionFlag != 0;};
240d63be 33
34 virtual Bool_t ReadMiniHeader() = 0;
35 virtual Bool_t ReadNextData(UChar_t*& data) = 0;
36 virtual Bool_t ReadNextInt(UInt_t& data);
37 virtual Bool_t ReadNextShort(UShort_t& data);
38 virtual Bool_t ReadNextChar(UChar_t& data);
39
40 virtual Bool_t Reset() = 0;
41
42 protected :
54b54089 43 Bool_t IsSelected() const;
240d63be 44
54b54089 45 Bool_t CheckMiniHeader() const;
240d63be 46 virtual Bool_t ReadNext(UChar_t* data, Int_t size) = 0;
47
4aa41877 48 AliHLTDDLMiniHeader* fMiniHeader; // current mini header
240d63be 49 Int_t fCount; // counter of bytes to be read for current DDL
50
51 Int_t fSelectDetectorID; // id of selected detector (<0 = no selection)
52 Int_t fSelectMinDDLID; // minimal index of selected DDLs (<0 = no selection)
53 Int_t fSelectMaxDDLID; // maximal index of selected DDLs (<0 = no selection)
54
4aa41877 55 ClassDef(AliHLTDDLRawReader,1) //AliHLTDDLRawReader
240d63be 56};
57
4aa41877 58typedef AliHLTDDLRawReader AliL3DDLRawReader; // for backward compatibility
59
240d63be 60#endif