]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawStreamTrackerHP.cxx
Extracting Branch and Revision from Git.
[u/mrichter/AliRoot.git] / MUON / AliMUONRawStreamTrackerHP.cxx
index 16862c2276887d885056d2aaeff01a9fe71c574d..73fa28b13a529f9b9ff6fd3ff53833f51e8fbed6 100644 (file)
@@ -261,6 +261,10 @@ Bool_t AliMUONRawStreamTrackerHP::NextDDL()
        Swap(reinterpret_cast<UInt_t*>(fBuffer), dataSize / sizeof(UInt_t)); // Swap needed for mac power pc.
 #endif
        
+       fDDL++; // Remember to increment index to next DDL before the calls to
+               // fDecoder.Decode since the callback methods of the decoder will
+               // use AliMUONRawStreamTrackerHP::GetDDL()
+       
        bool result = false;
        try
        {
@@ -294,7 +298,6 @@ Bool_t AliMUONRawStreamTrackerHP::NextDDL()
                fkCurrentData = fkEndOfData = NULL;
        }
 
-       fDDL++; // Remember to increment index to next DDL.
        return kTRUE;
 }
 
@@ -710,7 +713,7 @@ void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
                // We subtract 1 from the current numbers of blocks, DSPs
                // and bus patches to get the iBlock, iDsp and iBus indices.
                detail = Form(
-                       "At byte %d in DDL %d, event %d, iBlock %d, iDsp %d [DSP ID: %d (0x%X)],"
+                       "At byte %lu in DDL %d, event %d, iBlock %d, iDsp %d [DSP ID: %d (0x%X)],"
                        " iBus %d [bus patch ID: %d (0x%X)].",
                        (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader),
                        AliDAQ::DdlID("MUONTRK", fRawStream->GetDDL()),
@@ -794,7 +797,7 @@ void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
                        // fCurrentBusPatch->GetData() returns a pointer to the start of
                        // bus patches data, so the difference divided by 4 gives the 32
                        // bit word number.
-                       word = ((unsigned long)location - (unsigned long)fCurrentBusPatch->GetData())
+                       word = (reinterpret_cast<size_t>(location) - reinterpret_cast<size_t>(fCurrentBusPatch->GetData()))
                                / sizeof(UInt_t);
                        message = Form(
                                "Parity error in word %d for manuId %d and channel %d in buspatch %d. %s",
@@ -819,9 +822,9 @@ void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
                case kMediumErrorDetail:
                        word = *reinterpret_cast<const UInt_t*>(location);
                        message = Form(
-                               "Lost token error detected in DSP 0x%X of DDL %d and code %d.",
-        ((word & 0xFFFF0000) >> 16),
-        fRawStream->GetDDL(),
+                               "Lost token error detected with address 0x%X of DDL %d and code %d.",
+                               ((word & 0xFFFF0000)),
+                               fRawStream->GetDDL(),
                                (word & 0xF)
                        );
                        break;
@@ -830,11 +833,10 @@ void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
                        word = *reinterpret_cast<const UInt_t*>(location);
                        message = Form(
                                "Lost token error detected with address 0x%X and code %d. %s",
-                               ((word & 0xFFFF0000) >> 16),
+                               ((word & 0xFFFF0000)),
                                (word & 0xF),
                                detail
                        );
-                       message = Form("Lost token error detected. %s.", detail);
                        break;
                }
                logAsMajorError = false;
@@ -848,7 +850,7 @@ void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnError(
                        break;
                case kMediumErrorDetail:
                        message = Form(
-                               "%s (At byte %d)",
+                               "%s (At byte %lu)",
                                ErrorCodeToMessage(error),
                                (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader)
                        );