Skip to content

Commit

Permalink
Merge pull request #3 from Sam-Harper/HGCal_ShowerShapes_11_2_0_pre7
Browse files Browse the repository at this point in the history
addressing review comments
  • Loading branch information
SohamBhattacharya authored Dec 17, 2020
2 parents 9afea05 + bf57b1d commit 5fdf813
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ class EgammaHLTHGCalIDVarProducer : public edm::stream::EDProducer<> {
public:
PCAAssocMap(double HGCalShowerShapeHelper::ShowerWidths::*var, const std::string& name) : var_(var), name_(name) {}

std::unique_ptr<reco::RecoEcalCandidateIsolationMap>& initMap(
const edm::Handle<reco::RecoEcalCandidateCollection>& candHandle) {
void initMap(const edm::Handle<reco::RecoEcalCandidateCollection>& candHandle) {
assocMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
return assocMap_;
}

void insert(reco::RecoEcalCandidateRef& ref, const HGCalShowerShapeHelper::ShowerWidths& showerWidths) {
assocMap_->insert(ref, showerWidths.*var_);
}

std::unique_ptr<reco::RecoEcalCandidateIsolationMap>& operator()() { return assocMap_; }
std::unique_ptr<reco::RecoEcalCandidateIsolationMap> releaseMap() { return std::move(assocMap_); }
const std::string& name() const { return name_; }

private:
Expand Down Expand Up @@ -126,7 +124,7 @@ void EgammaHLTHGCalIDVarProducer::produce(edm::Event& iEvent, const edm::EventSe
iEvent.put(std::move(rVarMap), "rVar");
iEvent.put(std::move(hForHoverEMap), "hForHOverE");
for (auto& pcaMap : pcaAssocMaps_) {
iEvent.put(std::move(pcaMap()), pcaMap.name());
iEvent.put(pcaMap.releaseMap(), pcaMap.name());
}
}

Expand Down

0 comments on commit 5fdf813

Please sign in to comment.