CMS 3D CMS Logo

InputTagMatch.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_InputTagMatch_h
2 #define FWCore_Framework_InputTagMatch_h
3 
15 
16 #include <string>
17 
18 namespace edm {
19 
20  class InputTagMatch {
21  public:
23 
24  bool operator()(edm::BranchDescription const& branchDescription) {
25  bool result(true);
26  bool match(false);
27  if (!inputTag_.label().empty()) {
28  match = true;
29  result = (result && branchDescription.moduleLabel() == inputTag_.label());
30  }
31  if (!inputTag_.instance().empty()) {
32  match = true;
33  result = (result && branchDescription.productInstanceName() == inputTag_.instance());
34  }
35  if (!inputTag_.process().empty()) {
36  match = true;
37  result = (result && branchDescription.processName() == inputTag_.process());
38  }
39  if (match)
40  return result;
41  return false;
42  }
43 
44  private:
46  };
47 } // namespace edm
48 #endif
edm::InputTag inputTag_
Definition: InputTagMatch.h:45
InputTagMatch(edm::InputTag const &inputTag)
Definition: InputTagMatch.h:22
std::string const & processName() const
std::string const & moduleLabel() const
bool operator()(edm::BranchDescription const &branchDescription)
Definition: InputTagMatch.h:24
std::string const & productInstanceName() const
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
HLT enums.
std::string const & instance() const
Definition: InputTag.h:37
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)