]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTCTPData.h
Updated macro for K* in pA analysis
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTCTPData.h
index 3b85adf398c5e908db61a819f516a2a3a1419414..42d8e16b969b7a0c3b42ec2efe09060519936c51 100644 (file)
@@ -18,6 +18,8 @@
 #include "TArrayL64.h"
 #include "AliHLTLogging.h"
 #include "AliHLTDataTypes.h"
+#include "AliHLTReadoutList.h"
+
 
 /**
  * @class AliHLTCTPData
@@ -99,6 +101,17 @@ class AliHLTCTPData: public TNamed, public AliHLTLogging
    */
   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
@@ -128,7 +141,21 @@ class AliHLTCTPData: public TNamed, public AliHLTLogging
    * 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.
@@ -155,12 +182,24 @@ class AliHLTCTPData: public TNamed, public AliHLTLogging
    */
   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