]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTTriggerDecision.cxx
adding Copy and Clone methods inherited from TObject for abstract access and
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTTriggerDecision.cxx
index a7e5bd62476f103df6d760f745bd255090e549cc..03daaec1c1cd9c6c6f56d362d9d3c2fea935e0b7 100644 (file)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        *
  * ALICE Experiment at CERN, All rights reserved.                         *
@@ -83,3 +83,31 @@ void AliHLTTriggerDecision::Print(Option_t* option) const
   fTriggerDomain.Print();
 }
 
+void AliHLTTriggerDecision::Copy(TObject &object) const
+{
+  // copy this to the specified object
+
+  AliHLTTriggerDecision* pDecision=dynamic_cast<AliHLTTriggerDecision*>(&object);
+  if (pDecision) {
+    // copy members if target is a AliHLTTriggerDecision
+    *pDecision=*this;
+  }
+
+  // copy the base class
+  TObject::Copy(object);
+}
+
+TObject *AliHLTTriggerDecision::Clone(const char */*newname*/) const
+{
+  // create a new clone, classname is ignored
+
+  return new AliHLTTriggerDecision(*this);
+}
+
+Option_t *AliHLTTriggerDecision::GetOption() const
+{
+  // Return the result of the trigger.
+  // "0" or "1"
+  if (Result()) return "1";
+  return "0";
+}