]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: setting the monitoring event command in the EventDoneData only for the trigge...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Dec 2009 13:05:05 +0000 (13:05 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Dec 2009 13:05:05 +0000 (13:05 +0000)
bug https://savannah.cern.ch/bugs/?60082

HLT/trigger/AliHLTGlobalTriggerComponent.cxx
HLT/trigger/AliHLTTrigger.cxx
HLT/trigger/AliHLTTrigger.h

index 8fcc9defe564d4fc2526444fa4096376e272a00f..df4ca0a6505ec9eb2b79031cdfac1c6f61b55248 100644 (file)
@@ -493,8 +493,14 @@ int AliHLTGlobalTriggerComponent::DoTrigger()
 
   if (!TestBit(kSkipCTP) && CTPData()) decision.AddInputObject(CTPData());
 
+  // add readout filter to event done data
   CreateEventDoneReadoutFilter(decision.TriggerDomain(), 3);
+  // add monitoring filter to event done data
   CreateEventDoneReadoutFilter(decision.TriggerDomain(), 4);
+  if (decision.Result()) {
+    // add monitoring event command for triggered events
+    CreateEventDoneReadoutFilter(decision.TriggerDomain(), 5);
+  }
   if (TriggerEvent(&decision) == -ENOSPC)
   {
     // Increase the estimated buffer space required if the PushBack methods in TriggerEvent
index cd6d818441321b62da8786e947b139bdbe94b295..dacbea25d8c2b1e2adb90d08d5bc069147236a96 100644 (file)
@@ -173,21 +173,30 @@ int AliHLTTrigger::CreateEventDoneReadoutFilter(const AliHLTTriggerDomain& domai
 {
   // add a readout filter to the EventDoneData
   int iResult=0;
-  unsigned nofEntries=domain.GetNofEntries();
+  unsigned nofEntries=0;
+  switch (type) {
+  /* readout filter */
+  case 3:
+  /* monitoring filter */
+  case 4:
+    nofEntries=domain.GetNofEntries();
+    break;
+  /* monitoring event command */
+  case 5:
+    break;
+  default:
+    HLTError("unknown event done data command code 0x%08x", type);
+    return -EINVAL;
+  }
+
   // we need:
-  //   1 word eventually for the monitor event command
-  //   1 word for the readout filter command
+  //   1 word for the filter command: readout filter, monitoring filter, monitoring event
   //   1 word for the readout filter size
   // 4*n words for the filter list
-  if ((iResult=ReserveEventDoneData((nofEntries*4 + 3) * sizeof(AliHLTUInt32_t)))<0) return iResult;
+  if ((iResult=ReserveEventDoneData((nofEntries*4 + 2) * sizeof(AliHLTUInt32_t)))<0) return iResult;
   AliHLTUInt32_t eddbuffer[4];
-  if (type==4) {
-    // in the case of the monitoring filter we also add the monitor event command
-    eddbuffer[0]=5;
-    if ((iResult=PushEventDoneData(eddbuffer[0]))<0) return iResult;
-  }
 
-  // now the readout list command and the block count
+  // add the specific command
   eddbuffer[0]=type;
   if ((iResult=PushEventDoneData(eddbuffer[0]))<0) return iResult;
 
@@ -211,8 +220,12 @@ int AliHLTTrigger::CreateEventDoneReadoutFilter(const AliHLTTriggerDomain& domai
     }
     entries.push_back(&(domain[block]));
   }
-  eddbuffer[0]=entries.size();
-  if ((iResult=PushEventDoneData(eddbuffer[0]))<0) return iResult;
+
+  // add the number of blocks if not monitoring event command
+  if (type!=5) {
+    eddbuffer[0]=entries.size();
+    if ((iResult=PushEventDoneData(eddbuffer[0]))<0) return iResult;
+  }
 
   for (vector<const AliHLTDomainEntry*>::iterator entry=entries.begin();
        entry!=entries.end(); entry++) {
index 33414780fbb4672db706057319b19e7acff86151..dca48938eec01ee0a117a64b7e114e5e8b0159f6 100644 (file)
@@ -280,7 +280,9 @@ class AliHLTTrigger : public AliHLTProcessor
    * from a Trigger domain object.
    * @param domain   the domain as calculated by the (Global)trigger
    * @param type     type of the readout list, defined by PubSub
+   *                  3 monitoring filter
    *                  4 monitoring filter
+   *                  5 monitoring filter
    */
   int CreateEventDoneReadoutFilter(const AliHLTTriggerDomain& domain, unsigned type);