| The Gaudi Framework v30r0 (c919700c)

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

- File List
- File Members

SelectStatement.h
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // Package : Kernel
4 //
5 // Author : M.Frank 10/10/00
6 //
7 //==============================================================================
8 #ifndef KERNEL_SELECTSTATEMENT_H
9 #define KERNEL_SELECTSTATEMENT_H
10
11 // STL include files
12 #include <string>
13
14 // Framework include files
15 #include "GaudiKernel/ISelectStatement.h"
16
44 class GAUDI_API SelectStatement : public implements<ISelectStatement>
45 {
46 public:
48 explicit SelectStatement( const std::string& s, long typ ) : m_select( s ), m_isActive( false ), m_type( typ ) {}
50 explicit SelectStatement( const std::string& s ) : m_select( s ), m_isActive( false ), m_type( STRING ) {}
52 explicit SelectStatement() : m_isActive( false ), m_type( FUNCTION ) {}
54 virtual ~SelectStatement() {}
56 long type() const override { return m_type; }
58 const std::string& criteria() const override { return m_select; }
60 void setCriteria( const std::string& crit ) override
61 {
62 m_select = crit;
63 ( m_select.length() > 0 ) ? m_type |= STRING : m_type &= ~STRING;
64 }
66 void setActive( bool flag = true ) override { m_isActive = flag; }
68 bool isActive() const override { return m_isActive; }
70 virtual bool operator()( void* /* val */ ) override { return true; }
71
72 protected:
74 std::string m_select;
76 bool m_isActive;
78 long m_type;
79 };
80 #endif // KERNEL_SELECTSTATEMENT_H
SelectStatement::SelectStatement
SelectStatement()
Standard Constructor initializing function call.
Definition: SelectStatement.h:52
implements
Base class used to implement the interfaces.
Definition: implements.h:9
SelectStatement::~SelectStatement
virtual ~SelectStatement()
Standard Destructor.
Definition: SelectStatement.h:54
SelectStatement::SelectStatement
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
Definition: SelectStatement.h:48
ISelectStatement.h
SelectStatement::isActive
bool isActive() const override
Check if selection is active.
Definition: SelectStatement.h:68
SelectStatement::setActive
void setActive(bool flag=true) override
Change activity flag.
Definition: SelectStatement.h:66
std::string
STL class.
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76
SelectStatement::type
long type() const override
Access the type of the object.
Definition: SelectStatement.h:56
SelectStatement::operator()
virtual bool operator()(void *) override
Stupid default implementation.
Definition: SelectStatement.h:70
SelectStatement::setCriteria
void setCriteria(const std::string &crit) override
Set the type.
Definition: SelectStatement.h:60
gaudirun.s
string s
Definition: gaudirun.py:253
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78
SelectStatement
Class of a selection statement.
Definition: SelectStatement.h:44
SelectStatement::criteria
const std::string & criteria() const override
Access the selection string.
Definition: SelectStatement.h:58
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:74
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
SelectStatement::SelectStatement
SelectStatement(const std::string &s)
Standard Constructor initializing select string.
Definition: SelectStatement.h:50