The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
NTuple::Selector Class Reference

NTuple Selector class. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/Selector.h>

Inheritance diagram for NTuple::Selector:
Collaboration diagram for NTuple::Selector:

Public Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Public Types inherited from implements< ISelectStatement >
using base_class
 Typedef to this class.
 
using extend_interfaces_base
 Typedef to the base of this class.
 
using iids
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids
 take union of the ext_iids of all Interfaces...
 
- Protected Member Functions inherited from implements< ISelectStatement >
unsigned long decRef () const override
 

Detailed Description

NTuple Selector class.

Definition at line 22 of file Selector.h.

Constructor & Destructor Documentation

◆ Selector()

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

Standard constructor.

Definition at line 33 of file Selector.h.

33: m_parent( svc ), m_firstCall( true ) {}
bool m_firstCall
Boolean to indicate need for initialization.
Definition Selector.h:27
IInterface * m_parent
reference to parent interface
Definition Selector.h:25

◆ ~Selector()

virtual NTuple::Selector::~Selector ( )
virtualdefault

Standard Destructor.

Member Function Documentation

◆ firstCall()

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

Check for first call.

Definition at line 37 of file Selector.h.

37{ return m_firstCall; }

◆ initialize()

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

Selector Initialization.

Selector Initialisation.

Reimplemented in Gaudi::TestSuite::EvtCollectionSelector.

Definition at line 15 of file Selector.cpp.

15{ return StatusCode::SUCCESS; }
constexpr static const auto SUCCESS
Definition StatusCode.h:99

◆ initResult()

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

Access initialization status.

Definition at line 39 of file Selector.h.

39{ return m_status; }
StatusCode m_status
StatusCode indication initialization result.
Definition Selector.h:29

◆ operator()() [1/2]

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

Specialized callback for NTuples.

Specialized overload for N-tuples.

Reimplemented in Gaudi::TestSuite::EvtCollectionSelector.

Definition at line 35 of file Selector.cpp.

35{ return true; }

◆ operator()() [2/2]

bool NTuple::Selector::operator() ( void * nt)
overridevirtual

Default callback from interface.

Overloaded callback from SelectStatement.

Reimplemented from SelectStatement.

Definition at line 18 of file Selector.cpp.

18 {
19 DataObject* p = static_cast<DataObject*>( nt );
20 bool result = false;
21 try {
22 NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>( p );
23 if ( tuple ) {
24 if ( m_firstCall ) {
25 m_status = initialize( tuple );
26 m_firstCall = false;
27 }
28 if ( m_status.isSuccess() ) { result = this->operator()( tuple ); }
29 }
30 } catch ( ... ) {}
31 return result;
32}
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition Selector.cpp:15
bool operator()(void *nt) override
Default callback from interface.
Definition Selector.cpp:18

Member Data Documentation

◆ m_firstCall

bool NTuple::Selector::m_firstCall
protected

Boolean to indicate need for initialization.

Definition at line 27 of file Selector.h.

◆ m_parent

IInterface* NTuple::Selector::m_parent
protected

reference to parent interface

Definition at line 25 of file Selector.h.

◆ m_status

StatusCode NTuple::Selector::m_status
protected

StatusCode indication initialization result.

Definition at line 29 of file Selector.h.


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