NTuple::Selector Class Reference

NTuple Selector class. More...

#include </tmp/marcocle/lhcb-release/1122/GAUDI/GAUDI_v27r0/InstallArea/x86_64-slc6-gcc49-opt/include/GaudiKernel/Selector.h>

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

Public Member Functions

 Selector (IInterface *svc)
 Standard constructor. More...
 
virtual ~Selector ()
 Standard Destructor. More...
 
bool firstCall () const
 Check for first call. More...
 
StatusCode initResult () const
 Access initialization status. More...
 
virtual bool operator() (void *nt)
 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...
 
 Selector (IInterface *svc)
 Standard constructor. More...
 
virtual ~Selector ()
 Standard Destructor. More...
 
bool firstCall () const
 Check for first call. More...
 
StatusCode initResult () const
 Access initialization status. More...
 
virtual bool operator() (void *nt)
 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
 Access the type of the object. More...
 
const std::string & criteria () const
 Access the selection string. More...
 
void setCriteria (const std::string &crit)
 Set the type. More...
 
void setActive (bool flag=true)
 Change activity flag. More...
 
bool isActive () const
 Check if selection is active. More...
 
 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
 Access the type of the object. More...
 
const std::string & criteria () const
 Access the selection string. More...
 
void setCriteria (const std::string &crit)
 Set the type. More...
 
void setActive (bool flag=true)
 Change activity flag. More...
 
bool isActive () const
 Check if selection is active. More...
 
- Public Member Functions inherited from implements< Interfaces >
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...
 
implementsoperator= (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...
 
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...
 
implementsoperator= (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...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Attributes

IInterfacem_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< Interfaces >
std::atomic_ulong m_refCount = {0}
 Reference counter. More...
 

Additional Inherited Members

- Public Types inherited from implements< Interfaces >
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
 
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...
 
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  }
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
IInterface * m_parent
reference to parent interface
Definition: Selector.h:32
virtual NTuple::Selector::~Selector ( )
inlinevirtual

Standard Destructor.

Definition at line 43 of file Selector.h.

43  {
44  }
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  }
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
IInterface * m_parent
reference to parent interface
Definition: Selector.h:32
virtual NTuple::Selector::~Selector ( )
inlinevirtual

Standard Destructor.

Definition at line 43 of file Selector.h.

43  {
44  }

Member Function Documentation

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

Check for first call.

Definition at line 46 of file Selector.h.

46  {
47  return m_firstCall;
48  }
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
bool NTuple::Selector::firstCall ( ) const
inline

Check for first call.

Definition at line 46 of file Selector.h.

46  {
47  return m_firstCall;
48  }
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 }
virtual StatusCode NTuple::Selector::initialize ( NTuple::Tuple nt)
virtual

Selector Initialization.

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

Access initialization status.

Definition at line 50 of file Selector.h.

50  {
51  return m_status;
52  }
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
StatusCode NTuple::Selector::initResult ( ) const
inline

Access initialization status.

Definition at line 50 of file Selector.h.

50  {
51  return m_status;
52  }
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
virtual bool NTuple::Selector::operator() ( void *  nt)
virtual

Default callback from interface.

Reimplemented from SelectStatement.

bool NTuple::Selector::operator() ( void *  nt)
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 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition: Selector.cpp:20
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
virtual bool operator()(void *nt)
Default callback from interface.
Definition: Selector.cpp:25
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
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 }
virtual bool NTuple::Selector::operator() ( NTuple::Tuple nt)
virtual

Specialized callback for NTuples.

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: