Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::RootImporter Class Referencefinal

Create an ImportData object from a ROOT data file. More...

#include <RootImporter.hh>

Inheritance diagram for celeritas::RootImporter:
Inheritance graph
[legend]

Public Member Functions

 RootImporter (char const *filename)
 Construct from path to ROOT file.
 
 RootImporter (std::string const &filename)
 Construct with ROOT file name.
 
ImportData operator() () final
 Load data from the ROOT input file in native units.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ImporterInterface
 CELER_DEFAULT_COPY_MOVE (ImporterInterface)
 

Detailed Description

Create an ImportData object from a ROOT data file.

RootImporter loads particle, element, material, process, and volume information from a ROOT file that contains an ImportData object. Currently, said ROOT file is created by the RootExporter class. The imported data will be converted to the native unit system.

RootImporter , along with all Import[Class] type of classes, are the link between Geant4 and Celeritas. Every Celeritas' host/device class that relies on imported data has its own from_import(...) function that will take the data loaded by the RootImporter and load it accordingly:

RootImporter import("/path/to/root_file.root");
const auto data = import();
const auto particle_params = ParticleParams::from_import(data);
const auto material_params = MaterialParams::from_import(data);
const auto cutoff_params = CutoffParams::from_import(data);
// And so on
static std::shared_ptr< CutoffParams > from_import(ImportData const &data, SPConstParticles particle_params, SPConstMaterials material_params)
Construct with imported data.
Definition CutoffParams.cc:31
static std::shared_ptr< MaterialParams > from_import(ImportData const &data)
Construct with imported data.
Definition mat/MaterialParams.cc:63
static std::shared_ptr< ParticleParams > from_import(ImportData const &data)
Construct with imported data.
Definition ParticleParams.cc:55
Create an ImportData object from a ROOT data file.
Definition RootImporter.hh:48

Member Function Documentation

◆ operator()()

auto celeritas::RootImporter::operator() ( )
inlinefinalvirtual

Load data from the ROOT input file in native units.

Implements celeritas::ImporterInterface.


The documentation for this class was generated from the following files: