1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * ALICE Experiment at CERN, All rights reserved. *
5 * Primary Authors: Artur Szostak <artursz@iafrica.com> *
6 * for The ALICE HLT Project. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
17 /// @file AliHLTGlobalTriggerDecision.cxx
18 /// @author Artur Szostak <artursz@iafrica.com>
20 /// @brief Implementation of the AliHLTGlobalTriggerDecision class.
22 /// The global trigger decision class stores the global HLT decision.
24 #include "AliHLTGlobalTriggerDecision.h"
25 #include "Riostream.h"
27 ClassImp(AliHLTGlobalTriggerDecision)
30 AliHLTGlobalTriggerDecision::AliHLTGlobalTriggerDecision() :
31 AliHLTTriggerDecision(),
32 fContributingTriggers(AliHLTTriggerDecision::Class()),
36 // Default constructor.
40 AliHLTGlobalTriggerDecision::AliHLTGlobalTriggerDecision(
41 bool result, const AliHLTTriggerDomain& triggerDomain, const char* description
43 AliHLTTriggerDecision(result, "HLTGlobalTrigger", triggerDomain, description),
44 fContributingTriggers(AliHLTTriggerDecision::Class()),
48 // Constructor specifying multiple information fields.
51 fInputObjects.SetOwner(kTRUE);
55 AliHLTGlobalTriggerDecision::~AliHLTGlobalTriggerDecision()
57 // Default destructor.
61 void AliHLTGlobalTriggerDecision::Print(Option_t* option) const
63 // Prints the contents of the trigger decision.
66 if (opt.Contains("compact"))
69 AliHLTTriggerDecision::Print("");
71 else if (opt.Contains("short"))
74 AliHLTTriggerDecision::Print(option);
75 cout << "#################### Input trigger decisions ####################" << endl;
76 for (Int_t i = 0; i < NumberOfTriggerInputs(); i++)
78 TriggerInput(i)->Print(option);
80 if (NumberOfTriggerInputs() == 0)
82 cout << "(none)" << endl;
85 else if (opt.Contains("counters"))
87 cout << "Counter\tValue" << endl;
88 for (Int_t i = 0; i < fCounters.GetSize(); i++)
90 cout << i << "\t" << fCounters[i] << endl;
92 if (fCounters.GetSize() == 0)
94 cout << "(none)" << endl;
100 AliHLTTriggerDecision::Print(option);
101 cout << "#################### Input trigger decisions ####################" << endl;
102 for (Int_t i = 0; i < NumberOfTriggerInputs(); i++)
104 cout << "-------------------- Input trigger decision " << i << " --------------------" << endl;
105 TriggerInput(i)->Print(option);
107 if (NumberOfTriggerInputs() == 0)
109 cout << "(none)" << endl;
111 cout << "###################### Other input objects ######################" << endl;
112 for (Int_t i = 0; i < NumberOfInputObjects(); i++)
114 cout << "------------------------ Input object " << i << " ------------------------" << endl;
115 InputObject(i)->Print(option);
117 if (NumberOfInputObjects() == 0)
119 cout << "(none)" << endl;
121 cout << "#################### Event class counters ####################" << endl;
122 cout << "Counter\tValue" << endl;
123 for (Int_t i = 0; i < fCounters.GetSize(); i++)
125 cout << i << "\t" << fCounters[i] << endl;
127 if (fCounters.GetSize() == 0)
129 cout << "(none)" << endl;