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