ATLAS Offline Software
Loading...
Searching...
No Matches
SelectionWriteAccessorBits.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
13
16
17//
18// method implementations
19//
20
21namespace CP
22{
23 SelectionWriteAccessorBits ::
24 SelectionWriteAccessorBits (const std::string& name)
26 {}
27
28
29
30 void SelectionWriteAccessorBits ::
31 setBits (const SG::AuxElement& element,
33 const CP::SystematicSet * /*sys*/) const
34 {
35 m_accessor (element) = selection;
36 }
37
38
39
40 void SelectionWriteAccessorBits ::
41 setBool (const SG::AuxElement& element,
42 bool selection,
43 const CP::SystematicSet * /*sys*/) const
44 {
45 if (selection)
46 m_accessor (element) = selectionAccept();
47 else
48 m_accessor (element) = selectionAccept() ^ 0x1;
49 }
50
51
52
53 std::string SelectionWriteAccessorBits ::
54 label () const
55 {
56 return m_label;
57 }
58
59
60
61 StatusCode SelectionWriteAccessorBits ::
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 (objectHandle.addDecorationDependency (m_label, true));
70 return StatusCode::SUCCESS;
71 }
72}
#define ANA_CHECK(EXP)
check whether the given expression was successful
a ISysHandleBase for a handle to a specific object/container
virtual StatusCode addDecorationDependency(const std::string &decoName, bool decoWrite)=0
add dependency information for the given decoration
the interface for the central systematics service
SG::Decorator< SelectionType > m_accessor
the underlying accessor
std::string m_label
the label of the accessor
Class to wrap a set of SystematicVariations.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:484
const std::string selection
Select isolated Photons, Electrons and Muons.
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected