14 const std::string& linkName,
15 const EventContext& eventContext) {
17 target.typelessSetObjectLink(linkName,
24 const std::string& linkName,
25 const EventContext& eventContext) {
27 target.typelessSetObjectLink(linkName,
61 return StatusCode::SUCCESS;
72 auto cont = std::make_unique<xAOD::TrigCompositeContainer>();
73 auto auxcont = std::make_unique<xAOD::TrigCompositeAuxContainer>();
74 cont->setStore(auxcont.get());
79 l1trHandle->push_back(std::make_unique<xAOD::TrigComposite>());
82 auto retrieveAndLink = [
this, &eventContext, &l1trHandle](
const auto &keys) -> StatusCode {
83 for(
const auto& key : keys) {
85 if (key.empty()) {
continue; }
91 if (not handle->empty()) {
92 makeLink(key, *(l1trHandle->back()), key.key(), eventContext);
95 return StatusCode::SUCCESS;
114 ATH_CHECK(l1trHandle->back()->setDetail<std::string>(
"CTPResultKey",
m_CTPKey.key()));
121 ATH_CHECK(tool->decorateThresholds(eventContext));
124 return StatusCode::SUCCESS;
142 ATH_CHECK(cTauRoIs.
record(std::make_unique<xAOD::eFexTauRoIContainer>(),
143 std::make_unique<xAOD::eFexTauRoIAuxContainer>()));
147 SG::ReadHandle <xAOD::jFexTauRoIContainer> jTauRoIs{jTauKey, eventContext};
150 SG::ReadHandle <xAOD::eFexTauRoIContainer> eTauRoIs{eTauKey, eventContext};
157 cTauRoIs->push_back(std::make_unique<xAOD::eFexTauRoI>());
159 *cTauRoIs->back() = *eTau;
162 if (i_jTau == std::numeric_limits<size_t>::max()) {
165 cjTauLink(*cTauRoIs->back()) = jTauLink_t{};
168 ATH_MSG_DEBUG(
"Matched jTau index " << i_jTau <<
" to eTau index " << i_eTau);
170 cjTauLink(*cTauRoIs->back()) = jTauLink_t{jTauKey.key(), i_jTau, eventContext};
176 ATH_MSG_DEBUG(eTauKey.key() <<
" size: " << eTauRoIs->size());
178 ATH_MSG_DEBUG(jTauKey.key() <<
" size: " << jTauRoIs->size());
182 if (not cTauRoIs->empty()) {
186 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
ElementLink< xAOD::TrackParticleContainer > makeLink(const xAOD::TrackParticle *track)
An algorithm that can be simultaneously executed in multiple threads.
ElementLink implementation for ROOT usage.
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_cTauRoIKey
SG::ReadHandleKeyArray< xAOD::jFexSRJetRoIContainer > m_jFexSRJetRoIKeys
SG::ReadHandleKeyArray< xAOD::jFexTauRoIContainer > m_jFexTauRoIKeys
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_l1TriggerResultWHKey
SG::ReadHandleKeyArray< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojKeys
SG::ReadHandleKeyArray< xAOD::gFexJetRoIContainer > m_gFexSRJetRoIKeys
SG::ReadHandleKeyArray< xAOD::jFexFwdElRoIContainer > m_jFexFwdElRoIKeys
StatusCode createCombinedTauRoIs(xAOD::TrigComposite &l1tr, const EventContext &eventContext) const
Create the combined Tau container matching eTau to jTau.
ToolHandleArray< IRoIThresholdsTool > m_thresholdPatternTools
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::CTPResult > m_CTPKey
SG::ReadHandleKeyArray< xAOD::eFexTauRoIContainer > m_eFexTauRoIKeys
SG::ReadHandleKeyArray< xAOD::gFexJetRoIContainer > m_gFexLRJetRoIKeys
SG::ReadHandleKeyArray< xAOD::eFexEMRoIContainer > m_eFexEMRoIKeys
SG::ReadHandleKeyArray< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojKeys
L1TriggerResultMaker(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
SG::ReadHandleKeyArray< xAOD::MuonRoIContainer > m_muRoIKeys
SG::ReadHandleKeyArray< xAOD::jFexLRJetRoIContainer > m_jFexLRJetRoIKeys
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_cjTauLinkKey
virtual StatusCode execute(const EventContext &eventContext) const override
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const std::string & key() const
Return the StoreGate ID for the referenced object.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
static size_t cTauMatching(const xAOD::eFexTauRoI &eTau, const xAOD::jFexTauRoIContainer &jTauRoIs)
pointer & link(pointer p) const
Return a reference to the link for an element.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
static constexpr CLID ID()