gsystem
Loading...
Searching...
No Matches
gsystem Namespace Reference

Functions

SystemList getSystems (const std::shared_ptr< GOptions > &gopts)
 Build a list of systems from options.
std::vector< GModifiergetModifiers (const std::shared_ptr< GOptions > &gopts)
 Build a list of volume modifiers from options.
GOptions defineOptions ()
 Define and return all option groups required by the gsystem module.

Variables

constexpr char GMIRRORSKINSURFACE [] = "SkinSurface"
 Border value marking an optical surface applied to the whole volume skin.
constexpr char GSYSTEMCOMPONENTMATERIAL [] = "Component"
constexpr char GTEXTGEOMTYPE [] = "__geometry_"
constexpr char GTEXTMATSTYPE [] = "__materials_"
constexpr char GTEXTMIRSTYPE [] = "__mirrors_"
Database row sizes

Expected number of positional fields for serialized DB/ASCII rows.

The module reads geometry and material data as serialized, positional vectors. These constants define the expected number of fields for each record type.

constexpr int GVOLUMENUMBEROFPARS = 22
constexpr int GVOLUMELEGACYNUMBEROFPARS = 21
 Number of database parameters defining a legacy gvolume entry without g4placement_type.
constexpr int GMATERIALNUMBEROFPARS = 18
 Number of database parameters defining a gmaterial entry.
constexpr int GMIRRORNUMBEROFPARS = 16
 Number of database parameters defining a gmirror entry.
Default placement strings

Default position and rotation strings, primarily for the ROOT/world volume.

These are used when creating the implicit ROOT/world volume or when a configuration requests a default placement. Units are embedded in the strings and interpreted by the same utilities used by geometry parsing.

constexpr char DEFAULTPOSITION [] = "0*cm, 0*cm, 0*cm"
constexpr char DEFAULTROTATION [] = "0*deg, 0*deg, 0*deg"
constexpr char DEFAULTG4PLACEMENTTYPE [] = "active"
Error codes

Module-level exit/status codes.

Values are in the 200s range and are used by the logger error path to provide stable identifiers for common failure modes.

constexpr int ERR_GVOLUMEALREADYPRESENT = 201
constexpr int ERR_GWRONGNUMBEROFPARS = 202
constexpr int ERR_GSETUPFILENOTOFOUND = 203
constexpr int ERR_GVOLUMENOTFOUND = 204
constexpr int ERR_GDIRNOTFOUND = 205
constexpr int ERR_GMATERIALOPTICALPROPERTYMISMATCH = 206
constexpr int ERR_GMATERIALNOTFOUND = 207
constexpr int ERR_GVOLUMENAMECONTAINSINVALID = 208
constexpr int ERR_GSQLITEERROR = 209
constexpr int ERR_GMATERIALALREADYPRESENT = 210
constexpr int ERR_EXPERIMENTNOTFOUND = 211
constexpr int ERR_G4PLACEMENTTYPE = 212
constexpr int ERR_GMIRRORALREADYPRESENT = 213
constexpr int ERR_GMIRRORNOTFOUND = 214
constexpr int ERR_GMIRRORINVALID = 215
Environment and naming conventions

Shared names used across factories and core types.

constexpr char GEMCDB_ENV [] = "GEMCDB_ENV"
constexpr char ROOTWORLDGVOLUMENAME [] = "root"
 Canonical name for the ROOT/world gvolume entry.
constexpr char ROOTDEFINITION [] = "G4Box 15*m 15*m 15*m G4_AIR"
constexpr char MOTHEROFUSALL [] = "akasha"
 Special mother-name marker for the top-level world root.
constexpr char GSYSTEM_DELIMITER [] = "/"
 Delimiter used to build fully-qualified names (system/name).
Factory labels

Identifiers used in configuration to select concrete factories.

constexpr char GSYSTEMASCIIFACTORYLABEL [] = "ascii"
constexpr char GSYSTEMCADTFACTORYLABEL [] = "CAD"
constexpr char GSYSTEMGDMLTFACTORYLABEL [] = "GDML"
constexpr char GSYSTEMMYSQLTFACTORYLABEL [] = "mysql"
constexpr char GSYSTEMSQLITETFACTORYLABEL [] = "sqlite"
constexpr char GSYSTEMSQLITETDEFAULTFILE [] = "gemc.db"
 Default sqlite DB filename used when the user does not specify one.
constexpr char GSYSTEMSASCIISEARCHDIR [] = "."
 Default search directory for ASCII factory files.

Function Documentation

◆ defineOptions()

