]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTTriggerDecision.h
Cosmetics. Fixed bug preventing creation of async block list
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTTriggerDecision.h
index 3b5bd04953b16ed0dfb7aba54f68f86676839930..7a25ab9f896413de94917635ffb3121db5daf318 100644 (file)
@@ -1,3 +1,5 @@
+//-*- Mode: C++ -*-
+// $Id$
 #ifndef ALIHLTTRIGGERDECISION_H
 #define ALIHLTTRIGGERDECISION_H
 /* This file is property of and copyright by the ALICE HLT Project        *
@@ -29,6 +31,11 @@ class AliHLTTriggerDecision : public TObject
    */
   AliHLTTriggerDecision();
   
+  /**
+   * Copy constructor performs a deep copy.
+   */
+  AliHLTTriggerDecision(const AliHLTTriggerDecision& obj);
+  
   /**
    * Constructor specifying the result and trigger name.
    * \param result  The result of the trigger decision.
@@ -60,12 +67,33 @@ class AliHLTTriggerDecision : public TObject
    */
   virtual const char* GetName() const { return fName.Data(); }
   
+  /**
+   * Inherited from TObject. Returns the description of the trigger decision.
+   */
+  virtual const char* GetTitle() const { return fDescription.Data(); }
+  
   /**
    * Inherited from TObject. This prints the contents of the trigger decision.
    * \param option  Can be "short" which will print the short format.
    */
   virtual void Print(Option_t* option = "") const;
-  
+
+  /**
+   * Inherited from TObject. Copy this to the specified object.
+   */
+  virtual void Copy(TObject &object) const;
+
+  /**
+   * Inherited from TObject. Create a new clone.
+   */
+  virtual TObject *Clone(const char *newname="") const;
+
+  /**
+   * Inherited from TObject. Return the result of the trigger.
+   * @return   "0" or "1" (note: its a string)
+   */
+  virtual Option_t *GetOption() const;
+
   /**
    * Returns the result of the trigger decision.
    * \returns true if the event was triggered and should be readout.
@@ -77,7 +105,7 @@ class AliHLTTriggerDecision : public TObject
    * The decision is stored in bit 15 of the fBits field.
    * \returns true if the event was triggered and should be readout.
    */
-  bool Result() const { return TestBit(15) == 1; }
+  bool Result() const;
   
   /**
    * Sets the result of the trigger decision.
@@ -85,7 +113,7 @@ class AliHLTTriggerDecision : public TObject
    * \param value  The value to set; true if the event triggered and should be
    *     readout and false otherwise.
    */
-  void Result(bool value) { SetBit(15, value); }
+  void Result(bool value);
   
   /**
    * Returns the name of the trigger decision.
@@ -115,11 +143,7 @@ class AliHLTTriggerDecision : public TObject
   /**
    * Sets the DDL readout list associated with this trigger decision.
    */
-  void ReadoutList(const AliHLTReadoutList& value)
-  {
-    fTriggerDomain.Remove("DAQRDOUT", kAliHLTDataOriginAny);
-    fTriggerDomain.Add(value);
-  }
+  void ReadoutList(const AliHLTReadoutList& value);
   
   /**
    * Returns the trigger domain associated with this trigger decision.
@@ -136,13 +160,25 @@ class AliHLTTriggerDecision : public TObject
    */
   void TriggerDomain(const AliHLTTriggerDomain& value) { fTriggerDomain = value; }
   
+  /**
+   * Assignment operator performs a deep copy.
+   */
+  AliHLTTriggerDecision& operator = (const AliHLTTriggerDecision& obj);
+  
+  /**
+   * This method clears the trigger domain and sets the decision result to false.
+   * \param  option  This is passed onto the trigger domain clear method.
+   * The method is inherited from TObject.
+   */
+  virtual void Clear(Option_t* option = "C");
+  
  private:
   
   TString fName; /// The name of the trigger decision. Should be the name of the trigger component that generated it.
   TString fDescription; /// Optional descriptive text giving the reason for the trigger.
   AliHLTTriggerDomain fTriggerDomain;  /// The trigger domain associated with this trigger. i.e. the HLT data blocks to read out.
   
-  ClassDef(AliHLTTriggerDecision, 1) // HLT trigger decision object storing information about the readout list, trigger domain and result.
+  ClassDef(AliHLTTriggerDecision, 2) // HLT trigger decision object storing information about the readout list, trigger domain and result.
 };
 
 #endif // ALIHLTTRIGGERDECISION_H