Skip to content

Commit 41cef0b

Browse files
Merge branch 'main' into chore-use-ranges-find
2 parents 88da230 + a3be2fb commit 41cef0b

File tree

9 files changed

+27
-138
lines changed

9 files changed

+27
-138
lines changed

CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ endif()
242242
# they can be easily upgraded, although they might not be used if the
243243
# dependency is included via `add_subdirectory(...)`.
244244
set(_acts_actsvg_version 0.4.56)
245-
set(_acts_boost_version 1.77.0) # first version with C++20 support
245+
set(_acts_boost_version 1.78.0)
246246
set(_acts_dd4hep_version 1.26)
247247
set(_acts_geant4_version 11.1.3)
248248
set(_acts_edm4hep_version 0.10.5)
@@ -266,10 +266,6 @@ set(_acts_algebraplugins_version 0.28.0)
266266
set(_acts_annoy_version 1.17.3)
267267
set(_acts_fastjet_version 3.4.1)
268268

269-
# recommended dependency version. if there is an opportunity to reach
270-
# this version we will try so.
271-
set(_acts_boost_recommended_version 1.78.0)
272-
273269
# Help with compiler flags discovery
274270
include(ActsFunctions)
275271

@@ -296,13 +292,6 @@ if(ACTS_SETUP_BOOST)
296292
find_package(Boost ${_acts_boost_version} REQUIRED COMPONENTS)
297293
endif()
298294

299-
if(Boost_VERSION VERSION_LESS _acts_boost_recommended_version)
300-
message(
301-
WARNING
302-
"Found Boost ${Boost_VERSION} - recommended is at least ${_acts_boost_recommended_version}"
303-
)
304-
endif()
305-
306295
if(Boost_VERSION VERSION_EQUAL "1.85.0")
307296
set(_boost_version_severity WARNING)
308297
if(ACTS_BUILD_EXAMPLES)

Examples/Algorithms/Fatras/src/FatrasSimulation.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#include <utility>
4040
#include <vector>
4141

