ATLAS Offline Software
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>
21 #include <ColumnarMuon/MuonDef.h>
22 
23 namespace 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 
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
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
columnar::VariantContainerId
a "variant" ContainerId
Definition: VariantDef.h:98
VariantDef.h
columnar::VariantExampleTool::ptAcc
ColumnAccessor< MyVariantDef, float > ptAcc
the pt and eta accessors for the variant container
Definition: VariantExampleTool.h:94
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
columnar::VariantExampleTool::VariantExampleTool
VariantExampleTool(const std::string &name)
Definition: VariantExampleTool.cxx:20
EgammaDef.h
columnar::ObjectRange
a class representing a continuous sequence of objects (a.k.a. a container)
Definition: ContainerId.h:177
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
columnar::VariantExampleTool::etaAcc
ColumnAccessor< MyVariantDef, float > etaAcc
Definition: VariantExampleTool.h:95
columnar::VariantExampleTool::callEvents
virtual void callEvents(EventContextRange events) const override
Definition: VariantExampleTool.cxx:113
columnar::VariantExampleTool::ptRankDec
ColumnDecorator< MyVariantDef, std::uint16_t > ptRankDec
the pt-rank decorator for the variant container
Definition: VariantExampleTool.h:102
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ColumnAccessor.h
ObjectColumn.h
ColumnarTool.h
MuonDef.h
columnar::final
CM final
Definition: ColumnAccessor.h:106
VariantObjectId.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
columnar::VariantExampleTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: VariantExampleTool.cxx:27
columnar::VariantExampleTool::muonsHandle
MuonAccessor< ObjectColumn > muonsHandle
Definition: VariantExampleTool.h:67
columnar::VariantExampleTool::electronsHandle
ElectronAccessor< ObjectColumn > electronsHandle
the object accessor for the underlying containers
Definition: VariantExampleTool.h:66
columnar::VariantExampleTool::etaRankSpecialDec
ColumnDecorator< ContainerId::electron, std::uint16_t > etaRankSpecialDec
a eta-rank decorator just for electrons
Definition: VariantExampleTool.h:108
columnar
Definition: ClusterDef.h:16
VariantAccessor.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
columnar::ColumnarTool
the base class for all columnar components
Definition: ColumnAccessorDataArray.h:17
columnar::VariantExampleTool
an example of a columnar tool using "variant" object ids and column accessors
Definition: VariantExampleTool.h:47
columnar::AccessorTemplate
the raw column accessor template class
Definition: ColumnAccessor.h:81
AsgTool.h
ParticleDef.h
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
columnar::VariantExampleTool::callSingleEvent
void callSingleEvent(ElectronRange electrons, MuonRange muons) const
Definition: VariantExampleTool.cxx:38