Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-30 22:24:07

0001 // -*- C++ -*-
0002 //
0003 // Package:     FWCore/Framework
0004 // Class  :     ESTagGetter
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu, 26 Sep 2019 18:34:49 GMT
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/Framework/interface/ESTagGetter.h"
0017 #include "FWCore/Framework/interface/ComponentDescription.h"
0018 
0019 using namespace edm;
0020 
0021 //
0022 // const member functions
0023 //
0024 ESResolverIndex ESTagGetter::operator()(std::string_view iModuleLabel, std::string_view iProductLabel) const {
0025   for (auto const& item : lookup_) {
0026     if (item.productLabel_ == iProductLabel) {
0027       if (iModuleLabel.empty() or iModuleLabel == item.moduleLabel_) {
0028         return item.index_;
0029       }
0030       return ESResolverIndex::moduleLabelDoesNotMatch();
0031     }
0032   }
0033   return ESResolverIndex::noResolverConfigured();
0034 }