Skip to content

Commit

Permalink
Merge pull request #29939 from camolezi/reduce-boost-tuple
Browse files Browse the repository at this point in the history
[HLT]Replaced boost::tuple for std::tuple
  • Loading branch information
cmsbuild authored May 22, 2020
2 parents 39527cd + 0674b03 commit 442ae07
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
14 changes: 7 additions & 7 deletions HLTriggerOffline/Muon/interface/HLTMuonPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

#include "DQMServices/Core/interface/DQMStore.h"

#include "boost/tuple/tuple.hpp"
#include <algorithm>
#include <cctype>
#include <iostream>
#include <map>
#include <set>
#include <tuple>
#include <vector>

#include "TPRegexp.h"
Expand All @@ -58,9 +58,9 @@ class HLTMuonPlotter {
std::string,
const std::vector<std::string> &,
const std::vector<std::string> &,
const boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>> &);
const std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>> &);

~HLTMuonPlotter() {
delete genMuonSelector_;
Expand All @@ -71,9 +71,9 @@ class HLTMuonPlotter {
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
void analyze(const edm::Event &, const edm::EventSetup &);

static boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
static std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&);

private:
Expand Down
24 changes: 12 additions & 12 deletions HLTriggerOffline/Muon/src/HLTMuonPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ HLTMuonPlotter::HLTMuonPlotter(const ParameterSet &pset,
string hltPath,
const std::vector<string> &moduleLabels,
const std::vector<string> &stepLabels,
const boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>> &tokens)
const std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>> &tokens)
:

l1Matcher_(pset) {
Expand All @@ -52,9 +52,9 @@ HLTMuonPlotter::HLTMuonPlotter(const ParameterSet &pset,
recMuonSelector_ = nullptr;

// set tokens
hltTriggerSummaryRAW_ = tokens.get<0>();
genParticleLabel_ = tokens.get<1>();
recMuonLabel_ = tokens.get<2>();
hltTriggerSummaryRAW_ = std::get<0>(tokens);
genParticleLabel_ = std::get<1>(tokens);
recMuonLabel_ = std::get<2>(tokens);
}

void HLTMuonPlotter::beginJob() {}
Expand Down Expand Up @@ -258,9 +258,9 @@ void HLTMuonPlotter::analyze(const Event &iEvent, const EventSetup &iSetup) {
} // End loop over sources
}

boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
HLTMuonPlotter::getTokens(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC) {
edm::EDGetTokenT<trigger::TriggerEventWithRefs> _hltTriggerSummaryRAW =
iC.consumes<TriggerEventWithRefs>(edm::InputTag("hltTriggerSummaryRAW"));
Expand All @@ -269,9 +269,9 @@ HLTMuonPlotter::getTokens(const edm::ParameterSet &pset, edm::ConsumesCollector
edm::EDGetTokenT<reco::MuonCollection> _recMuonLabel =
iC.consumes<MuonCollection>(pset.getParameter<string>("recMuonLabel"));

boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
myTuple(_hltTriggerSummaryRAW, _genParticleLabel, _recMuonLabel);

return (myTuple);
Expand Down
8 changes: 4 additions & 4 deletions HLTriggerOffline/Muon/src/HLTMuonValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// system include files
#include <iostream>
#include <memory>
#include <tuple>

// user include files
#include "HLTriggerOffline/Muon/interface/HLTMuonPlotter.h"
Expand All @@ -28,7 +29,6 @@
#include "TDirectory.h"
#include "TFile.h"
#include "TPRegexp.h"
#include "boost/tuple/tuple.hpp"

//////////////////////////////////////////////////////////////////////////////
//////// Define the interface ////////////////////////////////////////////////
Expand All @@ -55,9 +55,9 @@ class HLTMuonValidator : public DQMEDAnalyzer {
// Member Variables
std::vector<HLTMuonPlotter> analyzers_;
HLTConfigProvider hltConfig_;
boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
std::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
edm::EDGetTokenT<reco::GenParticleCollection>,
edm::EDGetTokenT<reco::MuonCollection>>
myTokens_;
};

Expand Down

0 comments on commit 442ae07

Please sign in to comment.