ATLAS Offline Software
SelectionReadAccessorBits.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  SelectionReadAccessorBits (const std::string& name)
24  : m_constAccessor (name), m_label(name)
25  {}
26 
27 
28 
30  getBits (const SG::AuxElement& element,
31  const CP::SystematicSet * /*sys*/) const
32  {
33  return m_constAccessor (element);
34  }
35 
36 
37 
39  getBool (const SG::AuxElement& element,
40  const CP::SystematicSet * /*sys*/) const
41  {
42  return m_constAccessor (element) == selectionAccept();
43  }
44 
45 
46 
48  isBool () const
49  {
50  return false;
51  }
52 
53 
54 
56  label () const
57  {
58  return m_label;
59  }
60 
61 
62 
64  getInputAffecting (const ISystematicsSvc& /*svc*/,
65  const std::string& /*objectName*/) const
66  {
67  return CP::SystematicSet ();
68  }
69 
70 
71 
73  fillSystematics (const ISystematicsSvc& /*svc*/,
74  const std::vector<CP::SystematicSet>& /*sysList*/,
75  const std::string& /*objectName*/)
76  {
77  return StatusCode::SUCCESS;
78  }
79 }
CP::SelectionReadAccessorBits::label
virtual std::string label() const override
get the label of the accessor
Definition: SelectionReadAccessorBits.cxx:56
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:446
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition: SelectionHelpers.h:26
SystematicSet.h
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
SelectionReadAccessorBits.h
CP::SelectionReadAccessorBits::SelectionReadAccessorBits
SelectionReadAccessorBits(const std::string &name)
Definition: SelectionReadAccessorBits.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SelectionReadAccessorBits::getInputAffecting
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc, const std::string &objectName) const override
get the systematics when reading from the decoration
Definition: SelectionReadAccessorBits.cxx:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CP::SelectionReadAccessorBits::m_label
std::string m_label
the label of the accessor
Definition: SelectionReadAccessorBits.h:65
CP::SelectionReadAccessorBits::getBits
virtual SelectionType getBits(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
Definition: SelectionReadAccessorBits.cxx:30
CP::SelectionReadAccessorBits::getBool
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
Definition: SelectionReadAccessorBits.cxx:39
CP::SelectionReadAccessorBits::isBool
virtual bool isBool() const override
whether this accessor returns a simple boolean
Definition: SelectionReadAccessorBits.cxx:48
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35
CP::SelectionReadAccessorBits::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
fill the systematic variations
Definition: SelectionReadAccessorBits.cxx:73
CP::SelectionReadAccessorBits::m_constAccessor
SG::AuxElement::ConstAccessor< SelectionType > m_constAccessor
the underlying accessor
Definition: SelectionReadAccessorBits.h:61