ATLAS Offline Software
Loading...
Searching...
No Matches
ColumnarLinkTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef COLUMNAR_HELPER_TOOLS_COLUMNAR_LINK_TOOL_H
9#define COLUMNAR_HELPER_TOOLS_COLUMNAR_LINK_TOOL_H
10
11#include <AsgTools/AsgTool.h>
17#include <SGCore/sgkey_t.h>
18
19#include <memory>
20#include <string>
21#include <vector>
22
23namespace columnar
24{
43
44 class ColumnarLinkTool final
45 : public asg::AsgTool,
46 public ColumnarTool<>
47 {
48 public:
49
50 // Create a proper constructor for Athena
52
53 ColumnarLinkTool (const std::string& name);
54
55 virtual StatusCode initialize () override;
56
57 virtual void callEvents (EventContextRange events) const override;
58
59
60 Gaudi::Property<std::vector<std::string>> m_targetContainerNames {
61 this, "targetContainerNames", {},
62 "names of the allowed target containers, in order of their columnar-key index"};
63
64 Gaudi::Property<bool> m_errorOnUnknownKey {
65 this, "errorOnUnknownKey", true,
66 "whether an unknown sgkey should produce an error (true), or an invalid link (false)"};
67
68 Gaudi::Property<unsigned> m_nestingDepth {
69 this, "nestingDepth", 0u,
70 "nesting depth of vector-of-link inputs (0 = scalar link per particle, 1 = vector of links per particle, 2 = vector of vector of links, ...)"};
71
72
83 struct ColumnSlot final
84 {
85 unsigned dataIndex = 0u;
86 std::unique_ptr<ColumnAccessorDataArray> accessorData;
87 };
88
89
90 private:
91
97 struct TargetSlot final
98 {
100 unsigned dataIndex = 0u;
101 std::unique_ptr<ColumnAccessorDataArray> accessorData;
102 };
103 std::vector<TargetSlot> m_targetSlots;
104
107
111 std::vector<ColumnSlot> m_linkOffsetSlots;
112
116
120
123 };
124}
125
126#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
std::vector< TargetSlot > m_targetSlots
ColumnSlot m_indexSlot
flat input column with the per-link index into the target container
std::vector< ColumnSlot > m_linkOffsetSlots
offset columns describing the nested-vector structure of the link triple; outermost first; size match...
ColumnSlot m_outLinkSlot
flat output column with the merged link
Gaudi::Property< bool > m_errorOnUnknownKey
ColumnSlot m_keySlot
flat input column with the raw sgkey identifying the target container
Gaudi::Property< std::vector< std::string > > m_targetContainerNames
virtual void callEvents(EventContextRange events) const override
ColumnSlot m_srcContainerSlot
per-event particle offsets of the source container
Gaudi::Property< unsigned > m_nestingDepth
ColumnarLinkTool(const std::string &name)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
the base class for all columnar components
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32
ObjectRange< EventContextDef > EventContextRange
generic per-column low-level accessor state
std::unique_ptr< ColumnAccessorDataArray > accessorData
per-target container information
std::unique_ptr< ColumnAccessorDataArray > accessorData