#include "AliHLTReadoutList.h"
#include "AliHLTTriggerDomain.h"
#include "AliHLTDomainEntry.h"
+#include "AliHLTCTPData.h"
ClassImp(AliHLTTrigger)
AliHLTTriggerDecision triggerResult(value, GetTriggerName(), fTriggerDomain, fDescription);
// Append the readout list if it contains anything.
triggerResult.TriggerDomain().Add(fReadoutList);
- return TriggerEvent(&triggerResult, kAliHLTDataTypeTObject|kAliHLTDataOriginOut);
+ return TriggerEvent(&triggerResult, kAliHLTDataTypeTriggerDecision);
}
// See header file for more details.
if (fTriggerEventResult != 0) return fTriggerEventResult; // Do not do anything if a previous call failed.
+
+ AliHLTReadoutList readoutlist = result->ReadoutList();
+
fTriggerEventResult = PushBack(result, type, spec);
if (fTriggerEventResult == 0) {
- fTriggerEventResult = PushBack(result->ReadoutList().Buffer(), result->ReadoutList().BufferSize(), kAliHLTDataTypeReadoutList);
+ fTriggerEventResult = PushBack(readoutlist.Buffer(), readoutlist.BufferSize(), kAliHLTDataTypeReadoutList);
}
if (fTriggerEventResult == 0) fDecisionMade = true;
{
// 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;
}
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++) {