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
{
// 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++) {
* 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);