AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONRawStreamTriggerHP.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project *
3  * All rights reserved. *
4  * *
5  * Primary Authors: *
6  * Artur Szostak <artursz@iafrica.com> *
7  * *
8  * Permission to use, copy, modify and distribute this software and its *
9  * documentation strictly for non-commercial purposes is hereby granted *
10  * without fee, provided that the above copyright notice appears in all *
11  * copies and that both the copyright notice and this permission notice *
12  * appear in the supporting documentation. The authors make no claims *
13  * about the suitability of this software for any purpose. It is *
14  * provided "as is" without express or implied warranty. *
15  **************************************************************************/
16 
17 /* $Id$ */
18 
40 
42 #include "AliMUONDarcHeader.h"
43 #include "AliMUONRegHeader.h"
44 #include "AliMUONLocalStruct.h"
45 #include "AliMUONDDLTrigger.h"
46 #include "AliRawReader.h"
47 #include "AliLog.h"
48 #include <cassert>
49 #include <iostream>
50 using std::cout;
51 using std::endl;
52 using std::hex;
53 using std::dec;
54 
58 
59 const Int_t AliMUONRawStreamTriggerHP::fgkMaxDDL = 2;
60 bool AliMUONRawStreamTriggerHP::AliLocalStruct::fgOverrideId = true;
61 
63 AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fgkEmptyHeader = {
65  0,
66  {0, 0},
67  0
68 };
69 
70 
73  fDecoder(),
74  fDDL(0),
75  fBufferSize(8192),
76  fBuffer(new UChar_t[8192]),
77  fkCurrentLocalStruct(NULL),
78  fHadError(kFALSE),
79  fDone(kFALSE),
80  fDDLObject(NULL),
81  fTotalNumberOfDarcEoWErrors(0),
82  fTotalNumberOfGlobalEoWErrors(0),
83  fTotalNumberOfRegEoWErrors(0),
84  fTotalNumberOfLocalEoWErrors(0)
85 {
89 
90  fDecoder.ExitOnError(false);
91 
92  fDecoder.GetHandler().SetMaxStructs(
93  fDecoder.MaxRegionals(),
94  fDecoder.MaxLocals()
95  );
96 
97  fDecoder.GetHandler().SetRawStream(this);
98 }
99 
100 
102  AliMUONVRawStreamTrigger(rawReader),
103  fDecoder(),
104  fDDL(0),
105  fBufferSize(8192),
106  fBuffer(new UChar_t[8192]),
107  fkCurrentLocalStruct(NULL),
108  fHadError(kFALSE),
109  fDone(kFALSE),
110  fDDLObject(NULL),
111  fTotalNumberOfDarcEoWErrors(0),
112  fTotalNumberOfGlobalEoWErrors(0),
113  fTotalNumberOfRegEoWErrors(0),
114  fTotalNumberOfLocalEoWErrors(0)
115 {
119 
120  fDecoder.ExitOnError(false);
121 
122  fDecoder.GetHandler().SetMaxStructs(
123  fDecoder.MaxRegionals(),
124  fDecoder.MaxLocals()
125  );
126 
127  fDecoder.GetHandler().SetRawStream(this);
128 }
129 
130 
132 {
136 
137  if (fBuffer != NULL)
138  {
139  delete [] fBuffer;
140  }
141  if (fDDLObject != NULL)
142  {
143  delete fDDLObject;
144  }
145 }
146 
147 
149 {
152 
153  assert( GetReader() != NULL );
154 
155  fDDL = 0;
156  fDone = kFALSE;
157  NextDDL();
162 }
163 
164 
166 {
171 
172  assert( GetReader() != NULL );
173 
174  // The temporary object if generated in GetDDLTracker, is now stale,
175  // so delete it.
176  if (fDDLObject != NULL)
177  {
178  delete fDDLObject;
179  fDDLObject = NULL;
180  }
181 
182  fkCurrentLocalStruct = NULL;
183 
184  while (fDDL < GetMaxDDL())
185  {
186  GetReader()->Reset();
187  GetReader()->Select("MUONTRG", fDDL, fDDL); // Select the DDL file to be read.
188  if (GetReader()->ReadHeader()) break;
189  AliDebug(3, Form("Skipping DDL %d which does not seem to be there", fDDL+1));
190  fDDL++;
191  }
192 
193  // If we reach the end of the DDL list for this event then reset the
194  // DDL counter, mark the iteration as done and exit.
195  if (fDDL >= GetMaxDDL())
196  {
197  fDDL = 0;
198  fDone = kTRUE;
199  return kFALSE;
200  }
201  else
202  {
203  fDone = kFALSE;
204  }
205 
206  AliDebug(3, Form("DDL Number %d\n", fDDL));
207 
208  Int_t dataSize = GetReader()->GetDataSize(); // in bytes
209  // Check if we have enough buffer space already in fBuffer. If we do then
210  // just continue reading otherwise we need to resize the buffer.
211  if (fBufferSize < dataSize)
212  {
213  if (fBuffer != NULL)
214  {
215  delete [] fBuffer;
216  fBuffer = NULL;
217  fBufferSize = 0;
218  }
219  try
220  {
221  fBuffer = new UChar_t[dataSize];
222  fBufferSize = dataSize;
223  }
224  catch (const std::bad_alloc&)
225  {
226  AliError("Could not allocate more buffer space. Cannot decode DDL.");
227  return kFALSE;
228  }
229  }
230 
231  if (not GetReader()->ReadNext(fBuffer, dataSize))
232  {
233  return kFALSE;
234  }
235 
236 #ifndef R__BYTESWAP
237  Swap(reinterpret_cast<UInt_t*>(fBuffer), dataSize / sizeof(UInt_t)); // Swap needed for mac power pc.
238 #endif
239 
240  fDDL++; // Remember to increment index to next DDL before the calls to
241  // fDecoder.Decode since the callback methods of the decoder might
242  // use AliMUONRawStreamTriggerHP::GetDDL()
243 
244  // Check if this is a scalar event.
245  AliRawReader * reader = GetReader();
246  if (!reader) return kFALSE;
247 
248  const AliRawDataHeader * cdh = reader->GetDataHeader();
249  const AliRawDataHeaderV3 * cdh3 = reader->GetDataHeaderV3();
250 
251  if (!cdh && !cdh3) return kFALSE;
252 
253  bool scalerEvent = ((cdh ? cdh->GetL1TriggerMessage() : cdh3->GetL1TriggerMessage()) & 0x1) == 0x1;
254 
255  bool result = false;
256  try
257  {
258  // Since we might allocate memory inside OnNewBuffer in the event
259  // handler we need to trap any memory allocation exception to be robust.
260  result = fDecoder.Decode(fBuffer, dataSize, scalerEvent);
261  fHadError = (result == true ? kFALSE : kTRUE);
262  fTotalNumberOfDarcEoWErrors += fDecoder.GetHandler().GetDarcEoWErrors();
263  fTotalNumberOfGlobalEoWErrors += fDecoder.GetHandler().GetGlobalEoWErrors();
264  fTotalNumberOfRegEoWErrors += fDecoder.GetHandler().GetRegEoWErrors();
265  fTotalNumberOfLocalEoWErrors += fDecoder.GetHandler().GetLocalEoWErrors();
266  }
267  catch (const std::bad_alloc&)
268  {
269  AliError("Could not allocate more buffer space. Cannot decode DDL.");
270  return kFALSE;
271  }
272 
273  // Update the current local structure pointer.
274  fkCurrentLocalStruct = fDecoder.GetHandler().FirstLocalStruct();
275 
276  return kTRUE;
277 }
278 
279 
281 {
284 
285  return fDone;
286 }
287 
288 
290  UChar_t& id, UChar_t& dec, Bool_t& trigY,
291  UChar_t& yPos, UChar_t& sXDev, UChar_t& xDev,
292  UChar_t& xPos, Bool_t& triggerY, Bool_t& triggerX,
293  TArrayS& xPattern, TArrayS& yPattern
294  )
295 {
299 
300  const AliLocalStruct* localStruct = Next();
301  if (localStruct == NULL) return kFALSE;
302 
303  id = localStruct->GetId();
304  dec = localStruct->GetDec();
305  trigY = localStruct->GetTrigY();
306  yPos = localStruct->GetYPos();
307  sXDev = localStruct->GetSXDev();
308  xDev = localStruct->GetXDev();
309  xPos = localStruct->GetXPos();
310 
311  triggerX = localStruct->GetTriggerX();
312  triggerY = localStruct->GetTriggerY();
313 
314  localStruct->GetXPattern(xPattern);
315  localStruct->GetYPattern(yPattern);
316 
317  return kTRUE;
318 }
319 
320 
322 {
336 
337  if (fDDLObject != NULL) return fDDLObject;
338 
340 
341  // Copy over all DARC, global headers and scalars.
342  AliMUONDarcHeader* darcHeader = fDDLObject->GetDarcHeader();
343  const AliHeader* hdr = GetHeaders();
344  UInt_t word = hdr->GetDarcHeader();
345  memcpy(darcHeader->GetHeader(), &word, sizeof(word));
346  if (hdr->GetDarcScalars() != NULL)
347  {
348  memcpy(darcHeader->GetDarcScalers(), hdr->GetDarcScalars(), sizeof(AliMUONDarcScalarsStruct));
349  }
350  memcpy(darcHeader->GetGlobalInput(), hdr->GetGlobalHeader(), sizeof(AliMUONGlobalHeaderStruct));
351  if (hdr->GetGlobalScalars() != NULL)
352  {
353  memcpy(darcHeader->GetGlobalScalers(), hdr->GetGlobalScalars(), sizeof(AliMUONGlobalScalarsStruct));
354  }
355 
356  for (Int_t iReg = 0; iReg < (Int_t)GetRegionalHeaderCount(); iReg++)
357  {
358  AliMUONRegHeader regHeader;
359  AliMUONLocalStruct localStruct;
360 
361  const AliRegionalHeader* rh = GetRegionalHeader(iReg);
362  // Copy local structure and scalars and add everything into DDL object.
363  memcpy(regHeader.GetHeader(), rh->GetHeader(), sizeof(AliMUONRegionalHeaderStruct));
364  if (rh->GetScalars() != NULL)
365  {
366  memcpy(regHeader.GetScalers(), rh->GetScalars(), sizeof(AliMUONRegionalScalarsStruct));
367  }
368  fDDLObject->AddRegHeader(regHeader);
369 
370  const AliLocalStruct* lstruct = rh->GetFirstLocalStruct();
371  while (lstruct != NULL)
372  {
373  // Copy local structure and scalars and add everything into DDL object.
374  memcpy(localStruct.GetData(), lstruct->GetData(), sizeof(AliMUONLocalInfoStruct));
375  if (lstruct->GetScalars() != NULL)
376  {
377  memcpy(localStruct.GetScalers(), lstruct->GetScalars(), sizeof(AliMUONLocalScalarsStruct));
378  }
380  {
381  // Since the override ID flag is set, we need to replace the
382  // ID in the structure with the calculated one returned by GetId().
383  AliMUONLocalInfoStruct* strptr = reinterpret_cast<AliMUONLocalInfoStruct*>( localStruct.GetData() );
384  UInt_t triggerBits = strptr->fTriggerBits;
385  triggerBits &= ~(0xF << 19);
386  strptr->fTriggerBits = triggerBits | ((lstruct->GetId() & 0xF) << 19);
387  }
388  fDDLObject->AddLocStruct(localStruct, iReg);
389  lstruct = lstruct->Next();
390  }
391  }
392 
393  return fDDLObject;
394 }
395 
396 
398 {
400 
401  fDecoder.MaxRegionals( (UInt_t) reg );
402 
403  fDecoder.GetHandler().SetMaxStructs(
404  fDecoder.MaxRegionals(),
405  fDecoder.MaxLocals()
406  );
407 }
408 
409 
411 {
413 
414  fDecoder.MaxLocals( (UInt_t) loc );
415 
416  fDecoder.GetHandler().SetMaxStructs(
417  fDecoder.MaxRegionals(),
418  fDecoder.MaxLocals()
419  );
420 }
421 
423 
425 {
427 
428  cout << "===== DARC info =====" << endl;
429  cout << "Header bits : 0x" << hex << fDarcHeader << dec << endl;
430  if (fDarcScalars != NULL)
431  {
432  cout << "L0R : " << fDarcScalars->fL0R << " (0x"
433  << hex << fDarcScalars->fL0R << dec << ")" << endl;
434  cout << "L1P : " << fDarcScalars->fL1P << " (0x"
435  << hex << fDarcScalars->fL1P << dec << ")" << endl;
436  cout << "L1S : " << fDarcScalars->fL1S << " (0x"
437  << hex << fDarcScalars->fL1S << dec << ")" << endl;
438  cout << "L2A : " << fDarcScalars->fL2A << " (0x"
439  << hex << fDarcScalars->fL2A << dec << ")" << endl;
440  cout << "L2R : " << fDarcScalars->fL2R << " (0x"
441  << hex << fDarcScalars->fL2R << dec << ")" << endl;
442  cout << "Clock : " << fDarcScalars->fClk << " (0x"
443  << hex << fDarcScalars->fClk << dec << ")" << endl;
444  cout << "Hold : " << fDarcScalars->fHold << " (0x"
445  << hex << fDarcScalars->fHold << dec << ")" << endl;
446  cout << "Spare : " << fDarcScalars->fSpare << " (0x"
447  << hex << fDarcScalars->fSpare << dec << ")" << endl;
448  }
449  else
450  {
451  cout << "Scalars == NULL" << endl;
452  }
453 
454  cout << "===== Global info =====" << endl;
455  for (int i = 0; i < 4; i++)
456  {
457  cout << "Input[" << i << "] : " << fGlobalHeader->fInput[i] << " (0x"
458  << hex << fGlobalHeader->fInput[i] << dec << ")" << endl;
459  }
460  cout << "Output : " << fGlobalHeader->fOutput << " (0x"
461  << hex << fGlobalHeader->fOutput << dec << ")" << endl;
462  if (fGlobalScalars != NULL)
463  {
464  cout << "L0 : " << fGlobalScalars->fL0 << " (0x"
465  << hex << fGlobalScalars->fL0 << dec << ")" << endl;
466  cout << "Clock : " << fGlobalScalars->fClk << " (0x"
467  << hex << fGlobalScalars->fClk << dec << ")" << endl;
468  for (int j = 0; j < 4; j++)
469  {
470  cout << "Scaler[" << j << "] : " << fGlobalScalars->fScaler[j] << " (0x"
471  << hex << fGlobalScalars->fScaler[j] << dec << ")" << endl;
472  }
473  cout << "Hold : " << fGlobalScalars->fHold << " (0x"
474  << hex << fGlobalScalars->fHold << dec << ")" << endl;
475  cout << "Spare : " << fGlobalScalars->fSpare << " (0x"
476  << hex << fGlobalScalars->fSpare << dec << ")" << endl;
477  }
478  else
479  {
480  cout << "Scalars == NULL" << endl;
481  }
482 }
483 
485 {
487 
488  cout << "===== Regional card info =====" << endl;
489  cout << "DarcWord : " << fHeader->fDarcWord << " (0x"
490  << hex << fHeader->fDarcWord << dec << ")" << endl;
491  cout << "Word : " << fHeader->fWord << " (0x"
492  << hex << fHeader->fWord << dec << ")" << endl;
493  cout << "Input[0] : " << fHeader->fInput[0] << " (0x"
494  << hex << fHeader->fInput[0] << dec << ")" << endl;
495  cout << "Input[1] : " << fHeader->fInput[1] << " (0x"
496  << hex << fHeader->fInput[1] << dec << ")" << endl;
497  cout << "L0/Mask : " << fHeader->fL0CountAndMask << " (0x"
498  << hex << fHeader->fL0CountAndMask << dec << ")" << endl;
499  if (fScalars != NULL)
500  {
501  cout << "Clock : " << fScalars->fClk << " (0x"
502  << hex << fScalars->fClk << dec << ")" << endl;
503  for (int i = 0; i < 8; i++)
504  {
505  cout << "Scaler[" << i << "] : " << fScalars->fScaler[i] << " (0x"
506  << hex << fScalars->fScaler[i] << dec << ")" << endl;
507  }
508  cout << "Hold : " << fScalars->fHold << " (0x"
509  << hex << fScalars->fHold << dec << ")" << endl;
510  }
511  else
512  {
513  cout << "Scalars == NULL" << endl;
514  }
515 }
516 
518 {
520 
521  cout << "===== Local card info =====" << endl;
522  cout << "X2X1 : " << fLocalStruct->fX2X1 << " (0x"
523  << hex << fLocalStruct->fX2X1 << dec << ")" << endl;
524  cout << "X4X3 : " << fLocalStruct->fX4X3 << " (0x"
525  << hex << fLocalStruct->fX4X3 << dec << ")" << endl;
526  cout << "Y2Y1 : " << fLocalStruct->fY2Y1 << " (0x"
527  << hex << fLocalStruct->fY2Y1 << dec << ")" << endl;
528  cout << "Y4Y3 : " << fLocalStruct->fY4Y3 << " (0x"
529  << hex << fLocalStruct->fY4Y3 << dec << ")" << endl;
530  cout << "Trigger bits : " << fLocalStruct->fTriggerBits << " (0x"
531  << hex << fLocalStruct->fTriggerBits << dec << ")" << endl;
532  if (fScalars != NULL)
533  {
534  cout << "L0 : " << fScalars->fL0 << " (0x"
535  << hex << fScalars->fL0 << dec << ")" << endl;
536  cout << "Hold : " << fScalars->fHold << " (0x"
537  << hex << fScalars->fHold << dec << ")" << endl;
538  cout << "Clock : " << fScalars->fClk << " (0x"
539  << hex << fScalars->fClk << dec << ")" << endl;
540  cout << "LPtNTrig : " << fScalars->fLPtNTrig << " (0x"
541  << hex << fScalars->fLPtNTrig << dec << ")" << endl;
542  cout << "HPtNTrig : " << fScalars->fHPtNTrig << " (0x"
543  << hex << fScalars->fHPtNTrig << dec << ")" << endl;
544  cout << "LPtRTrig : " << fScalars->fLPtRTrig << " (0x"
545  << hex << fScalars->fLPtRTrig << dec << ")" << endl;
546  cout << "HPtRTrig : " << fScalars->fHPtRTrig << " (0x"
547  << hex << fScalars->fHPtRTrig << dec << ")" << endl;
548  cout << "LPtLTrig : " << fScalars->fLPtLTrig << " (0x"
549  << hex << fScalars->fLPtLTrig << dec << ")" << endl;
550  cout << "HPtLTrig : " << fScalars->fHPtLTrig << " (0x"
551  << hex << fScalars->fHPtLTrig << dec << ")" << endl;
552  cout << "LPtSTrig : " << fScalars->fLPtSTrig << " (0x"
553  << hex << fScalars->fLPtSTrig << dec << ")" << endl;
554  cout << "HPtSTrig : " << fScalars->fHPtSTrig << " (0x"
555  << hex << fScalars->fHPtSTrig << dec << ")" << endl;
556  for (int i = 0; i < 8*4; i++)
557  {
558  cout << "Scaler[" << i << "] : " << fScalars->fScaler[i] << " (0x"
559  << hex << fScalars->fScaler[i] << dec << ")" << endl;
560  }
561  cout << "EOS : " << fScalars->fEOS << " (0x"
562  << hex << fScalars->fEOS << dec << ")" << endl;
563  cout << "Reset : " << fScalars->fReset << " (0x"
564  << hex << fScalars->fReset << dec << ")" << endl;
565  }
566  else
567  {
568  cout << "Scalars == NULL" << endl;
569  }
570 }
571 
573 
575  fRawStream(NULL),
576  fBufferStart(NULL),
577  fDarcHeader(0),
578  fDarcScalars(NULL),
579  fHeaders(),
580  fRegionalsCount(0),
581  fRegionals(NULL),
582  fLocals(NULL),
583  fEndOfLocals(NULL),
584  fCurrentRegional(NULL),
585  fCurrentLocal(NULL),
586  fDarcEoWErrors(0),
587  fGlobalEoWErrors(0),
588  fRegEoWErrors(0),
589  fLocalEoWErrors(0),
590  fWarnings(kTRUE)
591 {
593 }
594 
595 
597 {
599 
600  if (fRegionals != NULL) delete [] fRegionals;
601  if (fLocals != NULL) delete [] fLocals;
602 }
603 
604 
606  UInt_t maxRegionals, UInt_t maxLocals
607  )
608 {
610 
611  // Start by clearing the current arrays.
612  if (fRegionals != NULL)
613  {
614  delete [] fRegionals;
615  fRegionals = NULL;
616  }
617  if (fLocals != NULL)
618  {
619  delete [] fLocals;
620  fLocals = NULL;
621  fEndOfLocals = NULL;
622  }
623  fCurrentRegional = NULL;
624  fCurrentLocal = NULL;
625 
626  // Allocate new memory.
627  fRegionals = new AliRegionalHeader[maxRegionals];
628  fLocals = new AliLocalStruct[maxRegionals*maxLocals];
629  fEndOfLocals = fLocals;
630 
631  fRegionalsCount = maxRegionals;
632 }
633 
634 
636  const void* buffer, UInt_t /*bufferSize*/
637  )
638 {
641 
642  assert( fRawStream != NULL );
643 
644  // remember the start of the buffer to be used in OnError.
645  fBufferStart = buffer;
646 
647  // Reset error counters.
648  fDarcEoWErrors = 0;
649  fGlobalEoWErrors = 0;
650  fRegEoWErrors = 0;
651  fLocalEoWErrors = 0;
652 
653  // Reset the current local structure pointer which will be used to track
654  // where we need to fill fLocals. We have to subtract one space because we
655  // will increment the pointer the first time in the OnLocalStruct method.
656  fCurrentLocal = fLocals-1;
657 
658  fCurrentRegional = NULL;
659 
660  // Reset and link up all the regional structures together.
661  for (UInt_t i = 0; i+1 < fRegionalsCount; i++)
662  {
663  fRegionals[i] = AliRegionalHeader(fLocals, &fgkEmptyHeader, NULL);
664  fRegionals[i].SetNext(&fRegionals[i+1]);
665  }
666  // Reset the last structure.
667  fRegionals[fRegionalsCount-1] = AliRegionalHeader(fLocals, &fgkEmptyHeader, NULL);
668 }
669 
670 
672  ErrorCode error, const void* location
673  )
674 {
682 
683  assert( fRawStream != NULL );
684  assert( fRawStream->GetReader() != NULL );
685 
686  Char_t* message = NULL;
687  //UInt_t word = 0;
688 
689  switch (error)
690  {
691  case kWrongEventType:
692  message = Form("Wrong event type obtained from the Darc header, take the one of CDH");
693  break;
694 
695  case kBadEndOfDarc:
696  fDarcEoWErrors++;
697  message = Form(
698  "Wrong end of Darc word %x instead of %x\n",
699  *reinterpret_cast<const UInt_t*>(location),
701  );
702  fRawStream->GetReader()->AddMajorErrorLog(kDarcEoWErr, message);
703  break;
704 
705  case kBadEndOfGlobal:
706  fGlobalEoWErrors++;
707  message = Form(
708  "Wrong end of Global word %x instead of %x\n",
709  *reinterpret_cast<const UInt_t*>(location),
711  );
712  fRawStream->GetReader()->AddMajorErrorLog(kGlobalEoWErr, message);
713  break;
714 
715  case kBadEndOfRegional:
716  fRegEoWErrors++;
717  message = Form(
718  "Wrong end of Regional word %x instead of %x\n",
719  *reinterpret_cast<const UInt_t*>(location),
721  );
722  fRawStream->GetReader()->AddMajorErrorLog(kRegEoWErr, message);
723  break;
724 
725  case kBadEndOfLocal:
726  fLocalEoWErrors++;
727  message = Form(
728  "Wrong end of Local word %x instead of %x\n",
729  *reinterpret_cast<const UInt_t*>(location),
731  );
732  fRawStream->GetReader()->AddMajorErrorLog(kLocalEoWErr, message);
733  break;
734 
735  default:
736  message = Form(
737  "%s (At byte %lu in DDL.)",
738  ErrorCodeToMessage(error),
739  (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3)
740  );
741  fRawStream->GetReader()->AddMajorErrorLog(error, message);
742  break;
743  }
744 
745  if (fWarnings)
746  {
747  AliWarningGeneral(
748  "AliMUONRawStreamTriggerHP::AliDecoderEventHandler",
749  message
750  );
751  }
752 }
753 
UInt_t fScaler[6]
Global card ouput scalars.
const AliMUONRegionalScalarsStruct * GetScalars() const
Return the raw data of the regional scalars or NULL if none exist.
void GetXPattern(TArrayS &array) const
return X pattern array
const AliHeader * GetHeaders() const
Returns the DARC and global headers plus scalars if they exist.
Light weight interface class to the local trigger card data.
The optional DARC board scalars.
void OnNewBuffer(const void *buffer, UInt_t bufferSize)
New buffer handler.
static UInt_t RegionalErrorWord()
Returns the regional error word.
Int_t fBufferSize
! This is the buffer size in bytes of fBuffer.
Rawdata local card structure for trigger.
const AliMUONRegionalHeaderStruct * GetHeader() const
Return raw data of regional header.
const AliLocalStruct * Next()
Returns the next local trigger structure.
const AliMUONDarcScalarsStruct * GetDarcScalars() const
Return the DARC scalars raw data or NULL if none exist.
virtual void Swap(UInt_t *buffer, Int_t size) const
swap method for Power PC
ErrorCode
All the possible error codes from the parsing.
A high performance decoder class for MUON trigger DDL data.
UInt_t * GetDarcScalers()
Return DARC L0 received and used.
The global input and output words just after the DARC header.
virtual Bool_t NextDDL()
DDL iterator.
Light weight interface class to the DARC and global header data.
const AliRegionalHeader * GetRegionalHeader(UInt_t i) const
Return the i'th regional header or NULL if not found.
const AliMUONGlobalHeaderStruct * GetGlobalHeader() const
Return the global header's raw data.
Higher performance decoder stream class for reading MUON raw trigger data.
virtual void SetMaxReg(Int_t reg)
Set the maximum number of regional cards in the DDL.
Local card trigger information.
UInt_t fL0R
DARC L0 received and used.
MUON regional header for trigger.
UInt_t GetData(Int_t n) const
Return local data.
const AliMUONGlobalHeaderStruct * fGlobalHeader
Pointer to global header in DDL payload.
void OnError(ErrorCode error, const void *location)
Error handler.
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
UInt_t GetDarcHeader() const
Return the DARC header's raw data.
UInt_t fClk
Global number of clock cycles.
UInt_t * GetScalers()
Return scalers.
AliMUONDarcHeader * GetDarcHeader() const
get AliMUONDarcHeader
Base class for reading MUON raw trigger data.
UInt_t fHold
Global number of hold (dead time)
UInt_t * GetHeader()
Return header.
UInt_t * GetHeader()
Return header.
Bool_t fHadError
! Flag indicating if there was a decoding error or not.
UInt_t fL0
Global number of L0 triggers.
static bool GetOverrideIdFlag()
Returns the override flag indicating if the GetId method should return the calculated Id value or not...
void SetMaxStructs(UInt_t maxRegionals, UInt_t maxLocals)
Sets the internal arrays based on the maximum number of structures allowed.
const AliLocalStruct * GetFirstLocalStruct() const
Returns the first AliLocalStruct class in this regional structure.
The optional global card scalars.
Bool_t GetSXDev() const
Get Sign of X deviation.
MUON Darc header for Trigger.
virtual void SetMaxLoc(Int_t loc)
Sets the maximum number of local cards in the DDL.
Light weight interface class to the regional card header data.
UInt_t fTotalNumberOfLocalEoWErrors
! The total number of end of local word errors since the last call to First().
AliMUONTriggerDDLDecoder< AliDecoderEventHandler > fDecoder
! The decoder for the DDL payload.
UInt_t GetGlobalInput(Int_t n) const
Return global input.
Bool_t fDone
! Flag indicating if the iteration is done or not.
void Print() const
Print the contents of the local trigger structure and contents to screen.
void GetYPattern(TArrayS &array) const
return Y pattern array
UInt_t fTotalNumberOfDarcEoWErrors
! The total number of end of DARC word errors since the last call to First().
void Print() const
Print the contents of the regional header and scalars to screen.
const AliMUONGlobalScalarsStruct * GetGlobalScalars() const
Return the global scalars raw data or NULL if none exist.
virtual Int_t GetMaxDDL() const
Return maximum number of DDLs.
const AliLocalStruct * fkCurrentLocalStruct
! The current local trigger structure being handled by Next().
UInt_t fDarcHeader
Pointer to DARC header in DDL payload.
void Print() const
Print the contents of the headers to screen.
UInt_t fInput[4]
Global input. 8-bit words comming from the each of the 16 regional controlers.
UChar_t * fBuffer
! This is the buffer in which we store the DDL payload read from AliRawReader.
const AliMUONLocalScalarsStruct * GetScalars() const
virtual Bool_t IsDone() const
Whether the iteration is finished or not.
UInt_t GetRegionalHeaderCount() const
Return the number of regional structures in the DDL payload.
void AddRegHeader(const AliMUONRegHeader &regHeader)
UInt_t * GetScalers()
Return scalers.
AliMUONDDLTrigger * fDDLObject
! Temporary DDL object used by GetDDLTrigger() for caching.
const AliLocalStruct * Next() const
Return the next local trigger structure.
Int_t fDDL
! The current DDL number being handled.
virtual AliMUONDDLTrigger * GetDDLTrigger() const
Construct and return a pointer to the DDL payload object.
UInt_t fSpare
DARC Empty slot (for the moment)
MUON DDL Trigger.
UInt_t GetData(Int_t n) const
Return local data.
UInt_t * GetGlobalScalers()
Return global L0.
UInt_t fTotalNumberOfRegEoWErrors
! The total number of end of regional word errors since the last call to First(). ...
virtual void First()
Initialize iterator.
UInt_t fTotalNumberOfGlobalEoWErrors
! The total number of end of global word errors since the last call to First().
const AliMUONDarcScalarsStruct * fDarcScalars
Pointer to DARC scalars in DDL payload.
virtual AliRawReader * GetReader()
Get object for reading the raw data.
void AddLocStruct(const AliMUONLocalStruct &loc, Int_t iReg)
const AliMUONGlobalScalarsStruct * fGlobalScalars
Pointer to global scalars in DDL payload.
UInt_t fTriggerBits
Trigger bits and deviation.