test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerResultsBasedEventSelector.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_TriggerResultsBasedEventSelector_h
2 #define FWCore_Framework_TriggerResultsBasedEventSelector_h
3 
4 // -------------------------------------------------------------------
5 //
6 // TriggerResultsBasedEventSelector: This class is used by OutputModule to interact with
7 // the TriggerResults objects upon which the decision to write out an
8 // event is made.
9 //
10 // -------------------------------------------------------------------
11 #include <string>
12 #include <utility>
13 #include <vector>
14 #include <map>
15 
20 
21 namespace edm {
22  class ModuleCallingContext;
23 
24  namespace detail {
26 
28  public:
30  inputTag_("TriggerResults", "", n),
32  { }
33 
34  bool match(TriggerResults const& product) {
35  return eventSelector_.acceptEvent(product);
36  }
37 
38  InputTag const& inputTag() const {
39  return inputTag_;
40  }
41 
42  private:
45  };
46 
48  public:
51  typedef std::vector<NamedEventSelector> selectors_t;
52  typedef std::pair<std::string, std::string> parsed_path_spec_t;
53 
54  void setupDefault(std::vector<std::string> const& triggernames);
55 
56  void setup(std::vector<parsed_path_spec_t> const& path_specs,
57  std::vector<std::string> const& triggernames,
58  const std::string& process_name);
59 
60  bool wantEvent(EventPrincipal const& e, ModuleCallingContext const*);
61 
62  private:
64  };
65 
69  bool configureEventSelector(edm::ParameterSet const& iPSet,
70  std::string const& iProcessName,
71  std::vector<std::string> const& iAllTriggerNames,
77  std::string const& iLabel,
78  std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
79  bool anyProductProduced);
80 
81  }
82 }
83 
84 #endif
bool match(TriggerResults const &product)
void setupDefault(std::vector< std::string > const &triggernames)
bool acceptEvent(TriggerResults const &)
void setup(std::vector< parsed_path_spec_t > const &path_specs, std::vector< std::string > const &triggernames, const std::string &process_name)
NamedEventSelector(std::string const &n, EventSelector const &s)
std::pair< std::string, std::string > parsed_path_spec_t
bool wantEvent(EventPrincipal const &e, ModuleCallingContext const *)
edm::Handle< edm::TriggerResults > handle_t
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)