]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
properly handle AliHLTEventDDLV2
authormkrzewic <mikolaj.krzewicki@cern.ch>
Wed, 19 Nov 2014 21:16:34 +0000 (22:16 +0100)
committertbreitne <timo.gunther.breitner@cern.ch>
Thu, 29 Jan 2015 14:59:29 +0000 (15:59 +0100)
additional changes needed to handle the new AD detector DDL readout
+some CDH3 related fixes (to be verified)

HLT/BASE/AliHLTCTPData.cxx
HLT/BASE/AliHLTComponent.cxx
HLT/BASE/util/AliHLTReadoutListDumpComponent.cxx

index c14026e0dd993441184371d5e46ec0ff2d706544..3cd38c44875d429c47bffb438de0fc2a34fb9731 100644 (file)
@@ -258,7 +258,7 @@ bool AliHLTCTPData::EvaluateCTPTriggerClass(const char* expression, const AliHLT
     AliHLTEventTriggerData* evtData=reinterpret_cast<AliHLTEventTriggerData*>(trigData.fData);
     HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s", 
               TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str() );
-    for (int i=0; i<gkAliHLTCommonHeaderCount; i++) HLTWarning("\t CDH[%d]=0x%lx", i, evtData->fCommonHeader[i]);
+    for (int i=0; i<evtData->fCommonHeaderWordCnt; 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<AliHLTEventTriggerData*>(trigData.fData);
     HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s", 
               TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str());
-    for (int i=0; i<gkAliHLTCommonHeaderCount; i++) 
+    for (int i=0; i<evtData->fCommonHeaderWordCnt; 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<AliHLTEventTriggerData*>(trigData.fData);
     HLTWarning("invalid trigger mask %s, unknown CTP trigger, initialized %s",
                TriggerMaskToString(triggerMask).c_str(), TriggerMaskToString(fMask).c_str());
-    for (int i=0; i<gkAliHLTCommonHeaderCount; i++)
+    for (int i=0; i<evtData->fCommonHeaderWordCnt; i++)
       HLTWarning("\t CDH[%d]=0x%lx", i, evtData->fCommonHeader[i]);
   }
 
index 3617a3e0d6fead46e00199fe4d08181cbb0d96c7..dc0eedf82954e48b41aa263c5a67890021739f39 100644 (file)
@@ -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)
     {
index 48bcbf59234adaab382a92db4e140272c81980f5..9cc617884b082f016817c452cf9c66a254dfd320 100644 (file)
@@ -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<AliHLTEventDDL*>(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) {