1 #ifndef ALIHLTDDLDECODER_H
2 #define ALIHLTDDLDECODER_H
4 /**************************************************************************
5 * This file is property of and copyright by the Experimental Nuclear *
6 * Physics Group, Dep. of Physics *
7 * University of Oslo, Norway, 2007 *
9 * Authors: Øystein Djuvsland <oystein.djuvsland@gmail.com> *
10 * & Per Thomas Hille <perthi@fys.uio.no> *
11 * for the ALICE HLT Project. *
12 * Contributors are mentioned in the code where appropriate. *
13 * Please report bugs to perthi@fys.uio.no *
15 * Permission to use, copy, modify and distribute this software and its *
16 * documentation strictly for non-commercial purposes is hereby granted *
17 * without fee, provided that the above copyright notice appears in all *
18 * copies and that both the copyright notice and this permission notice *
19 * appear in the supporting documentation. The authors make no claims *
20 * about the suitability of this software for any purpose. It is *
21 * provided "as is" without express or implied warranty. *
22 **************************************************************************/
28 #define DDL_32BLOCK_SIZE 5
29 #include "AliHLTPHOSConstants.h"
30 using namespace PhosHLTConst;
31 class AliHLTAltroData;
34 class AliHLTDDLDecoder
38 virtual ~AliHLTDDLDecoder();
41 bool NextChannel(AliHLTAltroData *altroDataPtr);
44 void DumpData(T *array, int N, int nPerLine)
46 cout << "DumpData N= " << N <<endl;
47 for(int i= 0; i< N; i++)
49 if((i%nPerLine == 0) && (i != 0))
54 cout << array[i]<< "\t";
60 void SetMemory(UChar_t *dtaPtr, UInt_t size);
62 // void SetNTrailerWords(int N);
64 void PrintInfo(AliHLTAltroData &altrodata, int n = 0, int nPerLine = 4);
65 float GetFailureRate();
69 void DecodeDDLBlock();
70 void DecodeLastDDLBlock();
71 int GetMarker(UInt_t *buffer, int index);
72 int countAAApaddings();
77 const long int fN32HeaderWords;
78 const long int fN32RcuTrailerWords;
81 unsigned int fNDDLBlocks;
84 unsigned long fN40AltroWords;
85 unsigned long fN40RcuAltroWords;
88 unsigned int fSegmentation;
89 unsigned int f32LastDDLBlockSize;
90 UInt_t f32PayloadSize;
93 UInt_t fBuffer[N_FEECS*N_BRANCHES*8*N_ALTROCHANNELS*(ALTRO_MAX_SAMPLES + ALTRO_MAX_TRALER_SIZE)];
94 UInt_t fDDLBlockDummy[DDL_BLOCK_SIZE];
96 UInt_t fNAltro10bitWords;
97 UInt_t fNAltroLastSequence10bitWords;