ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
Root
SelectionWriteAccessorChar.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
//
9
// includes
10
//
11
12
#include <
SelectionHelpers/SelectionWriteAccessorChar.h
>
13
14
#include <
PATInterfaces/SystematicSet.h
>
15
#include <
SystematicsHandles/ISysHandleBase.h
>
16
#include <
SystematicsHandles/ISystematicsSvc.h
>
17
//
18
// method implementations
19
//
20
21
namespace
CP
22
{
23
SelectionWriteAccessorChar ::
24
SelectionWriteAccessorChar (
const
std::string&
name
)
25
:
m_accessor
(
name
),
m_label
(
name
)
26
{}
27
28
29
30
void
SelectionWriteAccessorChar ::
31
setBits (
const
SG::AuxElement
& element,
32
SelectionType
selection
,
33
const
CP::SystematicSet
*
/*sys*/
)
const
34
{
35
if
(
selection
==
selectionAccept
())
36
m_accessor
(element) = 1;
37
else
38
m_accessor
(element) = 0;
39
}
40
41
42
43
void
SelectionWriteAccessorChar ::
44
setBool (
const
SG::AuxElement
& element,
45
bool
selection
,
46
const
CP::SystematicSet
*
/*sys*/
)
const
47
{
48
m_accessor
(element) =
selection
;
49
}
50
51
52
53
std::string SelectionWriteAccessorChar ::
54
label ()
const
55
{
56
return
m_label
;
57
}
58
59
60
61
StatusCode SelectionWriteAccessorChar ::
62
fillSystematics (
const
ISystematicsSvc
& svc,
63
const
CP::SystematicSet
& fullAffecting,
64
const
std::vector<CP::SystematicSet>&
/*sysList*/
,
65
ISysObjectHandleBase
& objectHandle)
66
{
67
using namespace
msgSelectionHelpers;
68
69
ANA_CHECK
(svc.setDecorSystematics (objectHandle.
getNamePattern
(),
m_label
, fullAffecting));
70
ANA_CHECK
(objectHandle.
addDecorationDependency
(svc,
m_label
,
true
));
71
return
StatusCode::SUCCESS;
72
}
73
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
ISysHandleBase.h
ISystematicsSvc.h
SelectionWriteAccessorChar.h
SystematicSet.h
CP::ISysObjectHandleBase
a ISysHandleBase for a handle to a specific object/container
Definition
ISysHandleBase.h:58
CP::ISysObjectHandleBase::addDecorationDependency
virtual StatusCode addDecorationDependency(const ISystematicsSvc &svc, const std::string &decoName, bool decoWrite)=0
add dependency information for the given decoration
CP::ISysObjectHandleBase::getNamePattern
virtual std::string getNamePattern() const =0
get the name pattern before substitution
CP::ISystematicsSvc
the interface for the central systematics service
Definition
ISystematicsSvc.h:26
CP::SelectionWriteAccessorChar::m_accessor
SG::Decorator< char > m_accessor
the underlying accessor
Definition
SelectionWriteAccessorChar.h:54
CP::SelectionWriteAccessorChar::m_label
std::string m_label
the label of the accessor
Definition
SelectionWriteAccessorChar.h:58
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
selection
const std::string selection
Definition
fbtTestBasics.cxx:75
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition
SelectionHelpers.h:26
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition
SelectionHelpers.h:35
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
Generated on
for ATLAS Offline Software by
1.17.0