ATLAS Offline Software
Loading...
Searching...
No Matches
CP::SelectionReadAccessorInvert Class Referencefinal

the SelectionAccesor for inverting a selection decoration More...

#include <SelectionReadAccessorInvert.h>

Inheritance diagram for CP::SelectionReadAccessorInvert:
Collaboration diagram for CP::SelectionReadAccessorInvert:

Public Member Functions

 SelectionReadAccessorInvert (std::unique_ptr< ISelectionReadAccessor > val_base)
virtual SelectionType getBits (const SG::AuxElement &element, const CP::SystematicSet *sys) const override
 get the selection decoration
virtual bool getBool (const SG::AuxElement &element, const CP::SystematicSet *sys) const override
 get the selection decoration
virtual std::string label () const override
 get the label of the accessor
virtual bool isBool () const override
 whether this accessor returns a simple boolean
virtual CP::SystematicSet getInputAffecting (const ISystematicsSvc &svc, const std::string &objectName) const override
 get the systematics when reading from the decoration
virtual StatusCode fillSystematics (const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
 fill the systematic variations

Private Attributes

std::unique_ptr< ISelectionReadAccessorm_base
 the base selection accessors I invert

Detailed Description

the SelectionAccesor for inverting a selection decoration

Definition at line 20 of file SelectionReadAccessorInvert.h.

Constructor & Destructor Documentation

◆ SelectionReadAccessorInvert()

CP::SelectionReadAccessorInvert::SelectionReadAccessorInvert ( std::unique_ptr< ISelectionReadAccessor > val_base)

Definition at line 22 of file SelectionReadAccessorInvert.cxx.

24 : m_base (std::move (val_base))
25 {}
std::unique_ptr< ISelectionReadAccessor > m_base
the base selection accessors I invert

Member Function Documentation

◆ fillSystematics()

StatusCode CP::SelectionReadAccessorInvert::fillSystematics ( const ISystematicsSvc & svc,
const std::vector< CP::SystematicSet > & sysList,
const std::string & objectName )
overridevirtual

fill the systematic variations

Implements CP::ISelectionReadAccessor.

Definition at line 75 of file SelectionReadAccessorInvert.cxx.

79 {
80 return m_base->fillSystematics (svc, sysList, objectName);
81 }

◆ getBits()

SelectionType CP::SelectionReadAccessorInvert::getBits ( const SG::AuxElement & element,
const CP::SystematicSet * sys ) const
overridevirtual

get the selection decoration

Implements CP::ISelectionReadAccessor.

Definition at line 29 of file SelectionReadAccessorInvert.cxx.

32 {
33 if (m_base->getBool (element, sys) == false)
34 return selectionAccept();
35 else
36 return 0;
37 }
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected

◆ getBool()

bool CP::SelectionReadAccessorInvert::getBool ( const SG::AuxElement & element,
const CP::SystematicSet * sys ) const
overridevirtual

get the selection decoration

Implements CP::ISelectionReadAccessor.

Definition at line 41 of file SelectionReadAccessorInvert.cxx.

44 {
45 return m_base->getBool (element, sys) == false;
46 }

◆ getInputAffecting()

CP::SystematicSet CP::SelectionReadAccessorInvert::getInputAffecting ( const ISystematicsSvc & svc,
const std::string & objectName ) const
overridevirtual

get the systematics when reading from the decoration

Implements CP::ISelectionReadAccessor.

Definition at line 66 of file SelectionReadAccessorInvert.cxx.

69 {
70 return m_base->getInputAffecting (svc, objectName);
71 }

◆ isBool()

bool CP::SelectionReadAccessorInvert::isBool ( ) const
overridevirtual

whether this accessor returns a simple boolean

Implements CP::ISelectionReadAccessor.

Definition at line 58 of file SelectionReadAccessorInvert.cxx.

60 {
61 return true;
62 }

◆ label()

std::string CP::SelectionReadAccessorInvert::label ( ) const
overridevirtual

get the label of the accessor

Implements CP::ISelectionReadAccessor.

Definition at line 50 of file SelectionReadAccessorInvert.cxx.

52 {
53 return m_base->label() + ",invert";
54 }

Member Data Documentation

◆ m_base

std::unique_ptr<ISelectionReadAccessor> CP::SelectionReadAccessorInvert::m_base
private

the base selection accessors I invert

Definition at line 63 of file SelectionReadAccessorInvert.h.


The documentation for this class was generated from the following files: