]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/trigger/AliHLTGlobalTriggerComponent.h
Fixes for coverity
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTGlobalTriggerComponent.h
index d1dfb83ec25442a627816b55a997a42c777065a0..0165ebeef5e533bdbc88e7312293fab0c50c81b1 100644 (file)
 /// @brief  Declaration of the AliHLTGlobalTriggerComponent component class.
 
 #include "AliHLTTrigger.h"
+#include "AliHLTTriggerDecision.h"
 #include "TClonesArray.h"
 
 class AliHLTTriggerMenu;
 class AliHLTGlobalTrigger;
+class AliRawDataHeader;
 
 /**
  * \class AliHLTGlobalTriggerComponent
@@ -71,6 +73,23 @@ class AliHLTGlobalTrigger;
  * \li -process-all-events <br>
  *      Indicates that all events should be processed with the global trigger logic and
  *      not just the data events. The default is not to process just the data events.
+ * \li -monitoring[=n] <br>
+ *      enable monitoring trigger once every n seconds, enable for every event if
+ *      parameter n is omitted
+ * \li -dont-make-software-triggers <br>
+ *      This option prevents the Common Data Header from being interpreted to generate
+ *      software event input triggers for the trigger menu. Normally the following default
+ *      triggers are available in the trigger menu:
+ *        START_OF_DATA - start of data event.
+ *        END_OF_DATA - end of data event.
+ *        SOFTWARE - general software trigger.
+ *        CALIBRATION - calibration trigger.
+ *      With this option these will not be automatically generated by the global trigger.
+ * \li -randomseed <i>number</i> <br>
+ *      Specifies the random number seed to give to the internal random number generator.
+ *      This is only useful for debugging to generate reproducible number sequences.
+ *      The random numbers are only used if a trigger is scaled down using the scale down
+ *      option in a trigger menu item. The seed is normally randomly chosen by default.
  *
  * <h2>Configuration:</h2>
  * Configured from CDB but can be overridden with the -config argument.
@@ -198,6 +217,13 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger
    */
   int LoadTriggerMenu(const char* cdbPath, const AliHLTTriggerMenu*& menu);
   
+  /**
+   * Generates a file name for the generated on the fly code using a GUID.
+   * \param name <i>out</i> The name of the class to use.
+   * \param filename <i>out</i> The name of the file containing the code.
+   */
+  void GenerateFileName(TString& name, TString& filename);
+  
   /**
    * Generates the code for the global trigger to apply the given trigger menu.
    * The code will then be compiled on the fly and loaded. The name of the new
@@ -270,13 +296,22 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger
 
   /**
    * Add trigger decisions according to the active CTP trigger classes
-   * An internal TclonesArray holds the trigger decisions to be added. The trigger
+   * An internal TClonesArray holds the trigger decisions to be added. The trigger
    * decisions are updated according to the active CTP trigger mask.
    * \param pTrigger  The instance of the global trigger
    * \param pCTPData  Instance of the CTP data
    * \param trigData  Current trigger data, if NULL, the active trigger data from the CTP data is used
    */
   int AddCTPDecisions(AliHLTGlobalTrigger* pTrigger, const AliHLTCTPData* pCTPData, const AliHLTComponentTriggerData* trigData);
+  
+  /**
+   * This method handles the software trigger by checking the Common Data Header
+   * and filling fSoftwareTrigger with appropriate information for one of the
+   * following triggers: START_OF_DATA, END_OF_DATA, SOFTWARE or CALIBRATION, if
+   * it is indicated in the CDH L1 trigger message.
+   * \returns true if the trigger decision object was filled and false otherwise.
+   */
+  bool FillSoftwareTrigger();
 
   /**
    * Print some statistics based on the trigger counters
@@ -287,6 +322,7 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger
   bool fDebugMode;  //! Indicates if the generated global trigger class should be in debug mode.
   bool fRuntimeCompile;  //! Indicates if the generated global trigger class should be compiled
   bool fDeleteCodeFile; //! If true then the code file indicated by fCodeFileName should be deleted during DoDeinit.
+  bool fMakeSoftwareTriggers;  //! Indicates if the software triggers should be filled automatically or not.
   TString fCodeFileName; //! base file name of the generated code for the global trigger
   TString fClassName;  //! The generated/loaded trigger class name.
   TClonesArray* fCTPDecisions; //! AliHLTTriggerDecision objects for the CTP classes
@@ -297,6 +333,11 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger
   TString fLibStateAtLoad; //! This stores the loaded libraries just before we tell CINT to load the interpreted file.
   AliHLTUInt32_t fBits; //! Status bits
   bool fDataEventsOnly; //! Flag indicating if only data events are processed with trigger logic.
+  int fMonitorPeriod; //! Period of the monitoring trigger in s, -1 means monitoring trigger off
+  UInt_t fUniqueID; //! Unique ID for the decision output objects.
+  AliHLTTriggerDecision fSoftwareTrigger; //! Software or calibration trigger decision object to be added to trigger logic.
+  AliHLTUInt64_t fTotalEventCounter; //! Counts the total number of events handled.
+  const AliRawDataHeader* fCDH; //! The extracted CDH from the trigger data passed by the framework.
 
   static const char* fgkTriggerMenuCDBPath; //! The path string to read the trigger menu from the CDB.