ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
bool empty () const noexcept
 whether we have a name configured More...
 
 operator bool () const noexcept
 !empty() More...
 
StatusCode initialize ()
 initialize the accessor More...
 
bool getBool (const SG::AuxElement &element) const
 get the selection as a bool More...
 

Private Attributes

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

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  }

◆ 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  }

◆ 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:
CP::SelectionReadHandle::m_accessor
std::unique_ptr< ISelectionReadAccessor > m_accessor
the accessor we use
Definition: SelectionReadHandle.h:72
CP::makeSelectionReadAccessor
StatusCode makeSelectionReadAccessor(const std::string &expr, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
make the ISelectionReadAccessor for the given name
Definition: ISelectionAccessor.cxx:54
CP::SelectionReadHandle::m_selection
std::string m_selection
the selection we use
Definition: SelectionReadHandle.h:68