| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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...
| ~implements () override=default
| Virtual destructor. 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...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. 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

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

Standard constructor.

Definition at line 39 of file Selector.h.

39 : m_parent(svc), m_firstCall(true)
40 {
41 }
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

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

Standard Destructor.

## Member Function Documentation

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

Check for first call.

Definition at line 45 of file Selector.h.

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

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

Selector Initialization.

Selector Initialisation.

Definition at line 20 of file Selector.cpp.

20 {
21 return StatusCode::SUCCESS;
22 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Access initialization status.

Definition at line 49 of file Selector.h.

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

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

Default callback from interface.

Overloaded callback from SelectStatement.

Reimplemented from SelectStatement.

Definition at line 25 of file Selector.cpp.

25 {
26 DataObject* p = static_cast<DataObject*>(nt);
27 bool result = false;
28 try {
29 NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>(p);
30 if ( tuple ) {
31 if ( m_firstCall ) {
32 m_status = initialize(tuple);
33 m_firstCall = false;
34 }
35 if ( m_status.isSuccess() ) {
36 result = this->operator()(tuple);
37 }
38 }
39 }
40 catch(...) {
41 }
42 return result;
43 }
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
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
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
NTuple::Selector::operator()
bool operator()(void *nt) override
Default callback from interface.
Definition: Selector.cpp:25
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

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

Specialized callback for NTuples.

Specialized overload for N-tuples.

Definition at line 46 of file Selector.cpp.

46 {
47 return true;
48 }

## Member Data Documentation

bool NTuple::Selector::m_firstCall
| protected

Boolean to indicate need for initialization.

Definition at line 34 of file Selector.h.

IInterface* NTuple::Selector::m_parent
| protected

reference to parent interface

Definition at line 32 of file Selector.h.

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