Loading [MathJax]/jax/output/SVG/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 :
EL::AnaReentrantAlgorithm(
name, svcLoc ){
39 return StatusCode::SUCCESS;
45 auto outputViewCol = std::make_unique<ConstDataVector<xAOD::MuonContainer>>(
SG::VIEW_ELEMENTS);
46 auto outputCol = std::make_unique<xAOD::MuonContainer>();
48 std::unique_ptr<xAOD::MuonAuxContainer> outputAuxCol;
50 outputAuxCol = std::make_unique<xAOD::MuonAuxContainer>();
51 outputCol->setStore(outputAuxCol.get());
55 std::vector<const xAOD::MuonContainer*> muonCollections;
57 size_t muonCountSum = 0;
61 muonCollections.push_back(muCol.
cptr());
62 muonCountSum += muCol->
size();
65 outputViewCol->reserve(muonCountSum);
67 outputCol->reserve(muonCountSum);
71 for (
auto& mciter : muonCollections) {
72 if (mciter and !mciter->empty()) {
75 for (
const auto*
const muon : *mciter) {
78 outputViewCol->push_back(
muon);
81 outputCol->push_back(newMuon);
94 ATH_CHECK(h_write.
record(std::move(outputCol), std::move(outputAuxCol)));
97 return StatusCode::SUCCESS;
virtual StatusCode execute(const EventContext &ctx) const override
const_pointer_type cptr()
Dereference the pointer.
SG::WriteHandleKey< ConstDataVector< xAOD::MuonContainer > > m_outMuonLocationView
Output xAOD::MuonContainer for the case of a view container.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
virtual StatusCode initialize() override
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_inputMuonContainers
Private data:
Select isolated Photons, Electrons and Muons.
Gaudi::Property< bool > m_createViewCollection
flag to create a view collection rather than building deep-copies (true by default)
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocationCopy
Output xAOD::MuonContainer object.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Muon_v1 Muon
Reference the current persistent version:
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
MuonContainerMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
size_type size() const noexcept
Returns the number of elements in the collection.