gsystem
Loading...
Searching...
No Matches
GModifier Class Reference

Describes a post-load modification to a single volume. More...

#include <gmodifier.h>

Public Member Functions

 GModifier (const std::string &n, const std::string &s, const std::string &t, bool existence)
 Construct a modifier record.
 
 GModifier (const GModifier &other)=default
 Default copy constructor (value-object semantics).
 
std::string getName ()
 Returns the modifier target volume name.
 
std::string getShift ()
 Returns the configured shift expression.
 
std::string getTilts ()
 Returns the configured tilt expression.
 
bool getExistence () const
 Returns whether the target volume should exist in the final world.
 

Friends

std::ostream & operator<< (std::ostream &stream, const GModifier &gm)
 Stream operator for logging/debug printing.
 

Detailed Description

A GModifier is a small value-object that carries optional adjustments that will be applied to a target volume after it is loaded by a GSystemFactory and inserted into a GSystem.

Typical uses include:

  • applying an additional translation ("shift") to a volume placement;
  • applying an additional rotation ("tilts") to a volume placement;
  • toggling the existence flag (remove a volume from the world).
Note
This class is intentionally minimal: it stores the modifier values and provides trivial getters. It does not apply the modifications itself.

Definition at line 23 of file gmodifier.h.

Constructor & Destructor Documentation

◆ GModifier() [1/2]

GModifier::GModifier ( const std::string & n,
const std::string & s,
const std::string & t,
bool existence )
inline
Parameters
nThe target volume name. This must match the key used to find the volume within the world (typically the volume name as stored in the geometry).
sThe shift expression to apply (e.g. "0*cm, 0*cm, 1*cm"), or GSYSTEMNOMODIFIER when not used.
tThe tilt expression to apply (e.g. "0*deg, 0*deg, -10*deg"), or GSYSTEMNOMODIFIER when not used.
existenceExistence toggle: true means the volume is present, false means it should be removed/disabled.

Definition at line 38 of file gmodifier.h.

◆ GModifier() [2/2]

GModifier::GModifier ( const GModifier & other)
default

Member Function Documentation

◆ getExistence()

bool GModifier::getExistence ( ) const
inline

Definition at line 77 of file gmodifier.h.

◆ getName()

std::string GModifier::getName ( )
inline

Definition at line 68 of file gmodifier.h.

◆ getShift()

std::string GModifier::getShift ( )
inline

Definition at line 71 of file gmodifier.h.

◆ getTilts()

std::string GModifier::getTilts ( )
inline

Definition at line 74 of file gmodifier.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const GModifier & gm )
friend

Prints a compact representation of the modifier so that callers can include it in logger output.

Definition at line 60 of file gmodifier.h.


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