42-
#include <boost/version.hpp>
43-
4442
namespace {
4543

4644
/// Simple struct to select surfaces where hits should be generated.
@@ -266,34 +264,11 @@ ActsExamples::ProcessCode ActsExamples::FatrasSimulation::execute(
266264
}
267265

268266
// order output containers
269-
#if BOOST_VERSION >= 107800
270267
SimParticleStateContainer particlesInitial(particlesInitialUnordered.begin(),
271268
particlesInitialUnordered.end());
272269
SimParticleStateContainer particlesFinal(particlesFinalUnordered.begin(),
273270
particlesFinalUnordered.end());
274271
SimHitContainer simHits(simHitsUnordered.begin(), simHitsUnordered.end());
275-
#else
276-
// working around a nasty boost bug
277-
// https://github.com/boostorg/container/issues/244
278-
279-
SimParticleStateContainer particlesInitial;
280-
SimParticleStateContainer particlesFinal;
281-
SimHitContainer simHits;
282-
283-
particlesInitial.reserve(particlesInitialUnordered.size());
284-
particlesFinal.reserve(particlesFinalUnordered.size());
285-
simHits.reserve(simHitsUnordered.size());
286-
287-
for (const auto &p : particlesInitialUnordered) {
288-
particlesInitial.insert(p);
289-
}
290-
for (const auto &p : particlesFinalUnordered) {
291-
particlesFinal.insert(p);
292-
}
293-
for (const auto &h : simHitsUnordered) {
294-
simHits.insert(h);
295-
}
296-
#endif
297272

298273
SimParticleContainer particlesSimulated;
299274
particlesSimulated.reserve(particlesInitial.size());

Examples/Algorithms/Geant4/src/Geant4Simulation.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include <G4VUserPhysicsList.hh>
4444
#include <G4Version.hh>
4545
#include <Randomize.hh>
46-
#include <boost/version.hpp>
4746

4847
namespace ActsExamples {
4948

@@ -308,16 +307,8 @@ ProcessCode Geant4Simulation::execute(const AlgorithmContext& ctx) const {
308307
ctx, SimParticleContainer(eventStore().particlesSimulated.begin(),
309308
eventStore().particlesSimulated.end()));
310309

311-
#if BOOST_VERSION < 107800
312-
SimHitContainer container;
313-
for (const auto& hit : eventStore().hits) {
314-
container.insert(hit);
315-
}
316-
m_outputSimHits(ctx, std::move(container));
317-
#else
318310
m_outputSimHits(
319311
ctx, SimHitContainer(eventStore().hits.begin(), eventStore().hits.end()));
320-
#endif
321312

322313
// Output the propagation summaries if requested
323314
if (m_cfg.recordPropagationSummaries) {

Examples/Algorithms/Geant4/src/SensitiveSteppingAction.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
#include <G4UnitsTable.hh>
3434
#include <G4VPhysicalVolume.hh>
3535
#include <G4VTouchable.hh>
36-
#include <boost/version.hpp>
37-
38-
#if BOOST_VERSION >= 107800
3936
#include <boost/describe.hpp>
4037

4138
BOOST_DESCRIBE_ENUM(G4StepStatus, fWorldBoundary, fGeomBoundary,
@@ -49,7 +46,6 @@ BOOST_DESCRIBE_ENUM(G4ProcessType, fNotDefined, fTransportation,
4946

5047
BOOST_DESCRIBE_ENUM(G4TrackStatus, fAlive, fStopButAlive, fStopAndKill,
5148
fKillTrackAndSecondaries, fSuspend, fPostponeToNextEvent);
52-
#endif
5349

5450
namespace {
5551

@@ -242,12 +238,9 @@ void SensitiveSteppingAction::UserSteppingAction(const G4Step* step) {
242238
(postStepPoint->GetProcessDefinedStep()->GetProcessType() == fDecay);
243239

244240
auto print = [](auto s) {
245-
#if BOOST_VERSION >= 107800
246241
return boost::describe::enum_to_string(s, "unmatched");
247-
#else
248-
return s;
249-
#endif
250242
};
243+
251244
ACTS_VERBOSE("status: pre="
252245
<< print(preStepPoint->GetStepStatus())
253246
<< ", post=" << print(postStepPoint->GetStepStatus())

Examples/Framework/include/ActsExamples/EventData/Index.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,10 @@ inline InverseMultimap<value_t> invertIndexMultimap(
5353

5454
// adopting the unordered sequence will reestablish the correct order
5555
InverseMultimap<value_t> inverse;
56-
#if BOOST_VERSION < 107800
57-
for (const auto& i : unordered) {
58-
inverse.insert(i);
59-
}
60-
#else
56+
6157
std::ranges::sort(unordered);
6258
inverse.insert(boost::container::ordered_range_t{}, unordered.begin(),
6359
unordered.end());
64-
#endif
6560

6661
return inverse;
6762
}

Examples/Scripts/MaterialMapping/MaterialComposition.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,16 @@
2020

2121
#include <TApplication.h>
2222
#include <boost/program_options.hpp>
23-
#include <boost/version.hpp>
23+
#include <boost/timer/progress_display.hpp>
2424
#include <nlohmann/json.hpp>
2525

2626
#define BOOST_AVAILABLE 1
27-
#if BOOST_VERSION < 107200
28-
// Boost <=1.71 and lower do not have progress_display.hpp as a replacement yet
29-
#include <boost/progress.hpp>
30-
31-
using progress_display = boost::progress_display;
32-
#else
3327
// Boost >=1.72 can use this as a replacement
3428
#include <boost/timer/progress_display.hpp>
3529

3630
using progress_display = boost::timer::progress_display;
37-
#endif
3831

32+
// this must be last
3933
#include "materialComposition.C"
4034

4135
using namespace boost::program_options;

Examples/Scripts/TrackingPerformance/TrackSummary.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,12 @@
2323

2424
#include <TApplication.h>
2525
#include <boost/program_options.hpp>
26-
#include <boost/version.hpp>
26+
#include <boost/timer/progress_display.hpp>
2727
#include <nlohmann/json.hpp>
2828

2929
#define BOOST_AVAILABLE 1
30-
#if BOOST_VERSION < 107200
31-
// Boost <=1.71 and lower do not have progress_display.hpp as a replacement yet
32-
#include <boost/progress.hpp>
33-
34-
using progress_display = boost::progress_display;
35-
#else
36-
// Boost >=1.72 can use this as a replacement
37-
#include <boost/timer/progress_display.hpp>
3830

3931
using progress_display = boost::timer::progress_display;
40-
#endif
4132

4233
#define NLOHMANN_AVAILABLE 1
4334
#include "trackSummaryAnalysis.C"
@@ -47,7 +38,7 @@ using namespace boost::program_options;
4738
using Interval = ActsExamples::Options::Interval;
4839
using VariableReals = ActsExamples::Options::VariableReals;
4940

50-
int main(int argc, char** argv) {
41+
int main(int argc, char **argv) {
5142
std::cout << "*** ACTS Perigee parameters and Track summary plotting "
5243
<< std::endl;
5344

@@ -95,14 +86,14 @@ int main(int argc, char** argv) {
9586
// Define the parameters for the residual/pull analysis
9687
std::vector<std::string> resPullPars = {"d0", "z0", "phi0", "theta0",
9788
"qop", "time", "pt"};
98-
for (const auto& rp : resPullPars) {
89+
for (const auto &rp : resPullPars) {
9990
ao(rp.c_str(), bool_switch(),
10091
(std::string("Residual/pulls for ") + rp).c_str());
10192
}
10293
// Define the auxiliary track information
10394
std::vector<std::string> auxPars = {"chi2ndf", "measurements", "holes",
10495
"outliers", "shared"};
105-
for (const auto& aux : auxPars) {
96+
for (const auto &aux : auxPars) {
10697
ao(aux.c_str(), bool_switch(),
10798
(std::string("Auxiliary information for ") + aux).c_str());
10899
}
@@ -151,7 +142,7 @@ int main(int argc, char** argv) {
151142
ptBorders = {0., std::numeric_limits<double>::infinity()};
152143
}
153144

154-
TApplication* tApp =
145+
TApplication *tApp =
155146
vm["silent"].as<bool>()
156147
? nullptr
157148
: new TApplication("TrackSummary", nullptr, nullptr);
@@ -198,7 +189,7 @@ int main(int argc, char** argv) {
198189
tApp->Run();
199190
}
200191

201-
} catch (std::exception& e) {
192+
} catch (std::exception &e) {
202193
std::cerr << e.what() << "\n";
203194
}
204195

0 commit comments

Comments
 (0)