ATLAS Offline Software
Loading...
Searching...
No Matches
VariantExampleTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef COLUMNAR_EXAMPLE_TOOLS_VARIANT_EXAMPLE_TOOL_H
9#define COLUMNAR_EXAMPLE_TOOLS_VARIANT_EXAMPLE_TOOL_H
10
11#include <AsgTools/AsgTool.h>
22
23namespace columnar
24{
43
45 : public asg::AsgTool,
46 public ColumnarTool<>
47 {
48 public:
49
50 // Create a proper constructor for Athena
52
53 VariantExampleTool (const std::string& name);
54
55 virtual StatusCode initialize () override;
56
57 void callSingleEvent (ElectronRange electrons, MuonRange muons) const;
58
59 virtual void callEvents (EventContextRange events) const override;
60
61
66 ElectronAccessor<ObjectColumn> electronsHandle {*this, "AnalysisElectrons"};
67 MuonAccessor<ObjectColumn> muonsHandle {*this, "AnalysisMuons"};
68
69
80
81
96
97
103
109 };
110}
111
112#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
the base class for all columnar components
ColumnAccessor< MyVariantDef, float > etaAcc
ColumnDecorator< MyVariantDef, std::uint16_t > ptRankDec
the pt-rank decorator for the variant container
ElectronAccessor< ObjectColumn > electronsHandle
the object accessor for the underlying containers
VariantExampleTool(const std::string &name)
VariantContainerId< ContainerId::particle, ContainerId::electron, ContainerId::muon > MyVariantDef
the variant definition we are using
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual void callEvents(EventContextRange events) const override
MuonAccessor< ObjectColumn > muonsHandle
ColumnDecorator< ContainerId::electron, std::uint16_t > etaRankSpecialDec
a eta-rank decorator just for electrons
void callSingleEvent(ElectronRange electrons, MuonRange muons) const
ColumnAccessor< MyVariantDef, float > ptAcc
the pt and eta accessors for the variant container
AccessorTemplate< CI, CT, ColumnAccessMode::input, CM > ColumnAccessor
AccessorTemplate< ContainerId::electron, CT, ColumnAccessMode::input, CM > ElectronAccessor
Definition EgammaDef.h:40
AccessorTemplate< CI, CT, ColumnAccessMode::output, CM > ColumnDecorator
ObjectRange< ContainerId::eventContext > EventContextRange
ObjectRange< ContainerId::muon > MuonRange
Definition MuonDef.h:24
ObjectRange< ContainerId::electron > ElectronRange
Definition EgammaDef.h:37
AccessorTemplate< ContainerId::muon, CT, ColumnAccessMode::input, CM > MuonAccessor
Definition MuonDef.h:27
a "variant" ContainerId
Definition VariantDef.h:98