Commit 9edad9ae authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

TrigAFPHypo, TrigEgammaHypo, TrigTauHypo, DecisionHandling, fix...

TrigAFPHypo, TrigEgammaHypo, TrigTauHypo, DecisionHandling,  fix [-Wstring-plus-int] and [-Wrange-loop-construct] clang warnings
parent 3ac47c59
......@@ -91,7 +91,7 @@ bool TrigAFPDijetComboHypoTool::executeAlg(const std::vector<Combo::LegDecision>
// One of these is the AFP Decision Object, which we ignore as we are fetching the AFP reconstruction directly from a ReadHandle.
// The other two should be Jet Decision Objects.
for(const auto comb: combination){
for(const auto& comb: combination){
const auto dec = comb.second;
const auto jet_link = TrigCompositeUtils::findLink<xAOD::JetContainer>(*dec, TrigCompositeUtils::featureString()).link;
if (jet_link.isValid()) {
......@@ -100,10 +100,13 @@ bool TrigAFPDijetComboHypoTool::executeAlg(const std::vector<Combo::LegDecision>
}
if(selected_jets.size() != 2){
ATH_MSG_ERROR("Expecting to combine exactly two jets, but instead found " << selected_jets.size() << ". Will throw a runtime error");
throw std::runtime_error("Expecting to combine exactly two jets, but instead found "+selected_jets.size());
ATH_MSG_ERROR("Expecting to combine exactly two jets, but instead found "
<< selected_jets.size() << ". Will throw a runtime error");
throw std::runtime_error(
"Expecting to combine exactly two jets, but instead found " +
std::to_string(selected_jets.size()));
}
// Get jet pair
auto jetLink1 = selected_jets[0]; // Need to check if jets are actually ordered in pT
auto jetLink2 = selected_jets[1];
......
......@@ -51,8 +51,12 @@ bool TrigEgammaTopoHypoTool::executeAlg(const std::vector<Combo::LegDecision> &c
// Expecting to only run over chains with two legs and one electron or photon required on each leg
// So should always have two objects from which to form the invariant mass
if(combination.size() != 2){
ATH_MSG_ERROR("Expecting to combine exactly two electrons/photons, but instead found " << combination.size() << ". Will throw a runtime error");
throw std::runtime_error("Expecting to combine exactly two electrons/photons, but instead found "+combination.size());
ATH_MSG_ERROR(
"Expecting to combine exactly two electrons/photons, but instead found "
<< combination.size() << ". Will throw a runtime error");
throw std::runtime_error(
"Expecting to combine exactly two electrons/photons, but instead found " +
std::to_string(combination.size()));
}
for (auto el: combination){
......
......@@ -37,8 +37,12 @@ bool TrigTauXComboHypoTool::executeAlg(const std::vector<Combo::LegDecision>& co
// Expecting to only run over chains with two legs and one IParticle required on each leg
// So should always have two objects from which to check DeltaR
if(combination.size() != 2){
ATH_MSG_ERROR("Expecting to combine exactly two IParticle physics objects, but instead found " << combination.size() << ". Will throw a runtime error");
throw std::runtime_error("Expecting to combine exactly two IParticle physics objects, but instead found "+combination.size());
ATH_MSG_ERROR("Expecting to combine exactly two IParticle physics objects, "
"but instead found "
<< combination.size() << ". Will throw a runtime error");
throw std::runtime_error("Expecting to combine exactly two IParticle "
"physics objects, but instead found " +
std::to_string(combination.size()));
}
//retrieve the elements
......
......@@ -31,11 +31,15 @@ bool DeltaRRoIComboHypoTool::executeAlg(const std::vector<Combo::LegDecision>& c
// Expecting to only run over chains with two legs and one Decision Object required on each leg
// So should always have two objects from which to check DeltaR
if(combination.size() != 2){
ATH_MSG_ERROR("Expecting to combine exactly two Decision Objects, but instead found " << combination.size() << ". Will throw a runtime error");
throw std::runtime_error("Expecting to combine exactly two Decision Objects, but instead found "+combination.size());
ATH_MSG_ERROR(
"Expecting to combine exactly two Decision Objects, but instead found "
<< combination.size() << ". Will throw a runtime error");
throw std::runtime_error(
"Expecting to combine exactly two Decision Objects, but instead found " +
std::to_string(combination.size()));
}
for (const auto el: combination){
for (const auto& el: combination){
const auto EL= el.second;
const auto dec= (*EL);
const auto roiLink = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( dec, initialRoIString() ).link;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment