1 #ifndef ALIHLTDDLDECODER_H
2 #define ALIHLTDDLDECODER_H
11 #define DDL_32BLOCK_SIZE 5
14 #include "AliHLTPHOSConstants.h"
17 using namespace PhosHLTConst;
20 class AliHLTAltroData;
23 class AliHLTDDLDecoder
27 virtual ~AliHLTDDLDecoder();
30 bool NextChannel(AliHLTAltroData *altroDataPtr);
35 void DumpData(T *array, int N, int nPerLine)
37 cout << "DumpData N= " << N <<endl;
38 for(int i= 0; i< N; i++)
40 if((i%nPerLine == 0) && (i != 0))
45 cout << array[i]<< "\t";
51 void SetMemory(UChar_t *dtaPtr, UInt_t size);
52 void SetNTrailerWords(int N);
53 void PrintInfo(AliHLTAltroData &altrodata, int n = 0, int nPerLine = 4);
54 float GetFailureRate();
58 void DecodeDDLBlock();
59 void DecodeLastDDLBlock();
60 int GetMarker(UInt_t *buffer, int index);
63 // void ReadAltroTrailer();
65 // void ResetBuffer();
69 long int fN32HeaderWords;
70 long int fN32RcuTrailerWords;
71 unsigned int fNDDLBlocks;
73 unsigned long fN40AltroWords;
74 unsigned long fN40RcuAltroWords;
76 unsigned int fSegmentation;
77 unsigned int f32LastDDLBlockSize;
78 UInt_t f32PayloadSize;
81 UInt_t fBuffer[N_FEECS*N_BRANCHES*8*N_ALTROCHANNELS*(ALTRO_MAX_SAMPLES + ALTRO_MAX_TRALER_SIZE)];
82 UInt_t fDDLBlockDummy[DDL_BLOCK_SIZE];
84 UInt_t fNAltro10bitWords;
85 UInt_t fNAltroLastSequence10bitWords;