ATLAS Offline Software
Loading...
Searching...
No Matches
CP::SelectionAccessorExprNot Class Reference

SelectionAccessor which implements a logical NOT. More...

#include <SelectionAccessorExprNot.h>

Inheritance diagram for CP::SelectionAccessorExprNot:
Collaboration diagram for CP::SelectionAccessorExprNot:

Public Member Functions

 SelectionAccessorExprNot (std::unique_ptr< ISelectionReadAccessor > child)
virtual bool getBool (const SG::AuxElement &element, const CP::SystematicSet *sys) const override
virtual std::string label () const override
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
virtual SelectionType getBits (const SG::AuxElement &element, const CP::SystematicSet *sys) const override
 get the selection decoration
virtual bool isBool () const override
 whether this accessor returns a simple boolean

Private Attributes

std::unique_ptr< ISelectionReadAccessorm_child

Detailed Description

SelectionAccessor which implements a logical NOT.

Definition at line 15 of file SelectionAccessorExprNot.h.

Constructor & Destructor Documentation

◆ SelectionAccessorExprNot()

CP::SelectionAccessorExprNot::SelectionAccessorExprNot ( std::unique_ptr< ISelectionReadAccessor > child)
Parameters
childThe selection accessor that is to be negated

Definition at line 11 of file SelectionAccessorExprNot.cxx.

13 : m_child(std::move(child)) {}
std::unique_ptr< ISelectionReadAccessor > m_child

Member Function Documentation

◆ fillSystematics()

StatusCode CP::SelectionAccessorExprNot::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 31 of file SelectionAccessorExprNot.cxx.

35{
36 return m_child->fillSystematics (svc, sysList, objectName);
37}

◆ getBits()

SelectionType CP::SelectionAccessorExprBase::getBits ( const SG::AuxElement & element,
const CP::SystematicSet * sys ) const
overridevirtualinherited

get the selection decoration

Implements CP::ISelectionReadAccessor.

Definition at line 9 of file SelectionAccessorExprBase.cxx.

11 {
12 return getBool(element,sys) ? selectionAccept() : selectionReject();
13}
virtual bool getBool(const SG::AuxElement &element, const CP::SystematicSet *sys=nullptr) const =0
get the selection decoration
constexpr SelectionType selectionReject()
the selection decoration to apply for objects that are rejected
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected

◆ getBool()

bool CP::SelectionAccessorExprNot::getBool ( const SG::AuxElement & element,
const CP::SystematicSet * sys ) const
overridevirtual
Parameters
elementAuxElement to evaluate the selection on
Returns
Result of the negated result of child

Implements CP::ISelectionReadAccessor.

Definition at line 15 of file SelectionAccessorExprNot.cxx.

16 {
17 return !m_child->getBool(element,sys);
18}

◆ getInputAffecting()

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

get the systematics when reading from the decoration

Implements CP::ISelectionReadAccessor.

Definition at line 24 of file SelectionAccessorExprNot.cxx.

27{
28 return m_child->getInputAffecting (svc, objectName);
29}

◆ isBool()

bool CP::SelectionAccessorExprBase::isBool ( ) const
overridevirtualinherited

whether this accessor returns a simple boolean

Implements CP::ISelectionReadAccessor.

Definition at line 17 of file SelectionAccessorExprBase.cxx.

19{
20 return true;
21}

◆ label()

std::string CP::SelectionAccessorExprNot::label ( ) const
overridevirtual
Returns
Returns a readable and parseable representation

Implements CP::ISelectionReadAccessor.

Definition at line 20 of file SelectionAccessorExprNot.cxx.

20 {
21 return "!" + m_child->label();
22}

Member Data Documentation

◆ m_child

std::unique_ptr<ISelectionReadAccessor> CP::SelectionAccessorExprNot::m_child
private

Definition at line 38 of file SelectionAccessorExprNot.h.


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