LDMX Software
TriggerResult.cxx
2
4
5 namespace ldmx {
7
9
10 void TriggerResult::Print() const {
11 std::cout << "TriggerResult { "
12 << "name: " << name_ << ", "
13 << "pass: " << pass_ << " }" << std::endl;
14
15 for (int i = 0; i < variables_.GetSize(); ++i) {
16 std::cout << "Element " << i << " : " << variables_[i] << std::endl;
17 }
18 }
19
21 name_ = "";
22 pass_ = false;
23
24 for (int i = 0; i < variables_.GetSize(); ++i) {
25 variables_[i] = 0;
26 }
27 }
28
29 void TriggerResult::set(const TString &name, bool pass, int nvar) {
30 name_ = name;
31 pass_ = pass;
32
33 if (nvar > variables_.GetSize()) {
34 variables_.Set(nvar);
35 }
36 }
37
38 void TriggerResult::setAlgoVar(int element, double value) {
39 if (element >= 0 && element < variables_.GetSize()) {
40 variables_[element] = value;
41 }
42 }
43} // namespace ldmx
Class that represents the trigger decision (pass/fail) for reconstruction.
Represents the trigger decision (pass/fail) for reconstruction.
virtual ~TriggerResult()
Class destructor.
void set(const TString &name, bool pass, int nvar)
Set name and pass of trigger.
TString name_
Name of the trigger algorithm.
void Print() const
Print a description of this object.
TriggerResult()
Class constructor.
void setAlgoVar(int element, double value)
Set an algorithm variable.
void Clear()
Reset the TriggerResult object.