LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
EventIDMatcher.h
Go to the documentation of this file.
1 #ifndef canvas_Utilities_EventIDMatcher_h
2 #define canvas_Utilities_EventIDMatcher_h
3 // vim: set sw=2 :
4 
6 
7 #include <string>
8 #include <vector>
9 
10 namespace art {
11 
13 
14  private: // TYPES
16 
17  public:
18  PatternRangeElement(unsigned low, unsigned high, bool wildcard)
19  : low_(low), high_(high), wildcard_(wildcard)
20  {}
21 
22  public:
23  unsigned low_;
24  unsigned high_;
25  bool wildcard_;
26  };
27 
28  public: // MEMBER FUNCTIONS
29  explicit EventIDMatcher(std::string const& pattern);
30 
31  explicit EventIDMatcher(std::vector<std::string> const& patterns);
32 
33  bool operator()(EventID const&) const;
34 
35  bool match(EventID const&) const;
36 
37  private: // MEMBER FUNCTIONS
38  void parse_pattern();
39 
40  private: // MEMBER DATA
41  std::vector<std::string> pattern_;
42  std::vector<std::vector<std::vector<PatternRangeElement>>> parsed_patterns_;
43  };
44 
45 } // namespace art
46 
47 #endif /* canvas_Utilities_EventIDMatcher_h */
48 
49 // Local Variables:
50 // mode: c++
51 // End:
bool match(EventID const &) const
std::vector< std::string > pattern_
bool operator()(EventID const &) const
PatternRangeElement(unsigned low, unsigned high, bool wildcard)
HLT enums.
EventIDMatcher(std::string const &pattern)
std::vector< std::vector< std::vector< PatternRangeElement > > > parsed_patterns_