ATLAS Offline Software
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  */
9 #include "RepeatedCondition.h"
10 #include "CompoundCondition.h"
11 
12 #include "GaudiKernel/StatusCode.h"
13 #include <vector>
14 
15 
17  const std::string& name,
18  const IInterface* parent) :
19  base_class(type, name, parent){
20 
21 }
22 
23 
25  ATH_MSG_DEBUG("initialising " << name());
26  return StatusCode::SUCCESS;
27 }
28 
29 std::unique_ptr<ICondition>
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 
45 
46  if (m_elementConditions.empty()) {return ConditionPtr(nullptr);}
47 
48  return
49  std::make_unique<RepeatedCondition>(getCompoundCondition(),
51  m_clique,
53  m_invert);
54 }
55 
56 
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 }
TrigJetConditionConfig_repeated.h
CompoundCondition.h
TrigJetConditionConfig_repeated::getCompoundCondition
std::unique_ptr< ICondition > getCompoundCondition() const
Definition: TrigJetConditionConfig_repeated.cxx:30
TrigJetConditionConfig_repeated::initialize
virtual StatusCode initialize() override
Definition: TrigJetConditionConfig_repeated.cxx:24
TrigJetConditionConfig_repeated::checkVals
StatusCode checkVals() const
Definition: TrigJetConditionConfig_repeated.cxx:57
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigJetConditionConfig_repeated::m_invert
Gaudi::Property< bool > m_invert
Definition: TrigJetConditionConfig_repeated.h:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TrigJetConditionConfig_repeated::TrigJetConditionConfig_repeated
TrigJetConditionConfig_repeated(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigJetConditionConfig_repeated.cxx:16
ConditionPtr
std::unique_ptr< IRepeatedCondition > ConditionPtr
Definition: RepeatedConditionsDefs.h:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TrigJetConditionConfig_repeated::m_multiplicity
Gaudi::Property< std::size_t > m_multiplicity
Definition: TrigJetConditionConfig_repeated.h:34
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigJetConditionConfig_repeated::getRepeatedCondition
virtual ConditionPtr getRepeatedCondition() const override
Definition: TrigJetConditionConfig_repeated.cxx:44
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
RepeatedCondition.h
TrigJetConditionConfig_repeated::m_chainPartInd
Gaudi::Property< int > m_chainPartInd
Definition: TrigJetConditionConfig_repeated.h:47