ATLAS Offline Software
Loading...
Searching...
No Matches
CelerOffloadTool.h
Go to the documentation of this file.
1#ifndef G4USERACTIONS_CELEROFFLOADTOOL_H
2#define G4USERACTIONS_CELEROFFLOADTOOL_H
3
5
6#include "CelerOffload.h"
7
8#include "accel/SetupOptions.hh"
9
10namespace G4UA {
11
12 class CelerOffloadTool : public UserActionToolBase<CelerOffload>
13 {
14 public:
15 CelerOffloadTool(const std::string& type, const std::string& name, const IInterface* parent);
16
17 virtual StatusCode initialize() override;
18 virtual StatusCode finalize() override;
19
20 protected:
21
22 virtual std::unique_ptr<CelerOffload> makeAndFillAction(G4AtlasUserActions&) override final;
23
24 private:
25 // Set configurable props here
26 using SetupOptions=celeritas::SetupOptions;
27 // - I/O options
28 // geometry_file: probably never use as Athena/GeoModel provide the G4 geometry
29 // output_file?
30 // physics_output_file?
31 // offload_output_file?
32 Gaudi::Property<std::string> m_geometry_output_file{this, "geometry_output_file", {}, "Filename to dump a GDML file for debugging inside frameworks"};
33
34 // - Stepper options
35 Gaudi::Property<SetupOptions::size_type> m_max_num_tracks{this, "max_num_tracks", {}, "Number of track 'slots' to be transported simultaneously"};
36 Gaudi::Property<SetupOptions::size_type> m_max_steps{this, "max_steps", SetupOptions::no_max_steps(), "Limit on number of steps per track before killing"};
37 Gaudi::Property<SetupOptions::size_type> m_max_step_iters{this, "max_step_iters", SetupOptions::no_max_steps(), "Limit on number of step iterations before aborting"};
38 Gaudi::Property<SetupOptions::size_type> m_initializer_capacity{this, "initializer_capacity", {}, "Maximum number of track initializers (primaries+secondaries)"};
39 // secondary_stack_factor?
40 // auto_flush?
41
42 // - Track ordering options
43 // track_order?
44 // get_num_streams
45
46 // - Stepping actions
47 // make_along_step? This is a 'std::function<SPConstAction(AlongStepFactoryInput const&)>;'
48
49 // - Field options
50 // max_field_substeps
51
52 // - Sensitive detector options
53 // A nested struct in SetupOptions, need to see how Gaudi props handle this
54
55 // - Physics Options
56 Gaudi::Property<SetupOptions::VecString> m_ignore_processes{this, "ignore_processes", {}, "Do not use Celeritas physics for the given Geant4 process names"};
57 // interpolation is another nested struct
58
59 // - CUDA options
60 Gaudi::Property<SetupOptions::size_type> m_cuda_stack_size{this, "cuda_stack_size", {}, "Per-thread stack size (may be needed for VecGeom)"};
61 Gaudi::Property<SetupOptions::size_type> m_cuda_heap_size{this, "cuda_heap_size", {}, "Dynamic heap size (may be needed for VecGeom)"};
62 Gaudi::Property<bool> m_action_times{this, "action_times", false, "Sync the GPU at every kernel for timing"};
63 };
64}
65#endif
66
Gaudi::Property< std::string > m_geometry_output_file
Gaudi::Property< SetupOptions::size_type > m_max_step_iters
virtual StatusCode finalize() override
virtual std::unique_ptr< CelerOffload > makeAndFillAction(G4AtlasUserActions &) override final
Make the action and push onto the lists.
Gaudi::Property< SetupOptions::size_type > m_max_steps
Gaudi::Property< SetupOptions::size_type > m_max_num_tracks
virtual StatusCode initialize() override
Gaudi::Property< SetupOptions::size_type > m_cuda_heap_size
Gaudi::Property< SetupOptions::size_type > m_initializer_capacity
Gaudi::Property< SetupOptions::VecString > m_ignore_processes
Gaudi::Property< SetupOptions::size_type > m_cuda_stack_size
celeritas::SetupOptions SetupOptions
Gaudi::Property< bool > m_action_times
CelerOffloadTool(const std::string &type, const std::string &name, const IInterface *parent)
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Struct for passing around user actions.