ATLAS Offline Software
Loading...
Searching...
No Matches
CleanCondition.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "./CleanCondition.h"
8
9#include <sstream>
10
11CleanCondition::CleanCondition(const std::string& cName) : m_cName(cName)
12{
13
14}
15
17 const std::unique_ptr<ITrigJetHypoInfoCollector>& collector) const {
18
19 bool momentValue;
20
21 if (!(ip->getAttribute(m_cName, momentValue)))
22 {
23
24 if (collector)
25 {
26 auto j_addr = static_cast<const void *>(ip.get());
27
28 std::stringstream ss0;
29 ss0 << "CleanCondition: "
30 << " unable to retrieve " << m_cName << '\n';
31 std::stringstream ss1;
32 ss1 << " jet : (" << j_addr << ")";
33 collector->collect(ss0.str(), ss1.str());
34 }
35 return false;
36 }
37
38 bool pass = momentValue;
39
40 if (collector)
41 {
42 const void *address = static_cast<const void *>(this);
43
44 std::stringstream ss0;
45 ss0 << "CleanCondition: (" << address
46 << ")"
47 << " moment " << m_cName
48 << " pass: " << std::boolalpha << pass << '\n';
49
50 auto j_addr = static_cast<const void *>(ip.get());
51 std::stringstream ss1;
52 ss1 << " jet : (" << j_addr << ") "
53 "moment "
54 << m_cName << " value: " << momentValue << '\n';
55
56 collector->collect(ss0.str(), ss1.str());
57 }
58
59 return pass;
60}
61
62
63bool
65 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
66 auto result = isSatisfied(ips[0], c);
67 return result;
68}
69
70
71std::string CleanCondition::toString() const {
72 std::stringstream ss;
73 ss << "CleanCondition (" << this << ") "
74 << " Cleaning dec: "
75 << m_cName
76 <<'\n';
77
78 return ss.str();
79}
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
static Double_t ss
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
CleanCondition(const std::string &cName)
std::string toString() const override
std::string m_cName