Skip to content

Commit

Permalink
Moving configuration functions under dd4hep::sim scope
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKIB RAHMAN committed Dec 13, 2024
1 parent 2fb110e commit 5ec880e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions DDG4/celeritas/Celeritas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using namespace dd4hep::sim;

// Global shared setup options
celeritas::SetupOptions& CelerSetupOptions()
celeritas::SetupOptions& dd4hep::sim::CelerSetupOptions()
{
static celeritas::SetupOptions options = [] {
// Construct setup options the first time CelerSetupOptions is invoked
Expand Down Expand Up @@ -53,21 +53,21 @@ celeritas::SetupOptions& CelerSetupOptions()
}

// Shared data and GPU setup
celeritas::SharedParams& CelerSharedParams()
celeritas::SharedParams& dd4hep::sim::CelerSharedParams()
{
static celeritas::SharedParams sp;
return sp;
}

// Thread-local transporter
celeritas::LocalTransporter& CelerLocalTransporter()
celeritas::LocalTransporter& dd4hep::sim::CelerLocalTransporter()
{
static G4ThreadLocal celeritas::LocalTransporter lt;
return lt;
}

// Thread-local offload interface
celeritas::SimpleOffload& CelerSimpleOffload()
celeritas::SimpleOffload& dd4hep::sim::CelerSimpleOffload()
{
static G4ThreadLocal celeritas::SimpleOffload so;
return so;
Expand Down
18 changes: 9 additions & 9 deletions DDG4/celeritas/Celeritas.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ namespace dd4hep {
/// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
namespace sim {

// Global shared setup options
celeritas::SetupOptions& CelerSetupOptions();
// Shared data and GPU setup
celeritas::SharedParams& CelerSharedParams();
// Thread-local transporter
celeritas::LocalTransporter& CelerLocalTransporter();
// Thread-local offload
celeritas::SimpleOffload& CelerSimpleOffload();

class EMPhysicsConstructor final : public G4EmStandardPhysics
{
public:
Expand All @@ -34,13 +43,4 @@ namespace dd4hep {
} /* End namespace sim */
} /* End namespace dd4hep*/

// Global shared setup options
celeritas::SetupOptions& CelerSetupOptions();
// Shared data and GPU setup
celeritas::SharedParams& CelerSharedParams();
// Thread-local transporter
celeritas::LocalTransporter& CelerLocalTransporter();
// Thread-local offload
celeritas::SimpleOffload& CelerSimpleOffload();

#endif

0 comments on commit 5ec880e

Please sign in to comment.