ATLAS Offline Software
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 
13 
15 
16 //
17 // method implementations
18 //
19 
20 namespace CP
21 {
23  SelectionWriteAccessorChar (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  if (selection == selectionAccept())
35  m_accessor (element) = 1;
36  else
37  m_accessor (element) = 0;
38  }
39 
40 
41 
43  setBool (const SG::AuxElement& element,
44  bool selection,
45  const CP::SystematicSet * /*sys*/) const
46  {
47  m_accessor (element) = selection;
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::SelectionWriteAccessorChar::SelectionWriteAccessorChar
SelectionWriteAccessorChar(const std::string &name)
Definition: SelectionWriteAccessorChar.cxx:23
CP::SelectionWriteAccessorChar::label
virtual std::string label() const override
get the label of the accessor
Definition: SelectionWriteAccessorChar.cxx:53
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
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
CP::SelectionWriteAccessorChar::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: SelectionWriteAccessorChar.cxx:61
SelectionWriteAccessorChar.h
CP::SelectionWriteAccessorChar::m_accessor
SG::AuxElement::Decorator< char > m_accessor
the underlying accessor
Definition: SelectionWriteAccessorChar.h:54
selection
std::string selection
Definition: fbtTestBasics.cxx:75
CP::SelectionWriteAccessorChar::setBool
virtual void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorChar.cxx:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::SelectionWriteAccessorChar::m_label
std::string m_label
the label of the accessor
Definition: SelectionWriteAccessorChar.h:58
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35
CP::SelectionWriteAccessorChar::setBits
virtual void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorChar.cxx:30