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

a SelectionAccesor that can be used instead of a nullptr More...

#include <SelectionReadAccessorNull.h>

Inheritance diagram for CP::SelectionReadAccessorNull:
Collaboration diagram for CP::SelectionReadAccessorNull:

Public Member Functions

 SelectionReadAccessorNull (bool value=true)
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

bool m_value

Detailed Description

a SelectionAccesor that can be used instead of a nullptr

This makes it easier to set up code that just uses an ISelectionReadAccessor to preselect its objects, and doesn't want a special code path for the case of no preselections.

Definition at line 22 of file SelectionReadAccessorNull.h.

Constructor & Destructor Documentation

◆ SelectionReadAccessorNull()

CP::SelectionReadAccessorNull::SelectionReadAccessorNull ( bool value = true)

Definition at line 22 of file SelectionReadAccessorNull.cxx.

Member Function Documentation

◆ fillSystematics()

StatusCode CP::SelectionReadAccessorNull::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 70 of file SelectionReadAccessorNull.cxx.

74 {
75 return StatusCode::SUCCESS;
76 }

◆ getBits()

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

get the selection decoration

Implements CP::ISelectionReadAccessor.

Definition at line 28 of file SelectionReadAccessorNull.cxx.

31 {
33 }
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::SelectionReadAccessorNull::getBool ( const SG::AuxElement & element,
const CP::SystematicSet * sys ) const
overridevirtual

get the selection decoration

Implements CP::ISelectionReadAccessor.

Definition at line 37 of file SelectionReadAccessorNull.cxx.

40 {
41 return m_value;
42 }

◆ getInputAffecting()

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

get the systematics when reading from the decoration

Implements CP::ISelectionReadAccessor.

Definition at line 61 of file SelectionReadAccessorNull.cxx.

64 {
65 return SystematicSet ();
66 }

◆ isBool()

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

whether this accessor returns a simple boolean

Implements CP::ISelectionReadAccessor.

Definition at line 53 of file SelectionReadAccessorNull.cxx.

55 {
56 return true;
57 }

◆ label()

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

get the label of the accessor

Implements CP::ISelectionReadAccessor.

Definition at line 45 of file SelectionReadAccessorNull.cxx.

47 {
48 return m_value ? "true" : "false";
49 }

Member Data Documentation

◆ m_value

bool CP::SelectionReadAccessorNull::m_value
private

Definition at line 63 of file SelectionReadAccessorNull.h.


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