ATLAS Offline Software
SelectionWriteAccessorInvert.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  SelectionWriteAccessorInvert (std::unique_ptr<ISelectionWriteAccessor> val_base)
24  : m_base (std::move (val_base))
25  {}
26 
27 
28 
30  setBits (const SG::AuxElement& element,
32  const CP::SystematicSet *sys) const
33  {
34  m_base->setBool (element, selection != selectionAccept(), sys);
35  }
36 
37 
38 
40  setBool (const SG::AuxElement& element,
41  bool selection,
42  const CP::SystematicSet *sys) const
43  {
44  m_base->setBool (element, !selection, sys);
45  }
46 
47 
48 
50  label () const
51  {
52  return m_base->label() + ",invert";
53  }
54 
55 
56 
59  const CP::SystematicSet& fullAffecting,
60  const std::vector<CP::SystematicSet>& sysList,
61  const std::string& objectName)
62  {
63  return m_base->fillSystematics (svc, fullAffecting, sysList, objectName);
64  }
65 }
CP::SelectionWriteAccessorInvert::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: SelectionWriteAccessorInvert.cxx:58
CP::SelectionWriteAccessorInvert::SelectionWriteAccessorInvert
SelectionWriteAccessorInvert(std::unique_ptr< ISelectionWriteAccessor > val_base)
Definition: SelectionWriteAccessorInvert.cxx:23
CP::ISystematicsSvc
the interface for the central systematics service
Definition: ISystematicsSvc.h:25
CP::SelectionWriteAccessorInvert::m_base
std::unique_ptr< ISelectionWriteAccessor > m_base
the base selection accessors I invert
Definition: SelectionWriteAccessorInvert.h:56
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
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::SelectionWriteAccessorInvert::label
virtual std::string label() const override
get the label of the accessor
Definition: SelectionWriteAccessorInvert.cxx:50
SelectionWriteAccessorInvert.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
selection
std::string selection
Definition: fbtTestBasics.cxx:73
CP::SelectionWriteAccessorInvert::setBits
virtual void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorInvert.cxx:30
CP::SelectionWriteAccessorInvert::setBool
virtual void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet *sys) const override
set the selection decoration
Definition: SelectionWriteAccessorInvert.cxx:40
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35