ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcMeasViewAlg.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 "sTgcMeasViewAlg.h"
6
10namespace MuonR4{
11
13 ATH_CHECK(m_readKeyStrip.initialize());
14 ATH_CHECK(m_readKeyWire.initialize());
15 ATH_CHECK(m_readKeyPad.initialize());
16 ATH_CHECK(m_writeKey.initialize());
17 return StatusCode::SUCCESS;
18 }
19
20 StatusCode sTgcMeasViewAlg::execute(const EventContext& ctx) const {
21 const xAOD::sTgcStripContainer* strips{nullptr};
22 const xAOD::sTgcWireContainer* wires{nullptr};
23 const xAOD::sTgcPadContainer* pads{nullptr};
24 ATH_CHECK(SG::get(strips, m_readKeyStrip, ctx));
25 ATH_CHECK(SG::get(wires, m_readKeyWire, ctx));
26 ATH_CHECK(SG::get(pads, m_readKeyPad, ctx));
27
29 mergeContainer(outContainer, *strips, *wires);
30 mergeContainer(outContainer, *pads);
31
32 SG::WriteHandle writeHandle{m_writeKey, ctx};
33 ATH_CHECK(writeHandle.record(std::make_unique<xAOD::sTgcMeasContainer>(*outContainer.asDataVector())));
34 return StatusCode::SUCCESS;
35 }
36
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
DataVector adapter that acts like it holds const pointers.
Handle class for recording to StoreGate.
DataVector adapter that acts like it holds const pointers.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
SG::ReadHandleKey< xAOD::sTgcStripContainer > m_readKeyStrip
StatusCode initialize() override
SG::ReadHandleKey< xAOD::sTgcWireContainer > m_readKeyWire
SG::ReadHandleKey< xAOD::sTgcPadContainer > m_readKeyPad
StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< xAOD::sTgcMeasContainer > m_writeKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
This header ties the generic definitions in this package.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
sTgcStripContainer_v1 sTgcStripContainer
sTgcWireContainer_v1 sTgcWireContainer
sTgcPadContainer_v1 sTgcPadContainer