GOptions gsystem::defineOptions ( )
Returns
A fully populated GOptions instance containing logger groups and module-specific options.

Definition at line 72 of file gsystem_options.cc.

◆ getModifiers()

std::vector< GModifier > gsystem::getModifiers ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options/configuration instance.
Returns
List of modifiers to apply during world construction.

This reads the "gmodifier" option node and converts each entry into a GModifier.

Definition at line 54 of file gsystem_options.cc.

◆ getSystems()

SystemList gsystem::getSystems ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options/configuration instance.
Returns
List of system descriptors to be loaded into a world.

This reads the "gsystem" option node. For each entry it extracts:

  • name (mandatory)
  • factory (default: sqlite)
  • variation (default: "default")
  • annotations (default: not set)

Definition at line 18 of file gsystem_options.cc.

Variable Documentation

◆ DEFAULTG4PLACEMENTTYPE

char gsystem::DEFAULTG4PLACEMENTTYPE[] = "active"
inlineconstexpr

Definition at line 68 of file gsystemConventions.h.

◆ DEFAULTPOSITION

char gsystem::DEFAULTPOSITION[] = "0*cm, 0*cm, 0*cm"
inlineconstexpr

Definition at line 66 of file gsystemConventions.h.

◆ DEFAULTROTATION

char gsystem::DEFAULTROTATION[] = "0*deg, 0*deg, 0*deg"
inlineconstexpr

Definition at line 67 of file gsystemConventions.h.

◆ ERR_EXPERIMENTNOTFOUND

int gsystem::ERR_EXPERIMENTNOTFOUND = 211
inlineconstexpr

Definition at line 93 of file gsystemConventions.h.

◆ ERR_G4PLACEMENTTYPE

int gsystem::ERR_G4PLACEMENTTYPE = 212
inlineconstexpr

Definition at line 94 of file gsystemConventions.h.

◆ ERR_GDIRNOTFOUND

int gsystem::ERR_GDIRNOTFOUND = 205
inlineconstexpr

Definition at line 87 of file gsystemConventions.h.

◆ ERR_GMATERIALALREADYPRESENT

int gsystem::ERR_GMATERIALALREADYPRESENT = 210
inlineconstexpr

Definition at line 92 of file gsystemConventions.h.

◆ ERR_GMATERIALNOTFOUND

int gsystem::ERR_GMATERIALNOTFOUND = 207
inlineconstexpr

Definition at line 89 of file gsystemConventions.h.

◆ ERR_GMATERIALOPTICALPROPERTYMISMATCH

int gsystem::ERR_GMATERIALOPTICALPROPERTYMISMATCH = 206
inlineconstexpr

Definition at line 88 of file gsystemConventions.h.

◆ ERR_GMIRRORALREADYPRESENT

int gsystem::ERR_GMIRRORALREADYPRESENT = 213
inlineconstexpr

Definition at line 95 of file gsystemConventions.h.

◆ ERR_GMIRRORINVALID

int gsystem::ERR_GMIRRORINVALID = 215
inlineconstexpr

Definition at line 97 of file gsystemConventions.h.

◆ ERR_GMIRRORNOTFOUND

int gsystem::ERR_GMIRRORNOTFOUND = 214
inlineconstexpr

Definition at line 96 of file gsystemConventions.h.

◆ ERR_GSETUPFILENOTOFOUND

int gsystem::ERR_GSETUPFILENOTOFOUND = 203
inlineconstexpr

Definition at line 85 of file gsystemConventions.h.

◆ ERR_GSQLITEERROR

int gsystem::ERR_GSQLITEERROR = 209
inlineconstexpr

Definition at line 91 of file gsystemConventions.h.

◆ ERR_GVOLUMEALREADYPRESENT

int gsystem::ERR_GVOLUMEALREADYPRESENT = 201
inlineconstexpr

Definition at line 83 of file gsystemConventions.h.

◆ ERR_GVOLUMENAMECONTAINSINVALID

int gsystem::ERR_GVOLUMENAMECONTAINSINVALID = 208
inlineconstexpr

Definition at line 90 of file gsystemConventions.h.

◆ ERR_GVOLUMENOTFOUND

int gsystem::ERR_GVOLUMENOTFOUND = 204
inlineconstexpr

Definition at line 86 of file gsystemConventions.h.

◆ ERR_GWRONGNUMBEROFPARS

int gsystem::ERR_GWRONGNUMBEROFPARS = 202
inlineconstexpr

Definition at line 84 of file gsystemConventions.h.

◆ GEMCDB_ENV

char gsystem::GEMCDB_ENV[] = "GEMCDB_ENV"
inlineconstexpr

