ATLAS Offline Software
SelectionReadAccessorChar.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  SelectionReadAccessorChar (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  if (m_constAccessor (element))
34  return selectionAccept();
35  else
36  return 0;
37  }
38 
39 
40 
42  getBool (const SG::AuxElement& element,
43  const CP::SystematicSet * /*sys*/) const
44  {
45  return m_constAccessor (element);
46  }
47 
48 
49 
51  label () const
52  {
53  return m_label;
54  }
55 
56 
57 
59  isBool () const
60  {
61  return true;
62  }
63 
64 
65 
67  getInputAffecting (const ISystematicsSvc& /*svc*/,
68  const std::string& /*objectName*/) const
69  {
70  return CP::SystematicSet ();
71  }
72 
73 
74 
76  fillSystematics (const ISystematicsSvc& /*svc*/,
77  const std::vector<CP::SystematicSet>& /*sysList*/,
78  const std::string& /*objectName*/)
79  {
80  return StatusCode::SUCCESS;
81  }
82 }
CP::SelectionReadAccessorChar::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
fill the systematic variations
Definition: SelectionReadAccessorChar.cxx:76
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:472
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::SelectionReadAccessorChar::SelectionReadAccessorChar
SelectionReadAccessorChar(const std::string &name)
Definition: SelectionReadAccessorChar.cxx:23
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SelectionReadAccessorChar.h
CP::SelectionReadAccessorChar::getBool
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
Definition: SelectionReadAccessorChar.cxx:42
CP::SelectionReadAccessorChar::getBits
virtual SelectionType getBits(const SG::AuxElement &element, const CP::SystematicSet *sys) const override
get the selection decoration
Definition: SelectionReadAccessorChar.cxx:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::SelectionReadAccessorChar::label
virtual std::string label() const override
get the label of the accessor
Definition: SelectionReadAccessorChar.cxx:51
CP::SelectionReadAccessorChar::isBool
virtual bool isBool() const override
whether this accessor returns a simple boolean
Definition: SelectionReadAccessorChar.cxx:59
CP::SelectionReadAccessorChar::m_constAccessor
SG::AuxElement::ConstAccessor< char > m_constAccessor
the underlying accessor
Definition: SelectionReadAccessorChar.h:61
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35
CP::SelectionReadAccessorChar::getInputAffecting
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc, const std::string &objectName) const override
get the systematics when reading from the decoration
Definition: SelectionReadAccessorChar.cxx:67
CP::SelectionReadAccessorChar::m_label
std::string m_label
the label of the accessor
Definition: SelectionReadAccessorChar.h:65