Skip to content

Commit

Permalink
Merge pull request #25827 from makortel/pluginFactoryHLTrigger
Browse files Browse the repository at this point in the history
Manage PluginFactory plugin with unique_ptr in HLTMuonIsoFilter
  • Loading branch information
cmsbuild committed Feb 4, 2019
2 parents d287d10 + f716b93 commit 11785f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions HLTrigger/Muon/plugins/HLTMuonIsoFilter.cc
Expand Up @@ -37,7 +37,6 @@ HLTMuonIsoFilter::HLTMuonIsoFilter(const edm::ParameterSet& iConfig) : HLTFilter
previousCandToken_ (consumes<trigger::TriggerFilterObjectWithRefs>(previousCandTag_)),
depTag_ (iConfig.getParameter< std::vector< edm::InputTag > >("DepTag" ) ),
depToken_(),
theDepositIsolator(nullptr),
min_N_ (iConfig.getParameter<int> ("MinN"))
{
depToken_.reserve(depTag_.size());
Expand All @@ -59,7 +58,7 @@ HLTMuonIsoFilter::HLTMuonIsoFilter(const edm::ParameterSet& iConfig) : HLTFilter
edm::ParameterSet isolatorPSet = iConfig.getParameter<edm::ParameterSet>("IsolatorPSet");
if (not isolatorPSet.empty()) {
std::string type = isolatorPSet.getParameter<std::string>("ComponentName");
theDepositIsolator = MuonIsolatorFactory::get()->create(type, isolatorPSet, consumesCollector());
theDepositIsolator = std::unique_ptr<muonisolation::MuIsoBaseIsolator>(MuonIsolatorFactory::get()->create(type, isolatorPSet, consumesCollector()));
}

if (theDepositIsolator) produces<edm::ValueMap<bool> >();
Expand Down
2 changes: 1 addition & 1 deletion HLTrigger/Muon/plugins/HLTMuonIsoFilter.h
Expand Up @@ -40,7 +40,7 @@ class HLTMuonIsoFilter : public HLTFilter {
std::vector<edm::EDGetTokenT<edm::ValueMap<reco::IsoDeposit> > > depToken_; // tokens identifying deposit maps
edm::EDGetTokenT<edm::ValueMap<bool> > decMapToken_; // bool decision map

const muonisolation::MuIsoBaseIsolator * theDepositIsolator;
std::unique_ptr<const muonisolation::MuIsoBaseIsolator> theDepositIsolator;

int min_N_; // minimum number of muons to fire the trigger
};
Expand Down

0 comments on commit 11785f0

Please sign in to comment.