Skip to content

Commit

Permalink
Merge pull request #35113 from smuzaffar/gcc11-fix-RecoPPS
Browse files Browse the repository at this point in the history
[GCC11] Fix compiler warnings for RecoPPS
  • Loading branch information
cmsbuild authored Sep 2, 2021
2 parents 9f5fc05 + 426a7d9 commit 799fcad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions RecoPPS/ProtonReconstruction/plugins/CTPPSProtonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ CTPPSProtonProducer::CTPPSProtonProducer(const edm::ParameterSet &iConfig)
opticalFunctionsToken_(esConsumes<LHCInterpolatedOpticalFunctionsSetCollection, CTPPSInterpolatedOpticsRcd>(
edm::ESInputTag("", opticsLabel_))),
geometryToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()) {
for (const std::string &sector : {"45", "56"}) {
const unsigned int arm = (sector == "45") ? 0 : 1;
association_cuts_[arm].load(iConfig.getParameterSet("association_cuts_" + sector));
for (auto &sector : {"45", "56"}) {
const unsigned int arm = strcmp(sector, "45") == 0 ? 0 : 1;
association_cuts_[arm].load(iConfig.getParameterSet("association_cuts_" + std::string(sector)));
}

if (doSingleRPReconstruction_)
Expand Down Expand Up @@ -212,9 +212,10 @@ void CTPPSProtonProducer::fillDescriptions(edm::ConfigurationDescriptions &descr
desc.add<double>("localAngleYMin", -0.04)->setComment("minimal accepted value of local vertical angle (rad)");
desc.add<double>("localAngleYMax", +0.04)->setComment("maximal accepted value of local vertical angle (rad)");

for (const std::string &sector : {"45", "56"}) {
desc.add<edm::ParameterSetDescription>("association_cuts_" + sector, AssociationCuts::getDefaultParameters())
->setComment("track-association cuts for sector " + sector);
for (auto &sector : {"45", "56"}) {
desc.add<edm::ParameterSetDescription>("association_cuts_" + std::string(sector),
AssociationCuts::getDefaultParameters())
->setComment("track-association cuts for sector " + std::string(sector));
}

std::vector<edm::ParameterSet> config;
Expand Down

0 comments on commit 799fcad

Please sign in to comment.