Environment variable name used by GEMC database tooling.

Definition at line 110 of file gsystemConventions.h.

◆ GMATERIALNUMBEROFPARS

int gsystem::GMATERIALNUMBEROFPARS = 18
inlineconstexpr

Definition at line 36 of file gsystemConventions.h.

◆ GMIRRORNUMBEROFPARS

int gsystem::GMIRRORNUMBEROFPARS = 16
inlineconstexpr

Definition at line 38 of file gsystemConventions.h.

◆ GMIRRORSKINSURFACE

char gsystem::GMIRRORSKINSURFACE[] = "SkinSurface"
inlineconstexpr

Definition at line 46 of file gsystemConventions.h.

◆ GSYSTEM_DELIMITER

char gsystem::GSYSTEM_DELIMITER[] = "/"
inlineconstexpr

Definition at line 123 of file gsystemConventions.h.

◆ GSYSTEMASCIIFACTORYLABEL

char gsystem::GSYSTEMASCIIFACTORYLABEL[] = "ascii"
inlineconstexpr

Definition at line 135 of file gsystemConventions.h.

◆ GSYSTEMCADTFACTORYLABEL

char gsystem::GSYSTEMCADTFACTORYLABEL[] = "CAD"
inlineconstexpr

Definition at line 136 of file gsystemConventions.h.

◆ GSYSTEMCOMPONENTMATERIAL

char gsystem::GSYSTEMCOMPONENTMATERIAL[] = "Component"
inlineconstexpr

Material value marking a boolean-operation building block: the volume contributes its solid to solidsOpr operations but is never assigned a material or placed.

Definition at line 51 of file gsystemConventions.h.

◆ GSYSTEMGDMLTFACTORYLABEL

char gsystem::GSYSTEMGDMLTFACTORYLABEL[] = "GDML"
inlineconstexpr

Definition at line 137 of file gsystemConventions.h.

◆ GSYSTEMMYSQLTFACTORYLABEL

char gsystem::GSYSTEMMYSQLTFACTORYLABEL[] = "mysql"
inlineconstexpr

Definition at line 138 of file gsystemConventions.h.

◆ GSYSTEMSASCIISEARCHDIR

char gsystem::GSYSTEMSASCIISEARCHDIR[] = "."
inlineconstexpr

Definition at line 145 of file gsystemConventions.h.

◆ GSYSTEMSQLITETDEFAULTFILE

char gsystem::GSYSTEMSQLITETDEFAULTFILE[] = "gemc.db"
inlineconstexpr

Definition at line 142 of file gsystemConventions.h.

◆ GSYSTEMSQLITETFACTORYLABEL

char gsystem::GSYSTEMSQLITETFACTORYLABEL[] = "sqlite"
inlineconstexpr

Definition at line 139 of file gsystemConventions.h.

◆ GTEXTGEOMTYPE

char gsystem::GTEXTGEOMTYPE[] = "__geometry_"
inlineconstexpr

Definition at line 12 of file systemTextFactory.h.

◆ GTEXTMATSTYPE

char gsystem::GTEXTMATSTYPE[] = "__materials_"
inlineconstexpr

Definition at line 13 of file systemTextFactory.h.

◆ GTEXTMIRSTYPE

char gsystem::GTEXTMIRSTYPE[] = "__mirrors_"
inlineconstexpr

Definition at line 14 of file systemTextFactory.h.

◆ GVOLUMELEGACYNUMBEROFPARS

int gsystem::GVOLUMELEGACYNUMBEROFPARS = 21
inlineconstexpr

Definition at line 34 of file gsystemConventions.h.

◆ GVOLUMENUMBEROFPARS

int gsystem::GVOLUMENUMBEROFPARS = 22
inlineconstexpr

Number of database parameters defining a gvolume entry.

Definition at line 32 of file gsystemConventions.h.

◆ MOTHEROFUSALL

char gsystem::MOTHEROFUSALL[] = "akasha"
inlineconstexpr

Definition at line 120 of file gsystemConventions.h.

◆ ROOTDEFINITION

char gsystem::ROOTDEFINITION[] = "G4Box 15*m 15*m 15*m G4_AIR"
inlineconstexpr

Default ROOT/world volume definition string (type + dimensions + material).

Note
The type corresponds to a Geant4 solid type string (e.g. G4Box).

Definition at line 117 of file gsystemConventions.h.

◆ ROOTWORLDGVOLUMENAME

char gsystem::ROOTWORLDGVOLUMENAME[] = "root"
inlineconstexpr

Definition at line 113 of file gsystemConventions.h.