gsystem
Loading...
Searching...
No Matches
gsystemConventions.h File Reference

Conventions and shared constants for the detector-system module. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

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.

#define GVOLUMENUMBEROFPARS   21
 
#define GMATERIALNUMBEROFPARS   18
 Number of database parameters defining a gmaterial 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.

#define DEFAULTPOSITION   "0*cm, 0*cm, 0*cm"
 
#define DEFAULTROTATION   "0*deg, 0*deg, 0*deg"
 
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.

#define ERR_GVOLUMEALREADYPRESENT   201
 
#define ERR_GWRONGNUMBEROFPARS   202
 
#define ERR_GSETUPFILENOTOFOUND   203
 
#define ERR_GVOLUMENOTFOUND   204
 
#define ERR_GDIRNOTFOUND   205
 
#define ERR_GMATERIALOPTICALPROPERTYMISMATCH   206
 
#define ERR_GMATERIALNOTFOUND   207
 
#define ERR_GVOLUMENAMECONTAINSINVALID   208
 
#define ERR_GSQLITEERROR   209
 
#define ERR_GMATERIALALREADYPRESENT   210
 
#define ERR_EXPERIMENTNOTFOUND   211
 
Modifier conventions

Sentinel values used when no modifier is requested.

#define GSYSTEMNOMODIFIER   "noModifier"
 
Environment and naming conventions

Shared names used across factories and core types.

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

Identifiers used in configuration to select concrete factories.

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

Detailed Description

This header centralizes:

  • geometry/material row sizes used by database-backed factories;
  • default placement/rotation strings for ROOT/world volumes;
  • common error codes used by geometry/material loaders;
  • factory labels and naming conventions.

Assumptions:

  • Volumes and materials in each system must have a unique name.

Definition in file gsystemConventions.h.

Macro Definition Documentation

◆ DEFAULTPOSITION

#define DEFAULTPOSITION   "0*cm, 0*cm, 0*cm"

Definition at line 48 of file gsystemConventions.h.

◆ DEFAULTROTATION

#define DEFAULTROTATION   "0*deg, 0*deg, 0*deg"

Definition at line 49 of file gsystemConventions.h.

◆ ERR_EXPERIMENTNOTFOUND

#define ERR_EXPERIMENTNOTFOUND   211

Definition at line 74 of file gsystemConventions.h.

◆ ERR_GDIRNOTFOUND

#define ERR_GDIRNOTFOUND   205

Definition at line 68 of file gsystemConventions.h.

◆ ERR_GMATERIALALREADYPRESENT

#define ERR_GMATERIALALREADYPRESENT   210

Definition at line 73 of file gsystemConventions.h.

◆ ERR_GMATERIALNOTFOUND

#define ERR_GMATERIALNOTFOUND   207

Definition at line 70 of file gsystemConventions.h.

◆ ERR_GMATERIALOPTICALPROPERTYMISMATCH

#define ERR_GMATERIALOPTICALPROPERTYMISMATCH   206

Definition at line 69 of file gsystemConventions.h.

◆ ERR_GSETUPFILENOTOFOUND

#define ERR_GSETUPFILENOTOFOUND   203

Definition at line 66 of file gsystemConventions.h.

◆ ERR_GSQLITEERROR

#define ERR_GSQLITEERROR   209

Definition at line 72 of file gsystemConventions.h.

◆ ERR_GVOLUMEALREADYPRESENT

#define ERR_GVOLUMEALREADYPRESENT   201

Definition at line 64 of file gsystemConventions.h.

◆ ERR_GVOLUMENAMECONTAINSINVALID

#define ERR_GVOLUMENAMECONTAINSINVALID   208

Definition at line 71 of file gsystemConventions.h.

◆ ERR_GVOLUMENOTFOUND

#define ERR_GVOLUMENOTFOUND   204

Definition at line 67 of file gsystemConventions.h.

◆ ERR_GWRONGNUMBEROFPARS

#define ERR_GWRONGNUMBEROFPARS   202

Definition at line 65 of file gsystemConventions.h.

◆ GEMCDB_ENV

#define GEMCDB_ENV   "GEMCDB_ENV"

Environment variable name used by GEMC database tooling.

Definition at line 100 of file gsystemConventions.h.

◆ GMATERIALNUMBEROFPARS

#define GMATERIALNUMBEROFPARS   18

Definition at line 32 of file gsystemConventions.h.

◆ GSYSTEM_DELIMITER

#define GSYSTEM_DELIMITER   "/"

Definition at line 113 of file gsystemConventions.h.

◆ GSYSTEMASCIIFACTORYLABEL

#define GSYSTEMASCIIFACTORYLABEL   "ascii"

Definition at line 125 of file gsystemConventions.h.

◆ GSYSTEMCADTFACTORYLABEL

#define GSYSTEMCADTFACTORYLABEL   "CAD"

Definition at line 126 of file gsystemConventions.h.

◆ GSYSTEMGDMLTFACTORYLABEL

#define GSYSTEMGDMLTFACTORYLABEL   "GDML"

Definition at line 127 of file gsystemConventions.h.

◆ GSYSTEMMYSQLTFACTORYLABEL

#define GSYSTEMMYSQLTFACTORYLABEL   "mysql"

Definition at line 128 of file gsystemConventions.h.

◆ GSYSTEMNOMODIFIER

#define GSYSTEMNOMODIFIER   "noModifier"

Special string used to represent “no modifier is requested”.

Definition at line 87 of file gsystemConventions.h.

◆ GSYSTEMSASCIISEARCHDIR

#define GSYSTEMSASCIISEARCHDIR   "."

Definition at line 135 of file gsystemConventions.h.

◆ GSYSTEMSQLITETDEFAULTFILE

#define GSYSTEMSQLITETDEFAULTFILE   "gemc.db"

Definition at line 132 of file gsystemConventions.h.

◆ GSYSTEMSQLITETFACTORYLABEL

#define GSYSTEMSQLITETFACTORYLABEL   "sqlite"

Definition at line 129 of file gsystemConventions.h.

◆ GVOLUMENUMBEROFPARS

#define GVOLUMENUMBEROFPARS   21

Number of database parameters defining a gvolume entry.

Definition at line 30 of file gsystemConventions.h.

◆ MOTHEROFUSALL

#define MOTHEROFUSALL   "akasha"

Definition at line 110 of file gsystemConventions.h.

◆ ROOTDEFINITION

#define ROOTDEFINITION   "G4Box 15*m 15*m 15*m G4_AIR"

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 107 of file gsystemConventions.h.

◆ ROOTWORLDGVOLUMENAME

#define ROOTWORLDGVOLUMENAME   "root"

Definition at line 103 of file gsystemConventions.h.