37 #if !defined(__CINT__) || defined(__MAKECINT__)
40 #include "AliRawReader.h"
44 #include "TStopwatch.h"
45 #include "AliRawDataErrorLog.h"
46 #include "Riostream.h"
52 Int_t minDDL = 0, Int_t maxDDL = 19)
59 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
73 while (rawReader->NextEvent()) {
75 if (iEvent == maxEvent)
78 printf(
"Event %d\n",iEvent++);
81 while(rawStream.NextDDL()) {
83 if (rawStream.GetDDL() < minDDL || rawStream.GetDDL() > maxDDL)
86 printf(
"\niDDL %d\n", rawStream.GetDDL());
89 Int_t nBlock = rawStream.GetBlockCount();
90 for(Int_t iBlock = 0; iBlock < nBlock ;iBlock++){
92 blkHeader = rawStream.GetBlockHeader(iBlock);
96 Int_t nDsp = rawStream.GetDspCount(iBlock);
97 for(Int_t iDsp = 0; iDsp < nDsp ;iDsp++){
103 Int_t nBusPatch = rawStream.GetBusPatchCount(iBlock, iDsp);
104 for(Int_t iBusPatch = 0; iBusPatch < nBusPatch; iBusPatch++) {
110 for (Int_t iData = 0; iData < dataSize; iData++) {
112 Int_t manuId = busStruct->
GetManuId(iData);
114 Int_t charge = busStruct->
GetCharge(iData);
115 printf(
"buspatch %5d manuI %4d channel %3d charge %4d\n",
132 Int_t minDDL = 0, Int_t maxDDL = 19)
140 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
154 while (rawReader->NextEvent()) {
156 if (iEvent == maxEvent)
159 printf(
"Event %d\n",iEvent++);
162 while(rawStream.NextDDL()) {
164 if (rawStream.GetDDL() < minDDL || rawStream.GetDDL() > maxDDL)
167 printf(
"\niDDL %d\n", rawStream.GetDDL());
170 Int_t nBlock = rawStream.GetBlockCount();
171 for(Int_t iBlock = 0; iBlock < nBlock ;iBlock++){
173 blkHeader = rawStream.GetBlockHeader(iBlock);
177 Int_t nDsp = rawStream.GetDspCount(iBlock);
178 for(Int_t iDsp = 0; iDsp < nDsp ;iDsp++){
180 dspHeader = rawStream.GetDspHeader(iBlock, iDsp);
184 Int_t nBusPatch = rawStream.GetBusPatchCount(iBlock, iDsp);
185 for(Int_t iBusPatch = 0; iBusPatch < nBusPatch; iBusPatch++) {
187 busStruct = rawStream.GetBusPatch(iBlock, iDsp, iBusPatch);
191 for (Int_t iData = 0; iData < dataSize; iData++) {
193 Int_t manuId = busStruct->
GetManuId(iData);
195 Int_t charge = busStruct->
GetCharge(iData);
196 printf(
"buspatch %5d manuI %4d channel %3d charge %4d\n",
213 Int_t minDDL = 0, Int_t maxDDL = 19)
221 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
235 while (rawReader->NextEvent()) {
237 if (iEvent == maxEvent)
240 printf(
"Event %d\n",iEvent++);
243 while(rawStream.NextDDL()) {
245 if (rawStream.GetDDL() < minDDL || rawStream.GetDDL() > maxDDL)
248 printf(
"\niDDL %d\n", rawStream.GetDDL());
252 blkHeader = rawStream.GetFirstBlockHeader();
253 while (blkHeader != NULL)
260 while (dspHeader != NULL)
267 while (busStruct != NULL)
271 for (Int_t iData = 0; iData < dataSize; iData++) {
273 Int_t manuId = busStruct->
GetManuId(iData);
275 Int_t charge = busStruct->
GetCharge(iData);
276 printf(
"buspatch %5d manuI %4d channel %3d charge %4d\n",
281 busStruct = busStruct->
Next();
284 dspHeader = dspHeader->
Next();
287 blkHeader = blkHeader->
Next();
305 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
313 while (rawReader->NextEvent()) {
315 if (iEvent == maxEvent)
318 printf(
"Event %d\n",iEvent++);
321 UShort_t manuId, adc;
326 while ( rawStream.Next(busPatch,manuId,manuChannel,adc) )
328 printf(
"buspatch %5d manuI %4d channel %3d charge %4d\n",
329 busPatch,manuId,manuChannel, adc);
340 for ( Int_t i = 0; i < rawReader.GetNumberOfErrorLogs(); ++i )
342 AliRawDataErrorLog* error = rawReader.GetErrorLog(i);
346 cout << Form(
"Number of error logs : %d (%d events)",
347 rawReader.GetNumberOfErrorLogs(),
348 rawReader.GetNumberOfEvents()) << endl;
359 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
363 rawStream.EnableRawReaderErrorLogger();
368 while (rawReader->NextEvent()) {
370 if (iEvent == maxEvent)
373 printf(
"Event %d\n",iEvent++);
375 UShort_t manuId, adc;
380 while ((buspatch = rawStream.
Next()) != NULL)
384 buspatch->
GetData(i, manuId, manuChannel, adc);
385 printf(
"buspatch %5d manuI %4d channel %3d charge %4d\n",
404 AliRawReader* rawReader = AliRawReader::Create(fileName.Data());
408 rawStream.DisableWarnings();
412 rawStream.EnableMUONErrorLogger();
413 rawStream.SetMUONErrorLogger(&logger);
419 while (rawReader->NextEvent())
421 if (iEvent == maxEvent)
break;
427 while ((buspatch = rawStream.
Next()) != NULL)
A high performance stream decoder for muon tracking DDL streams.
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void Print(Option_t *opt="") const
void MUONRawStreamTrackerExpert(TString fileName="./", Int_t maxEvent=1000, Int_t minDDL=0, Int_t maxDDL=19)
UInt_t GetDataCount() const
Returns the number of raw data words within this bus patch.
Int_t GetLength() const
Return length of raw data.
A logger that keeps track of the number of times a message appeared.
Int_t GetBusPatchId() const
Return bus patch id.
void MUONRawStreamTrackerErrorCount(TString fileName="collection://filelist", Int_t maxEvent=-1)
const UInt_t * GetData() const
Return raw digit data.
void ShowErrors(const AliRawReader &rawReader)
Logs minimal information in the error messages.
void MUONRawStreamTrackerExpert3(TString fileName="./", Int_t maxEvent=1000, Int_t minDDL=0, Int_t maxDDL=19)
UShort_t GetManuId(UInt_t n) const
Returns the MANU ID of the n'th raw data word.
UShort_t GetCharge(UInt_t n) const
Returns the charge/signal of the n'th raw data word.
Light weight interface class to the bus patch data.
void MUONRawStreamTrackerSimple2(TString fileName="./", Int_t maxEvent=1000)
void MUONRawStreamTrackerExpert2(TString fileName="./", Int_t maxEvent=1000, Int_t minDDL=0, Int_t maxDDL=19)
UChar_t GetChannelId(UInt_t n) const
Returns the channel ID of the n'th raw data word.
Declaration of the high performance decoder for muon trigger chamber raw streams. ...
const AliBusPatch * Next() const
Return the next bus patch header.
void MUONRawStreamTrackerSimple(TString fileName="./", Int_t maxEvent=1000)