From d66f4f29e8c6cc2cdf5a8242ef51d1e5751d790f Mon Sep 17 00:00:00 2001 From: mkrzewic Date: Wed, 19 Nov 2014 22:16:34 +0100 Subject: [PATCH] properly handle AliHLTEventDDLV2 additional changes needed to handle the new AD detector DDL readout +some CDH3 related fixes (to be verified) --- HLT/BASE/AliHLTCTPData.cxx | 6 +++--- HLT/BASE/AliHLTComponent.cxx | 10 +++++++--- HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx | 7 +++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/HLT/BASE/AliHLTCTPData.cxx b/HLT/BASE/AliHLTCTPData.cxx index c14026e0dd9..3cd38c44875 100644 --- a/HLT/BASE/AliHLTCTPData.cxx +++ b/HLT/BASE/AliHLTCTPData.cxx @@ -258,7 +258,7 @@ bool AliHLTCTPData::EvaluateCTPTriggerClass(const char* expression, const AliHLT AliHLTEventTriggerData* evtData=reinterpret_cast(trigData.fData); HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s", TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str() ); - for (int i=0; ifCommonHeader[i]); + for (int i=0; ifCommonHeaderWordCnt; i++) HLTWarning("\t CDH[%d]=0x%lx", i, evtData->fCommonHeader[i]); return false; } @@ -379,7 +379,7 @@ int AliHLTCTPData::Increment(AliHLTComponentTriggerData& trigData) AliHLTEventTriggerData* evtData=reinterpret_cast(trigData.fData); HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s", TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str()); - for (int i=0; ifCommonHeaderWordCnt; i++) HLTWarning("\t CDH[%d]=0x%lx", i, evtData->fCommonHeader[i]); } Increment(triggerMask); @@ -451,7 +451,7 @@ AliHLTReadoutList AliHLTCTPData::ReadoutList(const AliHLTComponentTriggerData& t AliHLTEventTriggerData* evtData=reinterpret_cast(trigData.fData); HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s", TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str()); - for (int i=0; ifCommonHeaderWordCnt; i++) HLTWarning("\t CDH[%d]=0x%lx", i, evtData->fCommonHeader[i]); } diff --git a/HLT/BASE/AliHLTComponent.cxx b/HLT/BASE/AliHLTComponent.cxx index 3617a3e0d6f..dc0eedf8295 100644 --- a/HLT/BASE/AliHLTComponent.cxx +++ b/HLT/BASE/AliHLTComponent.cxx @@ -2698,9 +2698,10 @@ int AliHLTComponent::ExtractTriggerData( // Check that the trigger data pointer points to data of a size we can handle. // Either it is the size of AliHLTEventTriggerData or the size of the old - // version of AliHLTEventTriggerData using AliHLTEventDDLV0. + // version of AliHLTEventTriggerData using AliHLTEventDDLV0 or V1. if (trigData.fDataSize != sizeof(AliHLTEventTriggerData) and - trigData.fDataSize != sizeWithoutReadout + sizeof(AliHLTEventDDLV0) + trigData.fDataSize != sizeWithoutReadout + sizeof(AliHLTEventDDLV0) and + trigData.fDataSize != sizeWithoutReadout + sizeof(AliHLTEventDDLV1) ) { if (printErrors) @@ -2717,7 +2718,10 @@ int AliHLTComponent::ExtractTriggerData( assert(evtData != NULL); // Check that the CDH has the right number of words. - if (cdh != NULL and evtData->fCommonHeaderWordCnt != gkAliHLTCommonHeaderCount) + if ( cdh != NULL and + evtData->fCommonHeaderWordCnt != gkAliHLTCommonHeaderCount and + evtData->fCommonHeaderWordCnt != gkAliHLTCommonHeaderCountV2 + ) { if (printErrors) { diff --git a/HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx b/HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx index 48bcbf59234..9cc617884b0 100644 --- a/HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx +++ b/HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx @@ -100,13 +100,16 @@ int AliHLTReadoutListDumpComponent::DumpEvent( const AliHLTComponentEventData& / pBlock && iResult>=0; pBlock=GetNextInputBlock()) { if (pBlock->fDataType!=hltrdlstdt) continue; - if (pBlock->fSize==sizeof(AliHLTEventDDL) or pBlock->fSize==sizeof(AliHLTEventDDLV0)) { + if (pBlock->fSize==sizeof(AliHLTEventDDL) or + pBlock->fSize==sizeof(AliHLTEventDDLV0) or + pBlock->fSize==sizeof(AliHLTEventDDLV1)) + { HLTDebug("Filling histograms from binary buffer"); AliHLTReadoutList readoutlist(*reinterpret_cast(pBlock->fPtr)); FillReadoutListHistogram(fBitsHisto, &readoutlist); FillReadoutListVsCTP(fBitsVsCTP, &readoutlist, &trigData); } else { - HLTError("HLTRDLST size missmatch: %d, expected %d or %d", pBlock->fSize, sizeof(AliHLTEventDDL), sizeof(AliHLTEventDDLV0)); + HLTError("HLTRDLST size missmatch: %d, expected V0:%d, V1:%d or V2%d", pBlock->fSize, sizeof(AliHLTEventDDLV0), sizeof(AliHLTEventDDLV1), sizeof(AliHLTEventDDLV2)); } } } else if (fMode==AliHLTReadoutListDumpComponent::kModeHLTDecision) { -- 2.43.0