ATLAS Offline Software
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 
15 
16 //
17 // method implementations
18 //
19 
20 namespace CP
21 {
23  SelectionWriteAccessorBits (const std::string& name)
24  : m_accessor (name), m_label(name)
25  {}
26 
27 
28 
30  setBits (const SG::AuxElement& element,
32  const CP::SystematicSet * /*sys*/) const
33  {
34  m_accessor (element) = selection;
35  }
36 
37 
38 
40  setBool (const SG::AuxElement& element,
41  bool selection,
42  const CP::SystematicSet * /*sys*/) const
43  {
44  if (selection)
45  m_accessor (element) = selectionAccept();
46  else
47  m_accessor (element) = selectionAccept() ^ 0x1;
48  }
49 
50 
51 
53  label () const
54  {
55  return m_label;
56  }
57 
58 
59 
61  fillSystematics (const ISystematicsSvc& /*svc*/,
62  const CP::SystematicSet& /*fullAffecting*/,
63  const std::vector<CP::SystematicSet>& /*sysList*/,
64  const std::string& /*objectName*/)
65  {
66  return StatusCode::SUCCESS;
67  }
68 }
CP::ISystematicsSvc
the interface for the central systematics service
Definition: ISystematicsSvc.h:25
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition: SelectionHelpers.h:26
CP::SelectionWriteAccessorBits::setBool
virtual void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorBits.cxx:40
SystematicSet.h
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::SelectionWriteAccessorBits::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
fill the systematic variations
Definition: SelectionWriteAccessorBits.cxx:61
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::SelectionWriteAccessorBits::m_label
std::string m_label
the label of the accessor
Definition: SelectionWriteAccessorBits.h:58
CP::SelectionWriteAccessorBits::SelectionWriteAccessorBits
SelectionWriteAccessorBits(const std::string &name)
Definition: SelectionWriteAccessorBits.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SelectionWriteAccessorBits::label
virtual std::string label() const override
get the label of the accessor
Definition: SelectionWriteAccessorBits.cxx:53
SelectionWriteAccessorBits.h
selection
const std::string selection
Definition: fbtTestBasics.cxx:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CP::SelectionWriteAccessorBits::setBits
virtual void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorBits.cxx:30
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35
CP::SelectionWriteAccessorBits::m_accessor
SG::AuxElement::Decorator< SelectionType > m_accessor
the underlying accessor
Definition: SelectionWriteAccessorBits.h:54