Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-12 04:16:28

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/ESRecordsToProductResolverIndices.h"
0018 #include "FWCore/Framework/interface/ComponentDescription.h"
0019 
0020 using namespace edm;
0021 
0022 //
0023 // const member functions
0024 //
0025 ESResolverIndex ESTagGetter::operator()(std::string_view iModuleLabel, std::string_view iProductLabel) const {
0026   for (auto const& item : lookup_) {
0027     if (item.productLabel_ == iProductLabel) {
0028       if (iModuleLabel.empty() or iModuleLabel == item.moduleLabel_) {
0029         return item.index_;
0030       }
0031       return ESResolverIndex::moduleLabelDoesNotMatch();
0032     }
0033   }
0034   return ESResolverIndex::noResolverConfigured();
0035 }