Adding convenient print method to global trigger configuration helper class.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jan 2009 15:50:19 +0000 (15:50 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jan 2009 15:50:19 +0000 (15:50 +0000)
HLT/trigger/AliHLTGlobalTriggerConfig.cxx
HLT/trigger/AliHLTGlobalTriggerConfig.h
HLT/trigger/test/TriggerConfig.C

index ee219d61fd674d4d14316aeb2f04665213eff638..4a0e8d3dbffd04121d98f7f4a08befc41bc97cbe 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "AliHLTGlobalTriggerConfig.h"
 #include "AliHLTTriggerMenu.h"
+#include "Riostream.h"
 
 ClassImp(AliHLTGlobalTriggerConfig)
 
@@ -206,3 +207,18 @@ void AliHLTGlobalTriggerConfig::AddItem(
   fgMenu->AddItem(entry);
 }
 
+
+void AliHLTGlobalTriggerConfig::Print(Option_t* option) const
+{
+  // Prints the contents of the current trigger menu being manipulated.
+  
+  if (fgMenu != NULL)
+  {
+    fgMenu->Print(option);
+  }
+  else
+  {
+    cout << "No trigger menu currently being configured, it is empty." << endl;
+  }
+}
+
index ed04e91415d7155013df0cadab3a148352a39fb8..065fb6211121f45b5c630d58ccf4cd1030345f8f 100644 (file)
@@ -33,6 +33,13 @@ class AliHLTGlobalTriggerConfig
    */
   virtual ~AliHLTGlobalTriggerConfig();
   
+  /**
+   * Inherited from TObject, this prints the contents of the current trigger menu
+   * being manipulated. Specifically fgMenu.
+   * \param option  This is passed on to the printing routine of the trigger menu.
+   */
+  virtual void Print(Option_t* option = "") const;
+  
   /**
    * Creates a new trigger menu. If a trigger menu is already active then the existing
    * one is replaced with the new menu.
index 5f1ac6992c0e72ad60e8664945a9c858faec7b4e..9818060f5c98a2167b94ac1c26c16dc829373973 100644 (file)
@@ -6,6 +6,6 @@ void TriggerConfig()
        config.AddItem("true", "domainAll", 5, "Trigger Type: pass through");
        config.AddItem("Trigger1", "Trigger1 | Trigger2", 3, "Trigger Type: 1");
        config.AddItem("Trigger2", "Trigger2", 0, "Trigger Type: 2");
-       config.Menu()->Print();
+       config.Print();
 }