Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Detectors/Base/include/DetectorsBase/Propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ class Propagator
GPUd() void setBz(float bz) { mBz = bz; }

#ifndef GPUCA_GPUCODE
static Propagator* Instance()
static Propagator* Instance(bool uninitialized = false)
{
static Propagator instance;
static Propagator instance(uninitialized);
return &instance;
}

Expand All @@ -129,7 +129,7 @@ class Propagator

private:
#ifndef GPUCA_GPUCODE
Propagator();
Propagator(bool uninitialized = false);
~Propagator() = default;
#endif

Expand Down
7 changes: 5 additions & 2 deletions Detectors/Base/src/Propagator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ using namespace o2::gpu;
#include <FairRunAna.h> // eventually will get rid of it
#include <TGeoGlobalMagField.h>

Propagator::Propagator()
Propagator::Propagator(bool uninitialized)
{
if (uninitialized) {
return;
}
///< construct checking if needed components were initialized

// we need the geoemtry loaded
Expand Down Expand Up @@ -99,7 +102,7 @@ int Propagator::initFieldFromGRP(const o2::parameters::GRPObject* grp, bool verb
return 0;
}
#elif !defined(GPUCA_GPUCODE)
Propagator::Propagator()
Propagator::Propagator(bool uninitialized)
{
} // empty dummy constructor for standalone benchmark
#endif
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Base/GPUParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ o2::base::Propagator* GPUParam::GetDefaultO2Propagator(bool useGPUField) const
if (useGPUField == false) {
throw std::runtime_error("o2 propagator withouzt gpu field unsupported");
}
prop = o2::base::Propagator::Instance();
prop = o2::base::Propagator::Instance(useGPUField);
if (useGPUField) {
prop->setGPUField(&polynomialField);
prop->setBz(polynomialField.GetNominalBz());
Expand Down