Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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