]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/misc/AliL3DDLRawReader.h
-Added protected copy constructors and assignment operators. -Public data members...
[u/mrichter/AliRoot.git] / HLT / misc / AliL3DDLRawReader.h
CommitLineData
240d63be 1// @(#) $Id$
2
3#ifndef ALIL3DDLRAWREADER_H
4#define ALIL3DDLRAWREADER_H
5
1f1942b8 6#include "AliL3RootTypes.h"
7
240d63be 8// see description in upcoming ALICE note
9// by D.Favretto and A.K.Mohanty
10struct AliL3DDLMiniHeader
11{
12 UInt_t fSize;
13 UChar_t fDetectorID;
14 UChar_t fMagicWord[3];
15 UChar_t fVersion;
16 UChar_t fCompressionFlag;
17 UShort_t fDDLID;
18};
19
20class AliL3DDLRawReader
21{
22 public :
23 AliL3DDLRawReader();
24 virtual ~AliL3DDLRawReader();
25
26 void Select(Int_t detectorID, Int_t minDDLID = -1, Int_t maxDDLID = -1);
27
28 inline Int_t GetDataSize() const {return fMiniHeader->fSize;};
29 inline Int_t GetDetectorID() const {return fMiniHeader->fDetectorID;};
30 inline Int_t GetDDLID() const {return fMiniHeader->fDDLID;};
31 inline Int_t GetVersion() const {return fMiniHeader->fVersion;};
32 inline Bool_t IsCompressed() const {return fMiniHeader->fCompressionFlag != 0;};
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 :
43 Bool_t IsSelected();
44
45 Bool_t CheckMiniHeader();
46 virtual Bool_t ReadNext(UChar_t* data, Int_t size) = 0;
47
48 AliL3DDLMiniHeader* fMiniHeader; // current mini header
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
55 ClassDef(AliL3DDLRawReader,1) //AliL3DDLRawReader
56};
57
58#endif