+AliHLTEventDDL AliHLTCTPData::ReadoutList(const AliHLTComponentTriggerData& trigData) const
+{
+ // see header file for function documentation
+ if (trigData.fDataSize != sizeof(AliHLTEventTriggerData)) {
+ HLTError("invalid trigger data size: %d expected %d", trigData.fDataSize, sizeof(AliHLTEventTriggerData));
+ AliHLTEventDDL dummy;
+ memset(&dummy, 0, sizeof(AliHLTEventDDL));
+ return dummy;
+ }
+
+ // trigger mask is 50 bit wide and is stored in word 5 and 6 of the CDH
+ AliHLTEventTriggerData* evtData=reinterpret_cast<AliHLTEventTriggerData*>(trigData.fData);
+ AliHLTUInt64_t triggerMask=evtData->fCommonHeader[6];
+ triggerMask<<=32;
+ triggerMask|=evtData->fCommonHeader[5];
+
+ // take an 'OR' of all active trigger classes
+ AliHLTReadoutList list;
+ for (int i=0; i<gkNCTPTriggerClasses; i++) {
+ if (i>fClassIds.GetLast()) break;
+ if ((triggerMask&((AliHLTUInt64_t)0x1<<i))==0) continue;
+ list|=*((AliHLTReadoutList*)fClassIds.At(i));
+ }
+
+ return list;
+}
+