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

a data handle for reading selection properties from objects More...

#include <SelectionReadHandle.h>

Collaboration diagram for CP::SelectionReadHandle:

Public Member Functions

template<typename T2>
 SelectionReadHandle (T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
 standard constructor
bool empty () const noexcept
 whether we have a name configured
 operator bool () const noexcept
 !empty()
StatusCode initialize ()
 initialize the accessor
bool getBool (const SG::AuxElement &element) const
 get the selection as a bool

Private Attributes

std::string m_selection
 the selection we use
std::unique_ptr< ISelectionReadAccessorm_accessor
 the accessor we use

Detailed Description

a data handle for reading selection properties from objects

Essentially this is just a wrapper around ISelectionReadAccessor to make it easier to use in an algorithm. Since we are now using this a lot, it seems like a good idea to streamline this as much as possible.

Definition at line 28 of file SelectionReadHandle.h.

Constructor & Destructor Documentation

◆ SelectionReadHandle()

template<typename T2>
CP::SelectionReadHandle::SelectionReadHandle ( T2 * owner,
const std::string & propertyName,
const std::string & propertyValue,
const std::string & propertyDescription )

standard constructor

Member Function Documentation

◆ empty()

bool CP::SelectionReadHandle::empty ( ) const
noexcept

whether we have a name configured

Definition at line 22 of file SelectionReadHandle.cxx.

24 {
25 return m_selection.empty();
26 }
std::string m_selection
the selection we use

◆ getBool()

bool CP::SelectionReadHandle::getBool ( const SG::AuxElement & element) const

get the selection as a bool

◆ initialize()

StatusCode CP::SelectionReadHandle::initialize ( )

initialize the accessor

Definition at line 38 of file SelectionReadHandle.cxx.

40 {
42 }
std::unique_ptr< ISelectionReadAccessor > m_accessor
the accessor we use
StatusCode makeSelectionReadAccessor(const std::string &expr, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
make the ISelectionReadAccessor for the given name

◆ operator bool()

CP::SelectionReadHandle::operator bool ( ) const
explicitnoexcept

!empty()

Definition at line 30 of file SelectionReadHandle.cxx.

32 {
33 return !m_selection.empty();
34 }

Member Data Documentation

◆ m_accessor

std::unique_ptr<ISelectionReadAccessor> CP::SelectionReadHandle::m_accessor
private

the accessor we use

Definition at line 72 of file SelectionReadHandle.h.

◆ m_selection

std::string CP::SelectionReadHandle::m_selection
private

the selection we use

Definition at line 68 of file SelectionReadHandle.h.


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