1 #include "AliHLTDDLDecoder.h"
2 #include "AliHLTAltroData.h"
15 int main(int argc, const char** argv)
22 AliHLTAltroData altrodata;
23 AliHLTAltroBunch *altrobunchPtr = new AliHLTAltroBunch;
28 AliHLTDDLDecoder *decoder = new AliHLTDDLDecoder();
30 fin.open(argv[1], ios::binary);
32 fin.seekg (0, ios::end);
34 fin.seekg (0, ios::beg);
36 char *dataPtr = new char[length];
38 fin.read (dataPtr,length);
43 for(int i=0; i < n_loops; i++)
45 decoder->SetMemory((UChar_t*)dataPtr, length);
48 while(decoder->NextChannel(&altrodata) == true)
53 if( altrodata.fDataSize != 0 )
59 for(int i = 0; i < altrodata.fDataSize -3 ; i++)
61 if(altrodata.fData[i] > tmpMax)
63 tmpMax = altrodata.fData[i];
68 // cout <<"tmpMax = "<< tmpMax<<endl;
72 cout <<"tmpMax = "<< tmpMax<<endl;
73 decoder->PrintInfo(altrodata, altrodata.fDataSize, 4);
76 while( altrodata.NextBunch(altrobunchPtr) == true)
78 // cout << "altrobunch.fDataSize = " << altrobunchPtr->fBunchSize << endl;
79 // cout << "altrobunch.fEndTimeBin = " << altrobunchPtr->fEndTimeBin << endl;
91 float mikro = (float)(((float)end -(float)start)/((float)n_loops));
95 printf("\nProcessing time per event is %f us\n", mikro);
97 decoder->GetFailureRate();