Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
16 
44 class GAUDI_API SelectStatement: public implements<ISelectStatement> {
45 public:
47  explicit SelectStatement(const std::string& s, long typ)
48  : m_select(s), m_isActive(false), m_type(typ)
49  {
50  }
52  explicit SelectStatement(const std::string& s)
53  : m_select(s),m_isActive(false), m_type(STRING)
54  {
55  }
57  explicit SelectStatement()
58  : m_isActive(false), m_type(FUNCTION)
59  {
60  }
62  virtual ~SelectStatement() {
63  }
65  long type() const override {
66  return m_type;
67  }
69  const std::string& criteria() const override {
70  return m_select;
71  }
73  void setCriteria(const std::string& crit) override {
74  m_select = crit;
75  (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
76  }
78  void setActive(bool flag = true) override {
79  m_isActive = flag;
80  }
82  bool isActive() const override {
83  return m_isActive;
84  }
86  virtual bool operator()(void* /* val */ ) override {
87  return true;
88  }
89 protected:
93  bool m_isActive;
95  long m_type;
96 };
97 #endif // KERNEL_SELECTSTATEMENT_H
SelectStatement()
Standard Constructor initializing function call.
Base class used to implement the interfaces.
Definition: implements.h:9
virtual ~SelectStatement()
Standard Destructor.
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
bool isActive() const override
Check if selection is active.
void setActive(bool flag=true) override
Change activity flag.
STL class.
bool m_isActive
Activation flag.
long type() const override
Access the type of the object.
virtual bool operator()(void *) override
Stupid default implementation.
void setCriteria(const std::string &crit) override
Set the type.
string s
Definition: gaudirun.py:245
long m_type
Type identifier.
Class of a selection statement.
const std::string & criteria() const override
Access the selection string.
std::string m_select
Select string.
#define GAUDI_API
Definition: Kernel.h:107
SelectStatement(const std::string &s)
Standard Constructor initializing select string.