artdaq_mfextensions  v1_05_00
suppress.hh
1 #ifndef MFEXTENSIONS_SUPPRESS_H
2 #define MFEXTENSIONS_SUPPRESS_H
3 
4 #include <boost/regex.hpp>
5 #include <string>
6 
7 typedef boost::regex regex_t;
8 typedef boost::smatch smatch_t;
9 
13 class suppress
14 {
15 public:
20  explicit suppress(std::string const& name);
21 
27  bool match(std::string const& name);
28 
33  void use(bool flag) { in_use_ = flag; }
34 
35 private:
36  std::string name_;
37  regex_t expr_;
38  smatch_t what_;
39  bool in_use_;
40 };
41 
42 #endif
suppress(std::string const &name)
Construct a suppression using the given name for regex matching
Definition: suppress.cc:3
Suppress messages based on a regular expression
Definition: suppress.hh:13
void use(bool flag)
Set whether the suppression is active
Definition: suppress.hh:33
bool match(std::string const &name)
Check if the name matches this suppression
Definition: suppress.cc:6