CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WillGetIfMatch.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_WillGetIfMatch_h
2 #define FWCore_Framework_WillGetIfMatch_h
3 
13 #include <functional>
14 
15 namespace edm {
16 
17  class BranchDescription;
18 
19  template<typename T, typename M>
21  public:
22 
23  template <typename U>
24  WillGetIfMatch(U const& match, M* module):
25  match_(match),
26  module_(module) {
27  }
28 
29  bool operator()(BranchDescription const& branchDescription) {
30  if (match_(branchDescription)){
31 
32  // We plan to implement a call to a function that
33  // registers the products a module will get, but
34  // this has not been implemented yet. This is
35  // where that function would get called when it
36  // is implemented, automatically registering
37  // the gets for the module. (Creating a place to call
38  // this function is the main reason for the existence
39  // of this class).
40  // module_->template willGet<T>(edm::makeInputTag(branchDescription));
41 
42  return true;
43  }
44  return false;
45  }
46 
47  private:
48  std::function<bool(BranchDescription const&)> match_;
49  M* module_;
50  };
51 }
52 #endif
std::function< bool(BranchDescription const &)> match_
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName, BranchDescription::MatchMode m)
bool operator()(BranchDescription const &branchDescription)
WillGetIfMatch(U const &match, M *module)
Definition: vlib.h:209