ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
virtual bool getBool (const SG::AuxElement &element, const CP::SystematicSet *sys) const override
 get the selection decoration More...
 
virtual std::string label () const override
 get the label of the accessor More...
 
virtual bool isBool () const override
 whether this accessor returns a simple boolean More...
 
virtual CP::SystematicSet getInputAffecting (const ISystematicsSvc &svc, const std::string &objectName) const override
 get the systematics when reading from the decoration More...
 
virtual StatusCode fillSystematics (const ISystematicsSvc &svc, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
 fill the systematic variations More...
 

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.

23  : m_value(value)
24  {}

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  }

◆ 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:
athena.value
value
Definition: athena.py:122
CP::SelectionReadAccessorNull::m_value
bool m_value
Definition: SelectionReadAccessorNull.h:63
CP::selectionReject
constexpr SelectionType selectionReject()
the selection decoration to apply for objects that are rejected
Definition: SelectionHelpers.h:44
CP::selectionAccept
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
Definition: SelectionHelpers.h:35