LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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  public:
14  explicit EventIDMatcher(std::string const& pattern);
15  explicit EventIDMatcher(std::vector<std::string> const& patterns);
16 
17  bool operator()(EventID const&) const;
18  bool match(EventID const&) const;
19 
20  private:
21  void parse_pattern();
22 
24  unsigned low;
25  unsigned high;
26  bool wildcard;
27  };
28 
29  std::vector<std::string> pattern_;
30  std::vector<std::vector<std::vector<PatternRangeElement>>> parsed_patterns_;
31  };
32 
33 } // namespace art
34 
35 #endif /* canvas_Utilities_EventIDMatcher_h */
36 
37 // Local Variables:
38 // mode: c++
39 // End:
bool match(EventID const &) const
std::vector< std::string > pattern_
bool operator()(EventID const &) const
Definition: MVAAlg.h:12
EventIDMatcher(std::string const &pattern)
std::vector< std::vector< std::vector< PatternRangeElement > > > parsed_patterns_