Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
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 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
14 #include <string>
15 
43 class GAUDI_API SelectStatement : public implements<ISelectStatement> {
44 public:
46  explicit SelectStatement( const std::string& s, long typ ) : m_select( s ), m_isActive( false ), m_type( typ ) {}
48  explicit SelectStatement( const std::string& s ) : m_select( s ), m_isActive( false ), m_type( STRING ) {}
50  explicit SelectStatement() : m_isActive( false ), m_type( FUNCTION ) {}
52  virtual ~SelectStatement() {}
54  long type() const override { return m_type; }
56  const std::string& criteria() const override { return m_select; }
58  void setCriteria( const std::string& crit ) override {
59  m_select = crit;
60  ( m_select.length() > 0 ) ? m_type |= STRING : m_type &= ~STRING;
61  }
63  void setActive( bool flag = true ) override { m_isActive = flag; }
65  bool isActive() const override { return m_isActive; }
67  virtual bool operator()( void* /* val */ ) override { return true; }
68 
69 protected:
71  std::string m_select;
73  bool m_isActive;
75  long m_type;
76 };
SelectStatement::~SelectStatement
virtual ~SelectStatement()
Standard Destructor.
Definition: SelectStatement.h:52
SelectStatement::SelectStatement
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
Definition: SelectStatement.h:46
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:71
SelectStatement::SelectStatement
SelectStatement(const std::string &s)
Standard Constructor initializing select string.
Definition: SelectStatement.h:48
SelectStatement::isActive
bool isActive() const override
Check if selection is active.
Definition: SelectStatement.h:65
gaudirun.s
string s
Definition: gaudirun.py:346
SelectStatement
Class of a selection statement.
Definition: SelectStatement.h:43
SelectStatement::setActive
void setActive(bool flag=true) override
Change activity flag.
Definition: SelectStatement.h:63
SelectStatement::type
long type() const override
Access the type of the object.
Definition: SelectStatement.h:54
SelectStatement::operator()
virtual bool operator()(void *) override
Stupid default implementation.
Definition: SelectStatement.h:67
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:73
SelectStatement::setCriteria
void setCriteria(const std::string &crit) override
Set the type.
Definition: SelectStatement.h:58
ISelectStatement.h
SelectStatement::criteria
const std::string & criteria() const override
Access the selection string.
Definition: SelectStatement.h:56
implements
Base class used to implement the interfaces.
Definition: implements.h:19
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:75
SelectStatement::SelectStatement
SelectStatement()
Standard Constructor initializing function call.
Definition: SelectStatement.h:50
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49