|
gparticle
|
How gparticle is configured through structured options. More...

Files | |
| file | gparticle_options.h |
| Public API for defining and parsing gparticle-related options. | |
Functions | |
| GOptions | gparticle::defineOptions () |
| Defines the structured options used by the gparticle module. | |
| vector< GparticlePtr > | gparticle::getGParticles (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger) |
| Builds the list of generator particles from structured options. | |
| vector< GparticlePtr > | gparticle::getGParticlesFromOption (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger) |
Builds inline generator particles from only the -gparticle option. | |
| GOptions gparticle::defineOptions | ( | ) |
This function returns a fully populated GOptions instance containing the option specifications for -gparticle and -gparticlefile.
The -gparticle option is expected to represent a list of particle definitions. Each list item maps keys (e.g. name, p, theta, vx) to typed values, which are then used to construct Gparticle objects.
The -gparticlefile option is expected to represent a list of file source definitions. Each source provides a format token and a filename. The format token selects a built-in reader or a dynamic plugin following the gparticle_<format>_plugin naming convention.
The help text produced by this option definition includes usage guidance and examples of the supported syntax.
Definition at line 72 of file gparticle_options.cc.
| std::vector< GparticlePtr > gparticle::getGParticles | ( | const std::shared_ptr< GOptions > & | gopts, |
| std::shared_ptr< GLogger > & | logger ) |
This function reads the gparticle option node and the optional gparticlefile file-source node from the provided GOptions instance and creates a std::vector of Gparticle shared pointers.
For each entry in the structured node:
name)The provided logger is passed to each Gparticle instance to ensure that particle-level diagnostics are emitted consistently.
File-backed particles returned here are the Geant4-propagated subset. To access all parsed file particles for output, including non-propagated rows, use gparticle::getGParticleRecordEventsFromSources().
| gopts | The parsed option container that holds the gparticle node. |
| logger | Logger used for diagnostics and propagated into each particle. |
Definition at line 62 of file gparticle_options.cc.
| std::vector< GparticlePtr > gparticle::getGParticlesFromOption | ( | const std::shared_ptr< GOptions > & | gopts, |
| std::shared_ptr< GLogger > & | logger ) |
Unlike getGParticles(), this function does not read -gparticlefile sources. It is used when inline particles must be kept separate from file-backed event records.
| gopts | Parsed option container. |
| logger | Logger used for diagnostics and propagated into each particle. |
Definition at line 16 of file gparticle_options.cc.