ATLAS Offline Software
Loading...
Searching...
No Matches
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
29std::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(),
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}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
std::unique_ptr< IRepeatedCondition > ConditionPtr
ToolHandleArray< ITrigJetConditionConfig > m_elementConditions
virtual ConditionPtr getRepeatedCondition() const override
std::unique_ptr< ICondition > getCompoundCondition() const
Gaudi::Property< std::size_t > m_multiplicity
TrigJetConditionConfig_repeated(const std::string &type, const std::string &name, const IInterface *parent)