#include "TArrayL64.h"
#include "AliHLTLogging.h"
#include "AliHLTDataTypes.h"
+#include "AliHLTReadoutList.h"
+
/**
* @class AliHLTCTPData
*/
int Index(const char* name) const;
+ /**
+ * Check state of a trigger class.
+ * If the class name is not part of the current trigger setup (i.e. ECS parameter
+ * does not contain a trigger definition for this class name) the function
+ * returns -1
+ * @return -1 class name not initialized,
+ * 0 trigger not active
+ * 1 trigger active
+ */
+ int CheckTrigger(const char* name) const;
+
/**
* Increment counter for CTP trigger classes
* @param classIds comma separated list of class ids
* Return a readout list for the active trigger classes.
* The list is an 'OR' of the active trugger classes.
*/
- AliHLTEventDDL ReadoutList(const AliHLTComponentTriggerData& trigData) const;
+ AliHLTReadoutList ReadoutList(const AliHLTComponentTriggerData& trigData) const;
+
+ /**
+ * Return a readout list for the active trigger classes.
+ * The list is an 'OR' of the active trugger classes.
+ */
+ AliHLTReadoutList ReadoutList(AliHLTUInt64_t triggerMask) const;
+
+ /**
+ * Return a readout list for the active trigger classes.
+ * The list is an 'OR' of the active trugger classes.
+ */
+ AliHLTReadoutList ReadoutList() const {
+ return ReadoutList(fTriggers);
+ }
/**
* Inherited from TObject, this prints the contents of the trigger decision.
*/
int Add(const AliHLTCTPData& src, int factor, int &skipped);
+ /**
+ * Read the map of trigger class indexes
+ * The map is used in the generation of the TFormula from the trigger
+ * expression in order to handle similar class names correctly.
+ * For names like 'base', 'baseA', 'baseB' the class with the longer name
+ * has to be replaced first.
+ */
+ int ReadMap(vector<unsigned> &map) const;
+
+ int ReadMap() {return ReadMap(fMap);}
+
AliHLTUInt64_t fMask; /// mask of initialized trigger classes
AliHLTUInt64_t fTriggers; /// current trigger
TClonesArray fClassIds; /// array of trigger class ids
TArrayL64 fCounters; /// trigger class counters
+ vector<unsigned> fMap; //! index map for trigger expression evaluation
- ClassDef(AliHLTCTPData, 1)
+ ClassDef(AliHLTCTPData, 2)
};
#endif