SelectStatement Class Reference

Class of a selection statement. More...

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

Inheritance diagram for SelectStatement:
Collaboration diagram for SelectStatement:

Public Member Functions

 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...
 
virtual bool operator() (void *)
 Stupid default implementation. 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...
 
virtual bool operator() (void *)
 Stupid default implementation. 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

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

Class of a selection statement.

A select statement can either contain

  • a string e.g. for refining an SQL statement
  • a function object, which will be called back in order to refine a selection. This happens in calling sequences like the following:

bool MySelect::operator()(IValueLocator* l) { float px, py, pz; if ( l->get("PX",px) && l->get("PY",py) && l->get("PZ",pz) ) { float mom = sqrt(px*px+py*py+pz*pz); return mom > 100.0 * GeV; } return false; }

if "true" is returned, the object will be loaded completely.

History: +------—+-------------------------------------------—+-----—+ | Date | Comment | Who | +------—+-------------------------------------------—+-----—+ | 21/10/99| Initial version. | MF | +------—+-------------------------------------------—+-----—+ Author: M.Frank Version: 1.0

Definition at line 44 of file SelectStatement.h.

Constructor & Destructor Documentation

SelectStatement::SelectStatement ( const std::string &  s,
long  typ 
)
inlineexplicit

Standard Constructor initializing select string.

Definition at line 47 of file SelectStatement.h.

48  : m_select(s), m_isActive(false), m_type(typ)
49  {
50  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:245
long m_type
Type identifier.
std::string m_select
Select string.
SelectStatement::SelectStatement ( const std::string &  s)
inlineexplicit

Standard Constructor initializing select string.

Definition at line 52 of file SelectStatement.h.

53  : m_select(s),m_isActive(false), m_type(STRING)
54  {
55  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:245
long m_type
Type identifier.
std::string m_select
Select string.
SelectStatement::SelectStatement ( )
inlineexplicit

Standard Constructor initializing function call.

Definition at line 57 of file SelectStatement.h.

58  : m_isActive(false), m_type(FUNCTION)
59  {
60  }
bool m_isActive
Activation flag.
long m_type
Type identifier.
virtual SelectStatement::~SelectStatement ( )
inlinevirtual

Standard Destructor.

Definition at line 62 of file SelectStatement.h.

62  {
63  }
SelectStatement::SelectStatement ( const std::string &  s,
long  typ 
)
inlineexplicit

Standard Constructor initializing select string.

Definition at line 47 of file SelectStatement.h.

48  : m_select(s), m_isActive(false), m_type(typ)
49  {
50  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:245
long m_type
Type identifier.
std::string m_select
Select string.
SelectStatement::SelectStatement ( const std::string &  s)
inlineexplicit

Standard Constructor initializing select string.

Definition at line 52 of file SelectStatement.h.

53  : m_select(s),m_isActive(false), m_type(STRING)
54  {
55  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:245
long m_type
Type identifier.
std::string m_select
Select string.
SelectStatement::SelectStatement ( )
inlineexplicit

Standard Constructor initializing function call.

Definition at line 57 of file SelectStatement.h.

58  : m_isActive(false), m_type(FUNCTION)
59  {
60  }
bool m_isActive
Activation flag.
long m_type
Type identifier.
virtual SelectStatement::~SelectStatement ( )
inlinevirtual

Standard Destructor.

Definition at line 62 of file SelectStatement.h.

62  {
63  }

Member Function Documentation

const std::string& SelectStatement::criteria ( ) const
inline

Access the selection string.

Definition at line 69 of file SelectStatement.h.

69  {
70  return m_select;
71  }
std::string m_select
Select string.
const std::string& SelectStatement::criteria ( ) const
inline

Access the selection string.

Definition at line 69 of file SelectStatement.h.

69  {
70  return m_select;
71  }
std::string m_select
Select string.
bool SelectStatement::isActive ( ) const
inline

Check if selection is active.

Definition at line 82 of file SelectStatement.h.

82  {
83  return m_isActive;
84  }
bool m_isActive
Activation flag.
bool SelectStatement::isActive ( ) const
inline

Check if selection is active.

Definition at line 82 of file SelectStatement.h.

82  {
83  return m_isActive;
84  }
bool m_isActive
Activation flag.
virtual bool SelectStatement::operator() ( void *  )
inlinevirtual

Stupid default implementation.

Reimplemented in NTuple::Selector, and NTuple::Selector.

Definition at line 86 of file SelectStatement.h.

86  {
87  return true;
88  }
virtual bool SelectStatement::operator() ( void *  )
inlinevirtual

Stupid default implementation.

Reimplemented in NTuple::Selector, and NTuple::Selector.

Definition at line 86 of file SelectStatement.h.

86  {
87  return true;
88  }
void SelectStatement::setActive ( bool  flag = true)
inline

Change activity flag.

Definition at line 78 of file SelectStatement.h.

78  {
79  m_isActive = flag;
80  }
bool m_isActive
Activation flag.
void SelectStatement::setActive ( bool  flag = true)
inline

Change activity flag.

Definition at line 78 of file SelectStatement.h.

78  {
79  m_isActive = flag;
80  }
bool m_isActive
Activation flag.
void SelectStatement::setCriteria ( const std::string &  crit)
inline

Set the type.

Definition at line 73 of file SelectStatement.h.

73  {
74  m_select = crit;
75  (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
76  }
long m_type
Type identifier.
std::string m_select
Select string.
void SelectStatement::setCriteria ( const std::string &  crit)
inline

Set the type.

Definition at line 73 of file SelectStatement.h.

73  {
74  m_select = crit;
75  (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
76  }
long m_type
Type identifier.
std::string m_select
Select string.
long SelectStatement::type ( ) const
inline

Access the type of the object.

Definition at line 65 of file SelectStatement.h.

65  {
66  return m_type;
67  }
long m_type
Type identifier.
long SelectStatement::type ( ) const
inline

Access the type of the object.

Definition at line 65 of file SelectStatement.h.

65  {
66  return m_type;
67  }
long m_type
Type identifier.

Member Data Documentation

bool SelectStatement::m_isActive
protected

Activation flag.

Definition at line 93 of file SelectStatement.h.

std::string SelectStatement::m_select
protected

Select string.

Definition at line 91 of file SelectStatement.h.

long SelectStatement::m_type
protected

Type identifier.

Definition at line 95 of file SelectStatement.h.


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