1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Artur Szostak <artursz@iafrica.com> *
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 **************************************************************************/
20 /// \file AliMUONRawStreamTrackerHP.cxx
21 /// \author Artur Szostak <artursz@iafrica.com>
23 /// \brief Implementation of the the high performance decoder AliMUONRawStreamTrackerHP.
26 //-----------------------------------------------------------------------------
28 /// \class AliMUONRawStreamTrackerHP
29 /// \brief A high performance stream decoder for muon tracking DDL streams.
31 /// This is the raw stream class which interfaces between the high performance
32 /// core decoder and the AliRawReader class.
33 /// To gain the most out of the decoder, the Next() method which returns batches
34 /// of decoded digit / channel information should be used. That is:
36 /// const AliBusPatch* Next();
39 /// This decoder tries to implement as similar an interface as possible to
40 /// AliMUONRawStreamTracker where possible. However certain constructs which
41 /// would slow us down too much are avoided.
43 /// \author Artur Szostak <artursz@iafrica.com>
44 //-----------------------------------------------------------------------------
46 #include "AliMUONRawStreamTrackerHP.h"
47 #include "AliMUONTrackerDDLDecoder.h"
48 #include "AliMUONDspHeader.h"
49 #include "AliMUONBlockHeader.h"
50 #include "AliMUONBusStruct.h"
51 #include "AliMUONDDLTracker.h"
52 #include "AliMUONLogger.h"
53 #include "AliRawReader.h"
54 #include "AliRawDataHeaderV3.h"
65 ClassImp(AliMUONRawStreamTrackerHP)
68 const Int_t AliMUONRawStreamTrackerHP::fgkMaxDDL = 20;
70 AliMUONRawStreamTrackerHP::AliMUONRawStreamTrackerHP() :
74 fDetailLevel(kMediumErrorDetail),
75 fEnableMUONErrorLogger(kFALSE),
76 fEnableRawReaderErrorLogger(kFALSE),
81 fBuffer(new UChar_t[8192]),
82 fkCurrentBusPatch(NULL),
88 fTotalNumberOfGlitchErrors(0),
89 fTotalNumberOfParityErrors(0),
90 fTotalNumberOfPaddingErrors(0),
91 fTotalNumberOfTokenLostErrors(0)
94 /// Default constructor.
97 // Must set this flag to get all information about parity errors though
98 // the OnData method. OnError gets them either way.
99 fDecoder.ExitOnError(false);
100 fDecoder.SendDataOnParityError(true);
102 fDecoder.GetHandler().SetMaxStructs(
103 fDecoder.MaxBlocks(),
105 fDecoder.MaxBusPatches()
108 fDecoder.GetHandler().SetRawStream(this);
112 AliMUONRawStreamTrackerHP::AliMUONRawStreamTrackerHP(AliRawReader* rawReader) :
114 fRawReader(rawReader),
116 fDetailLevel(kMediumErrorDetail),
117 fEnableMUONErrorLogger(kFALSE),
118 fEnableRawReaderErrorLogger(kFALSE),
123 fBuffer(new UChar_t[8192]),
124 fkCurrentBusPatch(NULL),
130 fTotalNumberOfGlitchErrors(0),
131 fTotalNumberOfParityErrors(0),
132 fTotalNumberOfPaddingErrors(0),
133 fTotalNumberOfTokenLostErrors(0)
136 /// Constructor with AliRawReader as argument.
139 // Must set this flag to get all information about parity errors though
140 // the OnData method. OnError gets them either way.
141 fDecoder.ExitOnError(false);
142 fDecoder.SendDataOnParityError(true);
144 fDecoder.GetHandler().SetMaxStructs(
145 fDecoder.MaxBlocks(),
147 fDecoder.MaxBusPatches()
150 fDecoder.GetHandler().SetRawStream(this);
154 AliMUONRawStreamTrackerHP::~AliMUONRawStreamTrackerHP()
157 /// Default destructor.
164 if (fDDLObject != NULL)
171 void AliMUONRawStreamTrackerHP::First()
173 /// Initialise or reset the iterator.
174 /// The first DDL will be found and decoded.
176 assert( GetReader() != NULL );
181 fTotalNumberOfGlitchErrors = 0;
182 fTotalNumberOfPaddingErrors = 0;
183 fTotalNumberOfParityErrors = 0;
184 fTotalNumberOfTokenLostErrors = 0;
188 Bool_t AliMUONRawStreamTrackerHP::NextDDL()
190 /// Reading the next tracker DDL and decode the payload with the
191 /// high performance decoder.
192 /// \return kTRUE if the next DDL was successfully read and kFALSE otherwise.
194 assert( GetReader() != NULL );
196 // The temporary object if generated in GetDDLTracker, is now stale,
198 if (fDDLObject != NULL)
204 // Better to reset these pointers.
205 fkCurrentBusPatch = NULL;
206 fkCurrentData = NULL;
209 while (fDDL < GetMaxDDL())
211 GetReader()->Reset();
212 GetReader()->Select("MUONTRK", fDDL, fDDL); // Select the DDL file to be read.
213 if (GetReader()->ReadHeader()) break;
214 AliDebug(3, Form("Skipping DDL %d which does not seem to be there", fDDL+1));
218 // If we reach the end of the DDL list for this event then reset the
219 // DDL counter, mark the iteration as done and exit.
220 if (fDDL >= GetMaxDDL())
231 AliDebug(3, Form("DDL Number %d\n", fDDL));
233 Int_t dataSize = GetReader()->GetDataSize(); // in bytes
234 // Check if we have enough buffer space already in fBuffer. If we do then
235 // just continue reading otherwise we need to resize the buffer.
236 if (fBufferSize < dataSize)
246 fBuffer = new UChar_t[dataSize];
247 fBufferSize = dataSize;
249 catch (const std::bad_alloc&)
251 AliError("Could not allocate more buffer space. Cannot decode DDL.");
256 if (not GetReader()->ReadNext(fBuffer, dataSize))
262 Swap(reinterpret_cast<UInt_t*>(fBuffer), dataSize / sizeof(UInt_t)); // Swap needed for mac power pc.
265 fDDL++; // Remember to increment index to next DDL before the calls to
266 // fDecoder.Decode since the callback methods of the decoder will
267 // use AliMUONRawStreamTrackerHP::GetDDL()
272 // Since we might allocate memory inside OnNewBuffer in the event
273 // handler we need to trap any memory allocation exception to be robust.
274 result = fDecoder.Decode(fBuffer, dataSize);
275 fHadError = (result == true ? kFALSE : kTRUE);
276 fTotalNumberOfGlitchErrors += fDecoder.GetHandler().GlitchErrorCount();
277 fTotalNumberOfParityErrors += fDecoder.GetHandler().ParityErrorCount();
278 fTotalNumberOfPaddingErrors += fDecoder.GetHandler().PaddingErrorCount();
279 fTotalNumberOfTokenLostErrors += fDecoder.GetHandler().TokenLostCount();
281 catch (const std::bad_alloc&)
283 AliError("Could not allocate more buffer space. Cannot decode DDL.");
287 // Update the current bus patch pointers.
288 fkCurrentBusPatch = fDecoder.GetHandler().FirstBusPatch();
289 if (fkCurrentBusPatch != fDecoder.GetHandler().EndOfBusPatch())
291 fkCurrentData = fkCurrentBusPatch->GetData();
292 fkEndOfData = fkCurrentData + fkCurrentBusPatch->GetDataCount();
296 // If the DDL did not have any bus patches then mark both fCurrentData
297 // and fEndOfData as NULL so that in Next() we are forced to find the
298 // first non empty DDL.
299 fkCurrentData = fkEndOfData = NULL;
306 Bool_t AliMUONRawStreamTrackerHP::IsDone() const
308 /// Indicates whether the iteration is finished or not.
309 /// \return kTRUE if we already read all the digits and kFALSE if not.
315 Bool_t AliMUONRawStreamTrackerHP::Next(Int_t& busPatchId,
317 UChar_t& manuChannel,
319 Bool_t skipParityErrors)
321 /// Advance one step in the iteration. Returns false if finished.
322 /// [out] \param busPatchId This is filled with the bus patch ID of the digit.
323 /// [out] \param manuId This is filled with the MANU ID of the digit.
324 /// [out] \param manuChannel This is filled with the MANU channel ID of the digit.
325 /// [out] \param adc This is filled with the ADC signal value of the digit.
326 /// [in] \param skipParityErrors If this is kTRUE, we'll skip the buspatches that
327 /// have some parity errors
328 /// \return kTRUE if we read another digit and kFALSE if we have read all the
329 /// digits already, i.e. at the end of the iteration.
331 if (fkCurrentData == NULL) return kFALSE;
334 // Check if we still have data to be returned for the current bus patch.
335 if (fkCurrentData != fkEndOfData)
337 busPatchId = fkCurrentBusPatch->GetBusPatchId();
338 AliMUONTrackerDDLDecoderEventHandler::UnpackADC(*fkCurrentData, manuId, manuChannel, adc);
344 // We hit the end of the current bus patch so check if we have any more
345 // bus patches to process for the current DDL. If we do, then increment
346 // the current bus patch, make sure it is not the last one and then try
347 // reading the first element again.
348 if (fkCurrentBusPatch != fDecoder.GetHandler().EndOfBusPatch())
351 if (fkCurrentBusPatch != fDecoder.GetHandler().EndOfBusPatch())
353 fkCurrentData = fkCurrentBusPatch->GetData();
354 fkEndOfData = fkCurrentData + fkCurrentBusPatch->GetDataCount();
355 if ( skipParityErrors )
358 for ( Int_t i = 0; i < fkCurrentBusPatch->GetLength() && ok; ++ i )
360 ok = fkCurrentBusPatch->IsParityOk(i);
362 if (!ok) fkCurrentData = fkEndOfData;
368 // This was the last bus patch in the DDL so read in the next one and
369 // try reading the first data element again.
370 // Note: fCurrentBusPatch is set inside NextDDL().
371 if (NextDDL()) goto retry;
377 AliMUONDDLTracker* AliMUONRawStreamTrackerHP::GetDDLTracker() const
379 /// Construct and return a pointer to the DDL payload object.
380 /// \return Pointer to internally constructed AliMUONDDLTracker object.
381 /// The object is owned by this class and should not be deleted
384 /// \note This method should not be used just to gain access to the DDL
385 /// payload, unless there is a good reason to have the AliMUONDDLTracker
386 /// object. For example, if you want to modify the data and then save it
387 /// to another DDL stream. Otherwise it can be an order of magnitude
388 /// faster to access the DDL headers and data with the GetBlockHeader,
389 /// GetDspHeader and GetBusPatch methods for example.
390 /// Refer to the MUONRawStreamTracker.C macro to see how to use the fast
391 /// decoder interface optimally.
393 if (fDDLObject != NULL) return fDDLObject;
395 fDDLObject = new AliMUONDDLTracker;
396 for (Int_t iBlock = 0; iBlock < (Int_t)GetBlockCount(); iBlock++)
398 AliMUONBlockHeader blockHeader;
399 AliMUONDspHeader dspHeader;
400 AliMUONBusStruct busPatch;
402 const AliBlockHeader* bh = GetBlockHeader(iBlock);
403 // Copy block header and add it to the DDL object.
404 memcpy(blockHeader.GetHeader(), bh->GetHeader(), sizeof(AliMUONBlockHeaderStruct));
405 fDDLObject->AddBlkHeader(blockHeader);
407 for (Int_t iDsp = 0; iDsp < (Int_t)bh->GetDspCount(); iDsp++)
409 const AliDspHeader* dh = bh->GetDspHeader(iDsp);
410 // Copy DSP header and add it to the DDL object.
411 memcpy(dspHeader.GetHeader(), dh->GetHeader(), sizeof(AliMUONDSPHeaderStruct));
412 fDDLObject->AddDspHeader(dspHeader, iBlock);
414 const AliBusPatch* bp = dh->GetFirstBusPatch();
417 // Copy bus patch header, data and add everything into DDL object.
418 memcpy(busPatch.GetHeader(), bp->GetHeader(), sizeof(AliMUONBusPatchHeaderStruct));
419 busPatch.SetAlloc(bp->GetLength());
420 memcpy(busPatch.GetData(), bp->GetData(), bp->GetDataCount()*sizeof(UInt_t));
421 busPatch.SetBlockId(iBlock);
422 busPatch.SetDspId(iDsp);
423 fDDLObject->AddBusPatch(busPatch, iBlock, iDsp);
433 void AliMUONRawStreamTrackerHP::SetMaxBlock(Int_t blk)
435 /// Set maximum number of blocks per DDL allowed.
436 fDecoder.MaxBlocks( (UInt_t) blk );
438 fDecoder.GetHandler().SetMaxStructs(
439 fDecoder.MaxBlocks(),
441 fDecoder.MaxBusPatches()
446 void AliMUONRawStreamTrackerHP::SetMaxDsp(Int_t dsp)
448 /// Set maximum number of Dsp per block allowed.
449 fDecoder.MaxDSPs( (UInt_t) dsp );
451 fDecoder.GetHandler().SetMaxStructs(
452 fDecoder.MaxBlocks(),
454 fDecoder.MaxBusPatches()
459 void AliMUONRawStreamTrackerHP::SetMaxBus(Int_t bus)
461 /// Set maximum number of Buspatch per Dsp allowed.
462 fDecoder.MaxBusPatches( (UInt_t) bus );
464 fDecoder.GetHandler().SetMaxStructs(
465 fDecoder.MaxBlocks(),
467 fDecoder.MaxBusPatches()
471 ///////////////////////////////////////////////////////////////////////////////
473 void AliMUONRawStreamTrackerHP::AliBlockHeader::Print() const
475 /// Print header to screen.
477 cout << "CRT info" << endl;
480 cout << "Header is NULL" << endl;
483 cout << "DataKey: 0x" << hex << fHeader->fDataKey << dec << endl;
484 cout << "TotalLength: " << fHeader->fTotalLength << endl;
485 cout << "Length: " << fHeader->fLength << endl;
486 cout << "DspId: " << fHeader->fDSPId << endl;
487 cout << "L0Trigger: " << fHeader->fL0Trigger << endl;
488 cout << "MiniEventId: " << fHeader->fMiniEventId<< endl;
489 cout << "EventId1: " << fHeader->fEventId1 << endl;
490 cout << "EventId2: " << fHeader->fEventId2 << endl;
494 void AliMUONRawStreamTrackerHP::AliDspHeader::Print() const
496 /// Print header to screen.
498 cout << "FRT info" << endl;
501 cout << "Header is NULL" << endl;
504 cout << "DataKey: 0x" << hex << fHeader->fDataKey << dec << endl;
505 cout << "TotalLength: " << fHeader->fTotalLength << endl;
506 cout << "Length : " << fHeader->fLength << endl;
507 cout << "DspId: " << fHeader->fDSPId << endl;
508 cout << "BlkL1ATrigger: " << fHeader->fBlkL1ATrigger << endl;
509 cout << "MiniEventId: " << fHeader->fMiniEventId << endl;
510 cout << "L1ATrigger: " << fHeader->fL1ATrigger << endl;
511 cout << "L1RTrigger: " << fHeader->fL1RTrigger << endl;
512 cout << "PaddingWord: " << fHeader->fPaddingWord << endl;
513 cout << "ErrorWord: " << fHeader->fErrorWord << endl;
517 void AliMUONRawStreamTrackerHP::AliBusPatch::Print(const Option_t* opt) const
519 /// Print header to screen.
520 cout << "Bus patch info" << endl;
523 cout << "Header is NULL" << endl;
526 cout << "DataKey: 0x" << hex << fHeader->fDataKey << dec << endl;
527 cout << "fTotalLength: " << fHeader->fTotalLength << endl;
528 cout << "fLength: " << fHeader->fLength << endl;
529 cout << "fBusPatchId: " << fHeader->fBusPatchId << endl;
531 if (TString(opt).Contains("all"))
533 for (UInt_t i = 0; i < fHeader->fLength; ++i)
534 cout << "Data["<< i << "] = " << fData[i] << endl;
538 ///////////////////////////////////////////////////////////////////////////////
540 AliMUONRawStreamTrackerHP::AliDecoderEventHandler::AliDecoderEventHandler() :
547 fEndOfBusPatches(NULL),
549 fParityOk(new Bool_t[8192]),
552 fCurrentBusPatch(NULL),
553 fCurrentParityOkFlag(NULL),
562 /// Default constructor initialises the internal parity flags buffer to
563 /// store 8192 elements. This array will grow dynamically if needed.
567 AliMUONRawStreamTrackerHP::AliDecoderEventHandler::~AliDecoderEventHandler()
569 /// Default destructor cleans up the allocated memory.
571 if (fParityOk != NULL) delete [] fParityOk;
572 if (fBlocks != NULL) delete [] fBlocks;
573 if (fDSPs != NULL) delete [] fDSPs;
574 if (fBusPatches != NULL) delete [] fBusPatches;
578 void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::SetMaxStructs(
579 UInt_t maxBlocks, UInt_t maxDsps, UInt_t maxBusPatches
582 /// Sets the maximum number of structures allowed.
584 // Start by clearing the current arrays.
595 if (fBusPatches != NULL)
597 delete [] fBusPatches;
600 fCurrentBlock = NULL;
602 fCurrentBusPatch = NULL;
604 // Allocate new memory.
605 fBlocks = new AliBlockHeader[maxBlocks];
606 fDSPs = new AliDspHeader[maxBlocks*maxDsps];
607 fBusPatches = new AliBusPatch[maxBlocks*maxDsps*maxBusPatches];
608 fEndOfBusPatches = fBusPatches;
610 fMaxBlocks = maxBlocks;
612 fMaxBusPatches = maxBusPatches;
616 void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnNewBuffer(
617 const void* buffer, UInt_t bufferSize
620 /// This is called by the high performance decoder when a new DDL payload
621 /// is about to be decoded.
622 /// \param buffer The pointer to the buffer storing the DDL payload.
623 /// \param bufferSize The size of the buffer in bytes.
625 // remember the start of the buffer to be used in OnError.
626 fBufferStart = buffer;
628 // Reset error counters.
632 fTokenLostErrors = 0;
634 // Check if we will have enough space in the fParityOk array.
635 // If we do not then we need to resize the array.
636 // bufferSize / sizeof(UInt_t) will be a safe over estimate of the
637 // number of channels that we will find.
638 UInt_t maxChannelsPossible = bufferSize / sizeof(UInt_t);
639 if (maxChannelsPossible > fMaxChannels)
641 if (fParityOk != NULL)
647 fParityOk = new Bool_t[maxChannelsPossible];
648 fMaxChannels = maxChannelsPossible;
651 // Reset the current pointers which will be used to track where we need to
652 // fill fBlocks, fDSPs, fBusPatches and the parity flag. We have to subtract
653 // one space because we will increment the pointer the first time in the
655 fCurrentBlock = fBlocks-1;
656 fCurrentDSP = fDSPs-1;
657 fCurrentBusPatch = fBusPatches-1;
658 fCurrentParityOkFlag = fParityOk-1;
663 void AliMUONRawStreamTrackerHP::Swap(UInt_t* buffer, Int_t size) const
665 // swap from little to big endian
668 UInt_t b1:8; ///< first byte word
669 UInt_t b2:8; ///< second byte word
670 UInt_t b3:8; ///< third byte word
671 UInt_t b4:8; ///< fourth byte word
675 word = (RawWord*) buffer;
677 for (Int_t i = 0; i < size; i++)
679 temp = *(((RawWord*)buffer)+i);
689 void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
690 ErrorCode error, const void* location
693 /// This is called by the high performance decoder when a error occurs
694 /// when trying to decode the DDL payload. This indicates corruption in
695 /// the data. This method converts the error code to a descriptive message
696 /// and logs this with the logger object.
697 /// \param error The error code indicating the problem.
698 /// \param location A pointer to the location within the DDL payload buffer
699 /// being decoded where the problem with the data was found.
701 assert(fRawStream != NULL);
703 const char* message = NULL;
705 bool logAsMajorError = true;
707 // Build the detailed part of the error message if high detail selected.
708 const char* detail = "";
709 if (fRawStream->GetLoggingDetailLevel() == kHighErrorDetail)
711 bool blockPtrOk = fBlockCount > 0;
712 bool dspPtrOk = blockPtrOk ? fCurrentBlock->GetDspCount() > 0 : false;
713 bool buspatchPtrOk = dspPtrOk ? fCurrentDSP->GetBusPatchCount() > 0 : false;
714 // We subtract 1 from the current numbers of blocks, DSPs
715 // and bus patches to get the iBlock, iDsp and iBus indices.
717 "At byte %lu in DDL %d, event %d, iBlock %d, iDsp %d [DSP ID: %d (0x%X)],"
718 " iBus %d [bus patch ID: %d (0x%X)].",
719 (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3),
720 AliDAQ::DdlID("MUONTRK", fRawStream->GetDDL()),
721 fRawStream->GetReader()->GetEventIndex(),
723 blockPtrOk ? int(fCurrentBlock->GetDspCount())-1 : -1,
724 blockPtrOk ? fCurrentBlock->GetDspId() : -1,
725 blockPtrOk ? fCurrentBlock->GetDspId() : -1,
726 dspPtrOk ? int(fCurrentDSP->GetBusPatchCount())-1 : -1,
727 buspatchPtrOk ? fCurrentBusPatch->GetBusPatchId() : -1,
728 buspatchPtrOk ? fCurrentBusPatch->GetBusPatchId() : -1
732 // Build the log message.
737 switch (fRawStream->GetLoggingDetailLevel())
739 case kLowErrorDetail:
740 message = "Glitch error detected.";
742 case kMediumErrorDetail:
744 "Glitch error detected in DSP %d (0x%X), skipping event.",
745 fCurrentBlock->GetDspId(), fCurrentBlock->GetDspId()
748 case kHighErrorDetail:
750 message = Form("%s %s", ErrorCodeToMessage(error), detail);
753 logAsMajorError = true;
756 case kBadPaddingWord:
758 switch (fRawStream->GetLoggingDetailLevel())
760 case kLowErrorDetail:
761 message = "Padding word error detected.";
763 case kMediumErrorDetail:
764 // We subtract 1 from the current numbers of blocks, DSPs
765 // and bus patches to get the indices.
767 "Padding word error for iBlock %d, iDsp %d, iBus %d.",
769 fCurrentBlock->GetDspCount()-1,
770 fCurrentDSP->GetBusPatchCount()-1
773 case kHighErrorDetail:
775 message = Form("%s %s", ErrorCodeToMessage(error), detail);
778 logAsMajorError = false;
783 switch (fRawStream->GetLoggingDetailLevel())
785 case kLowErrorDetail:
786 message = "Parity error detected.";
788 case kMediumErrorDetail:
790 "Parity error in buspatch %d (0x%X).",
791 fCurrentBusPatch->GetBusPatchId(),
792 fCurrentBusPatch->GetBusPatchId()
795 case kHighErrorDetail:
797 // location points to the incorrect data word and
798 // fCurrentBusPatch->GetData() returns a pointer to the start of
799 // bus patches data, so the difference divided by 4 gives the 32
801 word = (reinterpret_cast<size_t>(location) - reinterpret_cast<size_t>(fCurrentBusPatch->GetData()))
804 "Parity error in word %d for manuId %d and channel %d in buspatch %d. %s",
806 fCurrentBusPatch->GetManuId(word),
807 fCurrentBusPatch->GetChannelId(word),
808 fCurrentBusPatch->GetBusPatchId(),
813 logAsMajorError = false;
818 switch (fRawStream->GetLoggingDetailLevel())
820 case kLowErrorDetail:
821 message = "Lost token error detected.";
823 case kMediumErrorDetail:
824 word = *reinterpret_cast<const UInt_t*>(location);
826 "Lost token error detected with address 0x%X of DDL %d and code %d.",
827 ((word & 0xFFFF0000)),
828 fRawStream->GetDDL(),
832 case kHighErrorDetail:
834 word = *reinterpret_cast<const UInt_t*>(location);
836 "Lost token error detected with address 0x%X and code %d. %s",
837 ((word & 0xFFFF0000)),
843 logAsMajorError = false;
847 switch (fRawStream->GetLoggingDetailLevel())
849 case kLowErrorDetail:
850 message = ErrorCodeToMessage(error);
852 case kMediumErrorDetail:
855 ErrorCodeToMessage(error),
856 (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3)
859 case kHighErrorDetail:
862 "%s Error code: %d (%s). %s",
863 ErrorCodeToMessage(error),
864 error, ErrorCodeToString(error),
869 logAsMajorError = true;
873 // Now log the error message depending on the logging flags set.
874 if (fRawStream->IsRawReaderErrorLoggerEnabled())
877 fRawStream->GetReader()->AddMajorErrorLog(Int_t(error), message);
879 fRawStream->GetReader()->AddMinorErrorLog(Int_t(error), message);
881 if (fRawStream->IsMUONErrorLoggerEnabled())
883 AliMUONLogger* logger = fRawStream->GetMUONErrorLogger();
886 logger->Log(message);
891 "AliMUONRawStreamTrackerHP::AliDecoderEventHandler",
892 "Enabled logging to AliMUONLogger, but the logger object"
893 " was not set with SetMUONErrorLogger()."
897 if (fRawStream->IsWarningsEnabled())
900 "AliMUONRawStreamTrackerHP::AliDecoderEventHandler",