ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Columnar
ColumnarHelperTools
ColumnarHelperTools
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
>
12
#include <
AsgTools/PropertyWrapper.h
>
13
#include <
ColumnarCore/ColumnAccessor.h
>
14
#include <
ColumnarCore/ColumnAccessorDataArray.h
>
15
#include <
ColumnarCore/ColumnarDef.h
>
16
#include <
ColumnarCore/ColumnarTool.h
>
17
#include <
SGCore/sgkey_t.h
>
18
19
#include <memory>
20
#include <string>
21
#include <vector>
22
23
namespace
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
51
ASG_TOOL_CLASS
(
ColumnarLinkTool
,
asg::IAsgTool
)
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
{
99
SG::sgkey_t
sgKey
= 0;
100
unsigned
dataIndex
= 0u;
101
std::unique_ptr<ColumnAccessorDataArray>
accessorData
;
102
};
103
std::vector<TargetSlot>
m_targetSlots
;
104
106
ColumnSlot
m_srcContainerSlot
;
107
111
std::vector<ColumnSlot>
m_linkOffsetSlots
;
112
115
ColumnSlot
m_indexSlot
;
116
119
ColumnSlot
m_keySlot
;
120
122
ColumnSlot
m_outLinkSlot
;
123
};
124
}
125
126
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
ColumnAccessorDataArray.h
ColumnAccessor.h
ColumnarDef.h
ColumnarTool.h
PropertyWrapper.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition
IAsgTool.h:41
columnar::ColumnarLinkTool::m_targetSlots
std::vector< TargetSlot > m_targetSlots
Definition
ColumnarLinkTool.h:103
columnar::ColumnarLinkTool::m_indexSlot
ColumnSlot m_indexSlot
flat input column with the per-link index into the target container
Definition
ColumnarLinkTool.h:115
columnar::ColumnarLinkTool::m_linkOffsetSlots
std::vector< ColumnSlot > m_linkOffsetSlots
offset columns describing the nested-vector structure of the link triple; outermost first; size match...
Definition
ColumnarLinkTool.h:111
columnar::ColumnarLinkTool::m_outLinkSlot
ColumnSlot m_outLinkSlot
flat output column with the merged link
Definition
ColumnarLinkTool.h:122
columnar::ColumnarLinkTool::m_errorOnUnknownKey
Gaudi::Property< bool > m_errorOnUnknownKey
Definition
ColumnarLinkTool.h:64
columnar::ColumnarLinkTool::m_keySlot
ColumnSlot m_keySlot
flat input column with the raw sgkey identifying the target container
Definition
ColumnarLinkTool.h:119
columnar::ColumnarLinkTool::m_targetContainerNames
Gaudi::Property< std::vector< std::string > > m_targetContainerNames
Definition
ColumnarLinkTool.h:60
columnar::ColumnarLinkTool::callEvents
virtual void callEvents(EventContextRange events) const override
Definition
ColumnarLinkTool.cxx:156
columnar::ColumnarLinkTool::m_srcContainerSlot
ColumnSlot m_srcContainerSlot
per-event particle offsets of the source container
Definition
ColumnarLinkTool.h:106
columnar::ColumnarLinkTool::m_nestingDepth
Gaudi::Property< unsigned > m_nestingDepth
Definition
ColumnarLinkTool.h:68
columnar::ColumnarLinkTool::ColumnarLinkTool
ColumnarLinkTool(const std::string &name)
Definition
ColumnarLinkTool.cxx:73
columnar::ColumnarLinkTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
ColumnarLinkTool.cxx:80
columnar::ColumnarTool
the base class for all columnar components
Definition
ColumnAccessorDataArray.h:17
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition
sgkey_t.h:32
columnar
Definition
ClusterDef.h:16
columnar::EventContextRange
ObjectRange< EventContextDef > EventContextRange
Definition
ContainerId.h:211
sgkey_t.h
columnar::ColumnarLinkTool::ColumnSlot
generic per-column low-level accessor state
Definition
ColumnarLinkTool.h:84
columnar::ColumnarLinkTool::ColumnSlot::accessorData
std::unique_ptr< ColumnAccessorDataArray > accessorData
Definition
ColumnarLinkTool.h:86
columnar::ColumnarLinkTool::ColumnSlot::dataIndex
unsigned dataIndex
Definition
ColumnarLinkTool.h:85
columnar::ColumnarLinkTool::TargetSlot
per-target container information
Definition
ColumnarLinkTool.h:98
columnar::ColumnarLinkTool::TargetSlot::dataIndex
unsigned dataIndex
Definition
ColumnarLinkTool.h:100
columnar::ColumnarLinkTool::TargetSlot::sgKey
SG::sgkey_t sgKey
Definition
ColumnarLinkTool.h:99
columnar::ColumnarLinkTool::TargetSlot::accessorData
std::unique_ptr< ColumnAccessorDataArray > accessorData
Definition
ColumnarLinkTool.h:101
Generated on
for ATLAS Offline Software by
1.17.0