24 : m_sharedData (std::make_shared<SharedData>(this))
28 ColumnarTool<ColumnarModeXAOD> ::
29 ColumnarTool (ColumnarTool<ColumnarModeXAOD>* val_parent)
33 m_sharedData = val_parent->m_sharedData;
35 m_sharedData->m_fulltools.insert (tool);
36 m_sharedData->m_subtools.insert(
this);
38 m_sharedData = std::make_shared<SharedData>(
this);
41 ColumnarTool<ColumnarModeXAOD> ::
44 m_sharedData->m_subtools.erase(
this);
46 m_sharedData->m_fulltools.erase (tool);
49 StatusCode ColumnarTool<ColumnarModeXAOD> ::
52 for (
auto& [key_weak, addMTDependency] : m_sharedData->m_keys)
54 if (
auto key = key_weak.lock(); key && !
key->key().empty())
58 if (
key->initialize().isFailure())
59 return StatusCode::FAILURE;
60#ifndef XAOD_STANDALONE
63 for (
auto* tool : m_sharedData->m_fulltools)
64 tool->addDependency (
key->fullKey(),
key->mode());
69 m_sharedData->m_keys.clear();
70 return StatusCode::SUCCESS;
73 void ColumnarTool<ColumnarModeXAOD> ::
74 addSubtool (ColumnarTool<ColumnarModeXAOD>& subtool)
76 auto sharedData = subtool.m_sharedData;
77 for (
auto* tool : sharedData->m_subtools)
78 tool->m_sharedData = m_sharedData;
79 m_sharedData->m_subtools.insert (sharedData->m_subtools.begin(), sharedData->m_subtools.end());
80 m_sharedData->m_fulltools.insert (sharedData->m_fulltools.begin(), sharedData->m_fulltools.end());
83 void ColumnarTool<ColumnarModeXAOD> ::
84 callEvents (ObjectRange<ContainerId::eventContext,ColumnarModeXAOD> )
const
86 throw std::runtime_error (
"tool didn't implement callEvents");
89 void ColumnarTool<ColumnarModeXAOD> ::
90 internalAddKey (std::weak_ptr<SG::VarHandleKey> key,
bool addMTDependency)
92 m_sharedData->m_keys.emplace_back (key, addMTDependency);
95 ColumnarTool<ColumnarModeXAOD>::SharedData ::
96 SharedData (ColumnarTool<ColumnarModeXAOD>* self)
100 m_fulltools.insert (tool);