ATLAS Offline Software
PhysicsAnalysis
Columnar
ColumnarExampleTools
Root
StringExampleTool.cxx
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
// includes
9
//
10
11
#include <
ColumnarExampleTools/StringExampleTool.h
>
12
13
//
14
// method implementations
15
//
16
17
namespace
columnar
18
{
19
StringExampleTool ::
20
StringExampleTool
(
const
std::string&
name
)
21
: AsgTool (
name
)
22
{}
23
24
25
26
StatusCode
StringExampleTool ::
27
initialize
()
28
{
29
// give the base class a chance to initialize the column accessor
30
// backends
31
ANA_CHECK
(initializeColumns());
32
return
StatusCode::SUCCESS;
33
}
34
35
36
37
void
StringExampleTool ::
38
callEvents
(
EventContextRange
events
)
const
39
{
40
// loop over all events and met terms. note that this is
41
// deliberately looping by value, as the ID classes are very small
42
// and can be copied cheaply. this could have also been written as
43
// a single loop over all mets in the event range, but I chose to
44
// split it up into two loops as most tools will need to do some
45
// per-event things, e.g. retrieve `EventInfo`.
46
for
(
columnar::EventContextId
event
:
events
)
47
{
48
for
(
MetId
met
:
metAcc
(
event
))
49
{
50
selectionDec
(
met
) =
nameAcc
(
met
) ==
"Final"
;
51
}
52
}
53
}
54
}
columnar::StringExampleTool::callEvents
virtual void callEvents(EventContextRange events) const override
Definition:
StringExampleTool.cxx:38
StringExampleTool.h
columnar::StringExampleTool::nameAcc
MetAccessor< std::string > nameAcc
a string column accessor
Definition:
StringExampleTool.h:59
columnar::StringExampleTool::selectionDec
MetDecorator< char > selectionDec
the selection decorator for the met terms
Definition:
StringExampleTool.h:70
TRT::Track::event
@ event
Definition:
InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:74
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
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
met
Definition:
IMETSignificance.h:24
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
columnar::StringExampleTool::metAcc
MetAccessor< ObjectColumn > metAcc
the object accessor for the met map
Definition:
StringExampleTool.h:52
columnar::ObjectId
a class representing a single object (electron, muons, etc.)
Definition:
ContainerId.h:178
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:240
columnar::StringExampleTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition:
StringExampleTool.cxx:27
columnar
Definition:
ClusterDef.h:16
columnar::StringExampleTool::StringExampleTool
StringExampleTool(const std::string &name)
Definition:
StringExampleTool.cxx:20
Generated on Wed Nov 19 2025 21:19:00 for ATLAS Offline Software by
1.8.18