ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonCnv
xAODMuonViewAlgs
src
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
7
#include <
StoreGate/WriteHandle.h
>
8
#include <
AthContainers/ConstDataVector.h
>
9
#include <
xAODMuonViews/ContainerMerge.h
>
10
namespace
MuonR4
{
11
12
StatusCode
sTgcMeasViewAlg::initialize
() {
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
28
ConstDataVector<xAOD::sTgcMeasContainer>
outContainer{
SG::VIEW_ELEMENTS
};
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
ContainerMerge.h
WriteHandle.h
Handle class for recording to StoreGate.
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition
ConstDataVector.h:76
ConstDataVector::asDataVector
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
MuonR4::sTgcMeasViewAlg::m_readKeyStrip
SG::ReadHandleKey< xAOD::sTgcStripContainer > m_readKeyStrip
Definition
sTgcMeasViewAlg.h:33
MuonR4::sTgcMeasViewAlg::initialize
StatusCode initialize() override
Definition
sTgcMeasViewAlg.cxx:12
MuonR4::sTgcMeasViewAlg::m_readKeyWire
SG::ReadHandleKey< xAOD::sTgcWireContainer > m_readKeyWire
Definition
sTgcMeasViewAlg.h:36
MuonR4::sTgcMeasViewAlg::m_readKeyPad
SG::ReadHandleKey< xAOD::sTgcPadContainer > m_readKeyPad
Definition
sTgcMeasViewAlg.h:39
MuonR4::sTgcMeasViewAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition
sTgcMeasViewAlg.cxx:20
MuonR4::sTgcMeasViewAlg::m_writeKey
SG::WriteHandleKey< xAOD::sTgcMeasContainer > m_writeKey
Definition
sTgcMeasViewAlg.h:42
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
MuonR4
This header ties the generic definitions in this package.
Definition
GlobalPattern.h:14
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition
OwnershipPolicy.h:18
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition
ReadCondHandle.h:282
xAOD::sTgcStripContainer
sTgcStripContainer_v1 sTgcStripContainer
Definition
sTgcStripContainer.h:14
xAOD::sTgcWireContainer
sTgcWireContainer_v1 sTgcWireContainer
Definition
sTgcWireContainer.h:13
xAOD::sTgcPadContainer
sTgcPadContainer_v1 sTgcPadContainer
Definition
sTgcPadContainer.h:15
sTgcMeasViewAlg.h
Generated on
for ATLAS Offline Software by
1.17.0