| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Attributes | List of all members
NTuple::Selector Class Reference

NTuple Selector class. More...

`#include <GaudiKernel/Selector.h>`

Inheritance diagram for NTuple::Selector:
[legend]
Collaboration diagram for NTuple::Selector:
[legend]

## Public Member Functions
| Selector (IInterface *svc)
| Standard constructor. More...
virtual | ~Selector ()=default
| Standard Destructor. More...
bool | firstCall () const
| Check for first call. More...
StatusCode | initResult () const
| Access initialization status. More...
bool | operator() (void *nt) override
| Default callback from interface. More...
virtual bool | operator() (NTuple::Tuple *nt)
| Specialized callback for NTuples. More...
virtual StatusCode | initialize (NTuple::Tuple *nt)
| Selector Initialization. More...
Public Member Functions inherited from SelectStatement
| SelectStatement (const std::string &s, long typ)
| Standard Constructor initializing select string. More...
| SelectStatement (const std::string &s)
| Standard Constructor initializing select string. More...
| SelectStatement ()
| Standard Constructor initializing function call. More...
virtual | ~SelectStatement ()
| Standard Destructor. More...
long | type () const override
| Access the type of the object. More...
const std::string & | criteria () const override
| Access the selection string. More...
void | setCriteria (const std::string &crit) override
| Set the type. More...
void | setActive (bool flag=true) override
| Change activity flag. More...
bool | isActive () const override
| Check if selection is active. More...
Public Member Functions inherited from implements< ISelectStatement >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| implements ()=default
| Default constructor. More...
| implements (const implements &)
| Copy constructor (zero the reference count) More...
implements & | operator= (const implements &)
| Assignment operator (do not touch the reference count). More...
unsigned long | addRef () override
| Reference Interface instance. More...
unsigned long | release () override
| Release Interface instance. More...
unsigned long | refCount () const override
| Current reference count. More...

## Protected Attributes
IInterface * | m_parent
| reference to parent interface More...
bool | m_firstCall
| Boolean to indicate need for initialization. More...
StatusCode | m_status
| StatusCode indication initialization result. More...
Protected Attributes inherited from SelectStatement
std::string | m_select
| Select string. More...
bool | m_isActive
| Activation flag. More...
long | m_type
| Type identifier. More...
Protected Attributes inherited from implements< ISelectStatement >
std::atomic_ulong | m_refCount
| Reference counter. More...

## Additional Inherited Members
Public Types inherited from implements< ISelectStatement >
using | base_class = implements< Interfaces... >
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
using | iids = typename extend_interfaces_base::ext_iids
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Detailed Description

NTuple Selector class.

Definition at line 29 of file Selector.h.

## Constructor & Destructor Documentation

## ◆ Selector()

NTuple::Selector::Selector | ( | IInterface * | svc | ) |
| inline

Standard constructor.

Definition at line 40 of file Selector.h.

40 : m_parent( svc ), m_firstCall( true ) {}
NTuple::Selector::m_firstCall
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
NTuple::Selector::m_parent
IInterface * m_parent
reference to parent interface
Definition: Selector.h:32

## ◆ ~Selector()

virtual NTuple::Selector::~Selector | ( |  | ) |
| virtual default

Standard Destructor.

## Member Function Documentation

## ◆ firstCall()

bool NTuple::Selector::firstCall | ( |  | ) | const
| inline

Check for first call.

Definition at line 44 of file Selector.h.

44 { return m_firstCall; }
NTuple::Selector::m_firstCall
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34

## ◆ initialize()

StatusCode NTuple::Selector::initialize | ( | NTuple::Tuple * | nt | ) |
| virtual

Selector Initialization.

Selector Initialisation.

Definition at line 20 of file Selector.cpp.

20 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ initResult()

StatusCode NTuple::Selector::initResult | ( |  | ) | const
| inline

Access initialization status.

Definition at line 46 of file Selector.h.

46 { return m_status; }
NTuple::Selector::m_status
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36

## ◆ operator()() [1/2]

bool NTuple::Selector::operator() | ( | void * | nt | ) |
| override virtual

Default callback from interface.

Overloaded callback from SelectStatement.

Reimplemented from SelectStatement.

Definition at line 23 of file Selector.cpp.

23 {
24 DataObject* p = static_cast<DataObject*>( nt );
25 bool result = false;
26 try {
27 NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>( p );
28 if ( tuple ) {
29 if ( m_firstCall ) {
30 m_status = initialize( tuple );
31 m_firstCall = false;
32 }
33 if ( m_status.isSuccess() ) { result = this->operator()( tuple ); }
34 }
35 } catch ( ... ) {}
36 return result;
37 }
NTuple::Selector::initialize
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition: Selector.cpp:20
NTuple::Selector::m_firstCall
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
NTuple::Selector::m_status
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:375
NTuple::Selector::operator()
bool operator()(void *nt) override
Default callback from interface.
Definition: Selector.cpp:23
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

## ◆ operator()() [2/2]

bool NTuple::Selector::operator() | ( | NTuple::Tuple * | nt | ) |
| virtual

Specialized callback for NTuples.

Specialized overload for N-tuples.

Definition at line 40 of file Selector.cpp.

40 { return true; }

## Member Data Documentation

## ◆ m_firstCall

bool NTuple::Selector::m_firstCall
| protected

Boolean to indicate need for initialization.

Definition at line 34 of file Selector.h.

## ◆ m_parent

IInterface* NTuple::Selector::m_parent
| protected

reference to parent interface

Definition at line 32 of file Selector.h.

## ◆ m_status

StatusCode NTuple::Selector::m_status
| protected

StatusCode indication initialization result.

Definition at line 36 of file Selector.h.

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

- GaudiKernel/GaudiKernel/Selector.h
- GaudiKernel/src/Lib/Selector.cpp