diff --git a/Ntupliser/src/BuildFile.xml b/Ntupliser/src/BuildFile.xml index 078ccd33387f6c6cd8dfa9107a8e6614896ca985..8d3f0adc1fd68842100f19811578347337cdf6a8 100644 --- a/Ntupliser/src/BuildFile.xml +++ b/Ntupliser/src/BuildFile.xml @@ -24,4 +24,4 @@ <use name="clhep"/> <use name="boost"/> <use name="gsl"/> -<flags RIVET_PLUGIN="1"/> +<flags CXXFLAGS="--warn-no-missing-braces" RIVET_PLUGIN="1"/> diff --git a/Ntupliser/src/RivetNtupliser.cc b/Ntupliser/src/RivetNtupliser.cc index 075e5191f10b3d63f6f515820b929880cf27eb3b..74d7dea28c66a783d942637b1ecf592e860300e6 100644 --- a/Ntupliser/src/RivetNtupliser.cc +++ b/Ntupliser/src/RivetNtupliser.cc @@ -106,12 +106,19 @@ namespace Rivet { recJets_vec = nullptr; } - - // Construct genJets FastJets (declare Jets as a type) - declare(FastJets(finalstate, FastJets::ANTIKT, radius), "Jets"); - if (detector_bool) { - declare(SmearedJets(FastJets(finalstate, FastJets::ANTIKT, radius), JET_SMEAR_CMS_RUN2), "RecoJetDeclaration"); - } + // Construct genJets FastJets (declare Jets as a type) + auto clustering = [&](auto alg) { + declare(FastJets(finalstate, alg, radius), "Jets"); + if (detector_bool) + declare(SmearedJets(FastJets(finalstate, alg, radius), JET_SMEAR_CMS_RUN2), "RecoJetDeclaration"); + }; + + /// \note The compiler version is used to identify the Rivet version (for lack of anything better). +# if __GNUC__ < 12 // i.e. Rivet 3 + clustering(FastJets::ANTIKT); +# else // i.e. Rivet 4 + clustering(JetAlg::ANTIKT); +# endif }