CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CachedProducts.h
Go to the documentation of this file.
1 #ifndef Framework_CachedProducts_h
2 #define Framework_CachedProducts_h
3 
4 // -------------------------------------------------------------------
5 //
6 // CachedProducts: 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 
19 
20 namespace edm
21 {
22  namespace detail
23  {
25 
27  {
28  public:
29  NamedEventSelector(std::string const& n, EventSelector const& s) :
30  nameSelector_(n),
31  eventSelector_(s),
32  product_()
33  { }
34 
35  void fill(Event const& e)
36  {
38  }
39 
40  bool match()
41  {
43  }
44 
45  handle_t product() const
46  {
47  return product_;
48  }
49 
50  void clear()
51  {
52  product_ = handle_t();
53  }
54 
55  private:
59  };
60 
61 
63  {
64  public:
67  typedef std::vector<NamedEventSelector> selectors_t;
69  typedef std::pair<std::string, std::string> parsed_path_spec_t;
70 
71  void setupDefault(std::vector<std::string> const& triggernames);
72 
73  void setup(std::vector<parsed_path_spec_t> const& path_specs,
74  std::vector<std::string> const& triggernames,
75  const std::string& process_name);
76 
77  bool wantEvent(Event const& e);
78 
79  // Get all TriggerResults objects for the process names we're
80  // interested in.
81  size_type fill(Event const& ev);
82 
84 
85  // Clear the cache
86  void clear();
87 
88  private:
89  typedef selectors_t::iterator iter;
90 
91  // Return the number of cached TriggerResult handles
92  //size_type size() const { return numberFound_; }
93 
94  // If we have only one handle cached, return it; otherwise throw.
96 
97 
98  bool fillDone_;
101  };
102  }
103 }
104 
105 #endif
std::vector< NamedEventSelector > selectors_t
handle_t getOneTriggerResults(Event const &e)
uint16_t size_type
std::pair< std::string, std::string > parsed_path_spec_t
bool acceptEvent(TriggerResults const &)
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:267
NamedEventSelector(std::string const &n, EventSelector const &s)
selectors_t::size_type size_type
size_type fill(Event const &ev)
void setup(std::vector< parsed_path_spec_t > const &path_specs, std::vector< std::string > const &triggernames, const std::string &process_name)
selectors_t::iterator iter
edm::Handle< edm::TriggerResults > handle_t
void setupDefault(std::vector< std::string > const &triggernames)
ProcessNameSelector nameSelector_
bool wantEvent(Event const &e)