ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
TrigJetConditionConfig_repeated.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
Instantiator for a Repeated Condition
7
*/
8
#include "
./TrigJetConditionConfig_repeated.h
"
9
#include "
RepeatedCondition.h
"
10
#include "
CompoundCondition.h
"
11
12
#include "GaudiKernel/StatusCode.h"
13
#include <vector>
14
15
16
TrigJetConditionConfig_repeated::TrigJetConditionConfig_repeated
(
const
std::string&
type
,
17
const
std::string& name,
18
const
IInterface* parent) :
19
base_class(
type
, name, parent){
20
21
}
22
23
24
StatusCode
TrigJetConditionConfig_repeated::initialize
() {
25
ATH_MSG_DEBUG
(
"initialising "
<< name());
26
return
StatusCode::SUCCESS;
27
}
28
29
std::unique_ptr<ICondition>
30
TrigJetConditionConfig_repeated::getCompoundCondition
()
const
{
31
std::vector<Condition> elements;
32
for
(
const
auto
& el :
m_elementConditions
){
33
34
auto
cond = el->getCondition();
35
if
(cond !=
nullptr
) {
36
elements.push_back(std::move(cond));
37
}
38
}
39
40
return
std::make_unique<CompoundCondition>(elements);
41
}
42
43
ConditionPtr
44
TrigJetConditionConfig_repeated::getRepeatedCondition
()
const
{
45
46
if
(
m_elementConditions
.empty()) {
return
ConditionPtr
(
nullptr
);}
47
48
return
49
std::make_unique<RepeatedCondition>(
getCompoundCondition
(),
50
m_multiplicity
,
51
m_clique
,
52
m_chainPartInd
,
53
m_invert
);
54
}
55
56
57
StatusCode
TrigJetConditionConfig_repeated::checkVals
()
const
{
58
59
if
(
m_multiplicity
< 1u) {
60
ATH_MSG_ERROR
(
"m_multiplicity = "
+ std::to_string(
m_multiplicity
) +
61
"expected > 0"
);
62
return
StatusCode::FAILURE;
63
}
64
65
return
StatusCode::SUCCESS;
66
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
CompoundCondition.h
RepeatedCondition.h
ConditionPtr
std::unique_ptr< IRepeatedCondition > ConditionPtr
Definition
RepeatedConditionsDefs.h:19
TrigJetConditionConfig_repeated.h
TrigJetConditionConfig_repeated::m_clique
Gaudi::Property< int > m_clique
Definition
TrigJetConditionConfig_repeated.h:38
TrigJetConditionConfig_repeated::m_elementConditions
ToolHandleArray< ITrigJetConditionConfig > m_elementConditions
Definition
TrigJetConditionConfig_repeated.h:30
TrigJetConditionConfig_repeated::getRepeatedCondition
virtual ConditionPtr getRepeatedCondition() const override
Definition
TrigJetConditionConfig_repeated.cxx:44
TrigJetConditionConfig_repeated::checkVals
StatusCode checkVals() const
Definition
TrigJetConditionConfig_repeated.cxx:57
TrigJetConditionConfig_repeated::initialize
virtual StatusCode initialize() override
Definition
TrigJetConditionConfig_repeated.cxx:24
TrigJetConditionConfig_repeated::getCompoundCondition
std::unique_ptr< ICondition > getCompoundCondition() const
Definition
TrigJetConditionConfig_repeated.cxx:30
TrigJetConditionConfig_repeated::m_chainPartInd
Gaudi::Property< int > m_chainPartInd
Definition
TrigJetConditionConfig_repeated.h:47
TrigJetConditionConfig_repeated::m_multiplicity
Gaudi::Property< std::size_t > m_multiplicity
Definition
TrigJetConditionConfig_repeated.h:34
TrigJetConditionConfig_repeated::m_invert
Gaudi::Property< bool > m_invert
Definition
TrigJetConditionConfig_repeated.h:52
TrigJetConditionConfig_repeated::TrigJetConditionConfig_repeated
TrigJetConditionConfig_repeated(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigJetConditionConfig_repeated.cxx:16
type
Generated on
for ATLAS Offline Software by
1.17.0