Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:47

0001 #ifndef FWCore_Framework_ModuleLabelMatch_h
0002 #define FWCore_Framework_ModuleLabelMatch_h
0003 
0004 /** \class edm::ModuleLabelMatch
0005 
0006 This is intended to be used with the class GetterOfProducts.
0007 See comments in the file GetterOfProducts.h for a description.
0008 
0009 \author W. David Dagenhart, created 6 August, 2012
0010 
0011 */
0012 
0013 #include "DataFormats/Provenance/interface/BranchDescription.h"
0014 
0015 #include <string>
0016 
0017 namespace edm {
0018 
0019   class ModuleLabelMatch {
0020   public:
0021     ModuleLabelMatch(std::string const& moduleLabel) : moduleLabel_(moduleLabel) {}
0022 
0023     bool operator()(edm::BranchDescription const& branchDescription) {
0024       return branchDescription.moduleLabel() == moduleLabel_;
0025     }
0026 
0027   private:
0028     std::string moduleLabel_;
0029   };
0030 }  // namespace edm
0031 #endif