SelectStatement Class Reference

Class of a selection statement. More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/825/GAUDI/GAUDI_v26r3/InstallArea/x86_64-slc6-gcc48-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 extend_interfaces1< ISelectStatement >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from ISelectStatement
 DeclareInterfaceID (ISelectStatement, 2, 0)
 InterfaceID. More...
 
 DeclareInterfaceID (ISelectStatement, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 

Protected Attributes

std::string m_select
 Select string. More...
 
bool m_isActive
 Activation flag. More...
 
long m_type
 Type identifier. More...
 

Additional Inherited Members

- Public Types inherited from implements1< ISelectStatement >
typedef implements1 base_class
 Typedef to this class. More...
 
typedef implements1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1< ISelectStatementextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces1< ISelectStatementextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces1< ISelectStatement >
typedef ISelectStatement::iid::iids::type ext_iids
 MPL set of interfaces extended by this one. More...
 
typedef ISelectStatement::iid::iids::type ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from ISelectStatement
enum  SelectType {
  FUNCTION =1<<1, STRING =1<<2, FULL =1<<3, OTHER =1<<4,
  FUNCTION =1<<1, STRING =1<<2, FULL =1<<3, OTHER =1<<4
}
 Statement type definition. More...
 
enum  SelectType {
  FUNCTION =1<<1, STRING =1<<2, FULL =1<<3, OTHER =1<<4,
  FUNCTION =1<<1, STRING =1<<2, FULL =1<<3, OTHER =1<<4
}
 Statement type definition. More...
 
- Public Types inherited from IInterface
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. 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 46 of file SelectStatement.h.

Constructor & Destructor Documentation

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

Standard Constructor initializing select string.

Definition at line 49 of file SelectStatement.h.

50  : m_select(s), m_isActive(false), m_type(typ)
51  {
52  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:244
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 54 of file SelectStatement.h.

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

Standard Constructor initializing function call.

Definition at line 59 of file SelectStatement.h.

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

Standard Destructor.

Definition at line 64 of file SelectStatement.h.

64  {
65  }
SelectStatement::SelectStatement ( const std::string &  s,
long  typ 
)
inlineexplicit

Standard Constructor initializing select string.

Definition at line 49 of file SelectStatement.h.

50  : m_select(s), m_isActive(false), m_type(typ)
51  {
52  }
bool m_isActive
Activation flag.
string s
Definition: gaudirun.py:244
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 54 of file SelectStatement.h.

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

Standard Constructor initializing function call.

Definition at line 59 of file SelectStatement.h.

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

Standard Destructor.

Definition at line 64 of file SelectStatement.h.

64  {
65  }

Member Function Documentation

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

Access the selection string.

Implements ISelectStatement.

Definition at line 71 of file SelectStatement.h.

71  {
72  return m_select;
73  }
std::string m_select
Select string.
const std::string& SelectStatement::criteria ( ) const
inlinevirtual

Access the selection string.

Implements ISelectStatement.

Definition at line 71 of file SelectStatement.h.

71  {
72  return m_select;
73  }
std::string m_select
Select string.
bool SelectStatement::isActive ( ) const
inlinevirtual

Check if selection is active.

Implements ISelectStatement.

Definition at line 84 of file SelectStatement.h.

84  {
85  return m_isActive;
86  }
bool m_isActive
Activation flag.
bool SelectStatement::isActive ( ) const
inlinevirtual

Check if selection is active.

Implements ISelectStatement.

Definition at line 84 of file SelectStatement.h.

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

Stupid default implementation.

Implements ISelectStatement.

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

Definition at line 88 of file SelectStatement.h.

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

Stupid default implementation.

Implements ISelectStatement.

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

Definition at line 88 of file SelectStatement.h.

88  {
89  return true;
90  }
void SelectStatement::setActive ( bool  flag = true)
inlinevirtual

Change activity flag.

Implements ISelectStatement.

Definition at line 80 of file SelectStatement.h.

80  {
81  m_isActive = flag;
82  }
bool m_isActive
Activation flag.
void SelectStatement::setActive ( bool  flag = true)
inlinevirtual

Change activity flag.

Implements ISelectStatement.

Definition at line 80 of file SelectStatement.h.

80  {
81  m_isActive = flag;
82  }
bool m_isActive
Activation flag.
void SelectStatement::setCriteria ( const std::string &  crit)
inlinevirtual

Set the type.

Implements ISelectStatement.

Definition at line 75 of file SelectStatement.h.

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

Set the type.

Implements ISelectStatement.

Definition at line 75 of file SelectStatement.h.

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

Access the type of the object.

Implements ISelectStatement.

Definition at line 67 of file SelectStatement.h.

67  {
68  return m_type;
69  }
long m_type
Type identifier.
long SelectStatement::type ( ) const
inlinevirtual

Access the type of the object.

Implements ISelectStatement.

Definition at line 67 of file SelectStatement.h.

67  {
68  return m_type;
69  }
long m_type
Type identifier.

Member Data Documentation

bool SelectStatement::m_isActive
protected

Activation flag.

Definition at line 95 of file SelectStatement.h.

std::string SelectStatement::m_select
protected

Select string.

Definition at line 93 of file SelectStatement.h.

long SelectStatement::m_type
protected

Type identifier.

Definition at line 97 of file SelectStatement.h.


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