]>
Commit | Line | Data |
---|---|---|
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 | |
10 | struct AliL3DDLMiniHeader | |
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 | ||
20 | class 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 | ||
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 | ||
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 |