Fixing treatment of fOffset value in input data blocks.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Jul 2008 09:28:07 +0000 (09:28 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Jul 2008 09:28:07 +0000 (09:28 +0000)
HLT/MUON/OfflineInterface/AliHLTMUONESDMaker.cxx
HLT/MUON/OfflineInterface/AliHLTMUONRootifierComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONDecisionComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONMansoTrackerFSMComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx

index 38d1494..78f85e2 100644 (file)
@@ -196,9 +196,7 @@ int AliHLTMUONESDMaker::DoEvent(
                if (block->fDataType == AliHLTMUONConstants::TriggerRecordsBlockDataType())
                {
                        specification |= block->fSpecification;
-                       AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-                       ptr += block->fOffset;
-                       AliHLTMUONTriggerRecordsBlockReader inblock(ptr, block->fSize);
+                       AliHLTMUONTriggerRecordsBlockReader inblock(block->fPtr, block->fSize);
                        if (not BlockStructureOk(inblock)) continue;
                        
                        for (AliHLTUInt32_t n = 0; n < inblock.Nentries(); n++)
@@ -232,9 +230,7 @@ int AliHLTMUONESDMaker::DoEvent(
            )
        {
                specification |= block->fSpecification;
-               AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-               ptr += block->fOffset;
-               AliHLTMUONMansoTracksBlockReader inblock(ptr, block->fSize);
+               AliHLTMUONMansoTracksBlockReader inblock(block->fPtr, block->fSize);
                if (not BlockStructureOk(inblock)) continue;
                
                for (AliHLTUInt32_t n = 0; n < inblock.Nentries(); n++)
index 742f8da..bd6943e 100644 (file)
@@ -182,9 +182,7 @@ int AliHLTMUONRootifierComponent::DoEvent(
                if (block->fDataType == AliHLTMUONConstants::RecHitsBlockDataType())
                {
                        specification |= block->fSpecification;
-                       AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-                       ptr += block->fOffset;
-                       AliHLTMUONRecHitsBlockReader inblock(ptr, block->fSize);
+                       AliHLTMUONRecHitsBlockReader inblock(block->fPtr, block->fSize);
                        if (not BlockStructureOk(inblock)) continue;
                        
                        // Decode the source DDL from the specification bits.
@@ -224,9 +222,7 @@ int AliHLTMUONRootifierComponent::DoEvent(
                else if (block->fDataType == AliHLTMUONConstants::TriggerRecordsBlockDataType())
                {
                        specification |= block->fSpecification;
-                       AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-                       ptr += block->fOffset;
-                       AliHLTMUONTriggerRecordsBlockReader inblock(ptr, block->fSize);
+                       AliHLTMUONTriggerRecordsBlockReader inblock(block->fPtr, block->fSize);
                        if (not BlockStructureOk(inblock)) continue;
                        
                        // Decode the source DDL from the specification bits.
@@ -304,9 +300,7 @@ int AliHLTMUONRootifierComponent::DoEvent(
            )
        {
                specification |= block->fSpecification;
-               AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-               ptr += block->fOffset;
-               AliHLTMUONMansoTracksBlockReader inblock(ptr, block->fSize);
+               AliHLTMUONMansoTracksBlockReader inblock(block->fPtr, block->fSize);
                if (not BlockStructureOk(inblock)) continue;
                
                for (AliHLTUInt32_t n = 0; n < inblock.Nentries(); n++)
@@ -416,9 +410,7 @@ int AliHLTMUONRootifierComponent::DoEvent(
        {
                decisionBlockFound = true;
                specification |= block->fSpecification;
-               AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-               ptr += block->fOffset;
-               AliHLTMUONSinglesDecisionBlockReader inblock(ptr, block->fSize);
+               AliHLTMUONSinglesDecisionBlockReader inblock(block->fPtr, block->fSize);
                if (not BlockStructureOk(inblock)) continue;
                
                numLowPt += inblock.BlockHeader().fNlowPt;
@@ -479,9 +471,7 @@ int AliHLTMUONRootifierComponent::DoEvent(
        {
                decisionBlockFound = true;
                specification |= block->fSpecification;
-               AliHLTUInt8_t* ptr = reinterpret_cast<AliHLTUInt8_t*>(block->fPtr);
-               ptr += block->fOffset;
-               AliHLTMUONPairsDecisionBlockReader inblock(ptr, block->fSize);
+               AliHLTMUONPairsDecisionBlockReader inblock(block->fPtr, block->fSize);
                if (not BlockStructureOk(inblock)) continue;
                
                numUnlikeAnyPt += inblock.BlockHeader().fNunlikeAnyPt;
index 85961e9..7c5f633 100644 (file)
@@ -486,10 +486,7 @@ int AliHLTMUONDecisionComponent::DoEvent(
                        // contributed to the output data.
                        specification |= blocks[n].fSpecification;
                        
-                       AliHLTMUONMansoTracksBlockReader inblock(
-                                       reinterpret_cast<char*>(blocks[n].fPtr) + blocks[n].fOffset,
-                                       blocks[n].fSize
-                               );
+                       AliHLTMUONMansoTracksBlockReader inblock(blocks[n].fPtr, blocks[n].fSize);
                        if (not BlockStructureOk(inblock)) continue;
                        
                        for (AliHLTUInt32_t i = 0; i < inblock.Nentries(); i++)
index 89b814d..e63f371 100644 (file)
@@ -719,9 +719,8 @@ int AliHLTMUONHitReconstructorComponent::DoEvent(
                
                AliHLTUInt32_t totalDDLSize = blocks[n].fSize / sizeof(AliHLTUInt32_t);
                AliHLTUInt32_t ddlRawDataSize = totalDDLSize - fHitRec->GetkDDLHeaderSize();
-               AliHLTUInt32_t* buffer = reinterpret_cast<AliHLTUInt32_t*>(
-                               reinterpret_cast<char*>(blocks[n].fPtr) + blocks[n].fOffset
-                       ) + fHitRec->GetkDDLHeaderSize();
+               AliHLTUInt32_t* buffer = reinterpret_cast<AliHLTUInt32_t*>(blocks[n].fPtr)
+                       + fHitRec->GetkDDLHeaderSize();
                AliHLTUInt32_t nofHit = block.MaxNumberOfEntries();
 
 #ifdef DEBUG
index 088bdaf..3cbcdfe 100644 (file)
@@ -848,10 +848,7 @@ int AliHLTMUONMansoTrackerFSMComponent::DoEvent(
                {
                        specification |= blocks[n].fSpecification;
                        
-                       AliHLTMUONRecHitsBlockReader inblock(
-                                       reinterpret_cast<char*>(blocks[n].fPtr) + blocks[n].fOffset,
-                                       blocks[n].fSize
-                               );
+                       AliHLTMUONRecHitsBlockReader inblock(blocks[n].fPtr, blocks[n].fSize);
                        if (not BlockStructureOk(inblock)) continue;
                        
                        if (inblock.Nentries() != 0)
@@ -887,10 +884,7 @@ int AliHLTMUONMansoTrackerFSMComponent::DoEvent(
                if (blocks[n].fDataType != AliHLTMUONConstants::TriggerRecordsBlockDataType())
                        continue;
                
-               AliHLTMUONTriggerRecordsBlockReader inblock(
-                               reinterpret_cast<char*>(blocks[n].fPtr) + blocks[n].fOffset,
-                               blocks[n].fSize
-                       );
+               AliHLTMUONTriggerRecordsBlockReader inblock(blocks[n].fPtr, blocks[n].fSize);
                if (not BlockStructureOk(inblock)) continue;
                
                DebugTrace("Processing a trigger block with "
index c9ba158..19b4346 100644 (file)
@@ -761,9 +761,7 @@ int AliHLTMUONTriggerReconstructorComponent::DoEvent(
                        );
                        continue;
                }
-               AliRawDataHeader* header = reinterpret_cast<AliRawDataHeader*>(
-                               reinterpret_cast<char*>(blocks[n].fPtr) + blocks[n].fOffset
-                       );
+               AliRawDataHeader* header = reinterpret_cast<AliRawDataHeader*>(blocks[n].fPtr);
                AliHLTUInt32_t payloadSize = totalDDLSize - sizeof(AliRawDataHeader);
                AliHLTUInt8_t* buffer = reinterpret_cast<AliHLTUInt8_t*>(header + 1);
                AliHLTUInt32_t nofTrigRec = block.MaxNumberOfEntries();