LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EventSelector.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_EventSelector_h
2 #define art_Framework_Core_EventSelector_h
3 // vim: set sw=2 expandtab :
4 
8 
9 #include <memory>
10 #include <string>
11 #include <vector>
12 
13 namespace art {
14  class EventSelector {
15  public:
16  explicit EventSelector(std::vector<std::string> const& pathspecs);
20 
21  bool acceptEvent(ScheduleID id, TriggerResults const& tr) const;
22 
23  struct BitInfo {
24  unsigned int pos{};
25  bool accept_state{false};
26  };
27 
28  private:
29  std::vector<std::string> const path_specs_;
30  bool const accept_all_;
31  struct ScheduleData {
33  std::vector<BitInfo> absolute_acceptors;
34  std::vector<BitInfo> conditional_acceptors;
35  std::vector<BitInfo> exception_acceptors;
36  std::vector<std::vector<BitInfo>> all_must_fail;
37  std::vector<std::vector<BitInfo>> all_must_fail_noex;
38  };
40 
41  ScheduleData data_for(TriggerResults const& tr) const;
42  bool selectionDecision(ScheduleData const& data,
43  HLTGlobalStatus const&) const;
44  };
45 
46 } // namespace art
47 
48 #endif /* art_Framework_Core_EventSelector_h */
49 
50 // Local Variables:
51 // mode: c++
52 // End:
std::vector< std::string > const path_specs_
Definition: EventSelector.h:29
PerScheduleContainer< ScheduleData > acceptors_
Definition: EventSelector.h:39
std::vector< BitInfo > conditional_acceptors
Definition: EventSelector.h:34
std::vector< std::vector< BitInfo > > all_must_fail_noex
Definition: EventSelector.h:37
bool acceptEvent(ScheduleID id, TriggerResults const &tr) const
std::vector< BitInfo > absolute_acceptors
Definition: EventSelector.h:33
bool const accept_all_
Definition: EventSelector.h:30
std::vector< std::vector< BitInfo > > all_must_fail
Definition: EventSelector.h:36
ScheduleData data_for(TriggerResults const &tr) const
bool selectionDecision(ScheduleData const &data, HLTGlobalStatus const &) const
Definition: MVAAlg.h:12
std::vector< BitInfo > exception_acceptors
Definition: EventSelector.h:35
EventSelector(std::vector< std::string > const &pathspecs)