Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:03

0001 #include "RecoEgamma/EgammaTools/plugins/EGRegressionModifierHelpers.h"
0002 
0003 EGRegressionModifierCondTokens::EGRegressionModifierCondTokens(edm::ParameterSet const& config,
0004                                                                std::string const& regressionKey,
0005                                                                std::string const& uncertaintyKey,
0006                                                                edm::ConsumesCollector& cc) {
0007   for (auto const& name : config.getParameter<std::vector<std::string>>(regressionKey)) {
0008     mean.push_back(cc.esConsumes<GBRForestD, GBRDWrapperRcd>(edm::ESInputTag("", name)));
0009   }
0010   for (auto const& name : config.getParameter<std::vector<std::string>>(uncertaintyKey)) {
0011     sigma.push_back(cc.esConsumes<GBRForestD, GBRDWrapperRcd>(edm::ESInputTag("", name)));
0012   }
0013 }
0014 
0015 std::vector<const GBRForestD*> retrieveGBRForests(
0016     edm::EventSetup const& evs, std::vector<edm::ESGetToken<GBRForestD, GBRDWrapperRcd>> const& tokens) {
0017   std::vector<const GBRForestD*> items;
0018 
0019   items.reserve(tokens.size());
0020   for (auto const& token : tokens) {
0021     items.push_back(&evs.getData(token));
0022   }
0023 
0024   return items;
0025 }