2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
6 * Primary Authors: Artur Szostak <artursz@iafrica.com> *
7 * for The ALICE HLT Project. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
18 /// @file AliHLTTriggerDecision.cxx
19 /// @author Artur Szostak <artursz@iafrica.com>
21 /// @brief Implementation of the AliHLTTriggerDecision class.
23 /// The trigger decision class stores the HLT decision from an AliHLTTrigger component.
25 #include "AliHLTTriggerDecision.h"
26 #include "Riostream.h"
28 ClassImp(AliHLTTriggerDecision)
31 AliHLTTriggerDecision::AliHLTTriggerDecision() :
37 // Default constructor.
41 AliHLTTriggerDecision::AliHLTTriggerDecision(bool result, const char* name) :
47 // Constructor specifying the name and result of the trigger decision.
53 AliHLTTriggerDecision::AliHLTTriggerDecision(
54 bool result, const char* name,
55 const AliHLTTriggerDomain& triggerDomain,
56 const char* description
60 fDescription(description),
61 fTriggerDomain(triggerDomain)
63 // Constructor specifying all information fields.
69 AliHLTTriggerDecision::~AliHLTTriggerDecision()
71 // Default destructor.
75 void AliHLTTriggerDecision::Print(Option_t* option) const
77 // Prints the contents of the trigger decision.
79 cout << "Trigger (" << fName.Data() << ") result = " << Result() << endl;
81 if (opt.Contains("short")) return;
82 cout << "Description = \"" << fDescription.Data() << "\"" << endl;
83 fTriggerDomain.Print();
86 void AliHLTTriggerDecision::Copy(TObject &object) const
88 // copy this to the specified object
90 AliHLTTriggerDecision* pDecision=dynamic_cast<AliHLTTriggerDecision*>(&object);
92 // copy members if target is a AliHLTTriggerDecision
96 // copy the base class
97 TObject::Copy(object);
100 TObject *AliHLTTriggerDecision::Clone(const char */*newname*/) const
102 // create a new clone, classname is ignored
104 return new AliHLTTriggerDecision(*this);
107 Option_t *AliHLTTriggerDecision::GetOption() const
109 // Return the result of the trigger.
111 if (Result()) return "1";