BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Data Structures | Enumerations | Functions | Variables
GMAD Namespace Reference

Parser namespace for GMAD language. Combination of Geant4 and MAD. More...

Data Structures

class  Aperture
 Aperture class. More...
 
class  Array
 Representation of arrays used in tokens. More...
 
struct  Atom
 Atom class. More...
 
class  Beam
 Beam class. More...
 
class  BeamBase
 Options for a beam distribution. More...
 
class  BLMPlacement
 blm for parser. More...
 
class  CavityModel
 RF CavityModel class for parser. More...
 
class  Crystal
 Crystal class for parser. More...
 
struct  Element
 Element class. More...
 
class  FastList
 List with Efficient Lookup. More...
 
class  Field
 Field class for parser. More...
 
struct  Material
 Material class. More...
 
class  NewColour
 Colour definition for parser. More...
 
class  Options
 Options class. More...
 
class  OptionsBase
 Basic options class independent of Geant4. More...
 
struct  Parameters
 Parameters - Element class with booleans. More...
 
class  Parser
 Parser class. More...
 
class  PhysicsBiasing
 Physics biasing class for parser. More...
 
class  Placement
 Placement class for parser. More...
 
class  Published
 Class that provides introspection to its members. More...
 
class  Query
 Query structure class for parser. More...
 
class  Region
 Region class for parser. More...
 
class  SamplerPlacement
 Sampler placement class for parser. More...
 
class  Scorer
 Scorer class for parser. More...
 
class  ScorerMesh
 ScorerMesh class for parser. More...
 
class  SymbolMap
 Class that hold the symbol table. More...
 
class  Symtab
 Common header for the lexer and the parser to share Symbol table for numeric variables, strings, arrays and functions. More...
 
class  Tunnel
 Tunnel class for parser. More...
 

Enumerations

enum class  ElementType {
  _NONE = -1 , _MARKER = 1 , _DRIFT = 2 , _RF = 3 ,
  _SBEND = 4 , _QUAD = 5 , _SEXTUPOLE = 6 , _OCTUPOLE = 7 ,
  _DECAPOLE = 8 , _MULT = 9 , _SOLENOID = 10 , _LINE = 11 ,
  _REV_LINE = -11 , _ECOL = 13 , _RCOL = 14 , _LASER = 15 ,
  _MATERIAL = 16 , _RBEND = 17 , _ELEMENT = 20 , _SCREEN = 21 ,
  _AWAKESCREEN = 22 , _AWAKESPECTROMETER = 23 , _SHIELD = 24 , _VKICKER = 31 ,
  _HKICKER = 32 , _KICKER = 33 , _TKICKER = 34 , _TRANSFORM3D = 61 ,
  _MUONSPOILER = 62 , _DEGRADER = 63 , _THINMULT = 64 , _GAP = 65 ,
  _THINRMATRIX = 66 , _PARALLELTRANSPORTER = 67 , _RMATRIX = 68 , _CRYSTALCOL = 69 ,
  _UNDULATOR = 70 , _JCOL = 71 , _WIRESCANNER = 72 , _USERCOMPONENT = 73 ,
  _DUMP = 74 , _CT = 75 , _TARGET = 76
}
 types of elements More...
 
enum class  PhysicsBiasingType { ALL =1 , PRIMARY =2 , SECONDARY =3 }
 

Functions

std::string typestr (ElementType type)
 conversion from enum to string More...
 
std::ostream & operator<< (std::ostream &out, ElementType type)
 output operator More...
 
std::vector< std::string > include_filename_stack (max_include_depth)
 
int GmadParser_c (char *name)
 
int GetNElements ()
 Length of list. More...
 
int GetType (int)
 Type of element. More...
 
const char * GetName (int)
 Name of element. More...
 
double GetLength (int)
 Length of element. More...
 
double GetAngle (int)
 Angle of element. More...
 
double * GetKs (int)
 All magnetic ks. More...
 
double GetAper1 (int)
 Aperture 1. More...
 
double GetAper2 (int)
 Aperture 2. More...
 
double GetAper3 (int)
 Aperture 3. More...
 
double GetAper4 (int)
 Aperture 4. More...
 
const char * GetApertureType (int)
 Aperture Type. More...
 
double GetBeampipeThickness (int)
 Beam Pipe Thickness. More...
 

Variables

bool willExit
 
std::string yyfilename
 
const int max_include_depth = 10
 
YY_BUFFER_STATE include_stack [max_include_depth]
 
int include_linenum_stack [max_include_depth]
 
int include_stack_ptr = 0
 
int line_num = 1
 

Detailed Description

Parser namespace for GMAD language. Combination of Geant4 and MAD.

Author
Jochem Snuverink

Enumeration Type Documentation

◆ ElementType

enum class GMAD::ElementType
strong

types of elements

Definition at line 28 of file elementtype.h.

◆ PhysicsBiasingType

enum class GMAD::PhysicsBiasingType
strong

Definition at line 33 of file physicsbiasing.h.

Function Documentation

◆ GetAngle()

double GMAD::GetAngle ( int  i)

Angle of element.

Definition at line 59 of file python.cc.

◆ GetAper1()

double GMAD::GetAper1 ( int  i)

Aperture 1.

Definition at line 79 of file python.cc.

◆ GetAper2()

double GMAD::GetAper2 ( int  i)

Aperture 2.

Definition at line 86 of file python.cc.

◆ GetAper3()

double GMAD::GetAper3 ( int  i)

Aperture 3.

Definition at line 93 of file python.cc.

◆ GetAper4()

double GMAD::GetAper4 ( int  i)

Aperture 4.

Definition at line 100 of file python.cc.

◆ GetApertureType()

const char * GMAD::GetApertureType ( int  i)

Aperture Type.

Definition at line 107 of file python.cc.

◆ GetBeampipeThickness()

double GMAD::GetBeampipeThickness ( int  i)

Beam Pipe Thickness.

Definition at line 114 of file python.cc.

◆ GetKs()

double * GMAD::GetKs ( int  i)

All magnetic ks.

Definition at line 66 of file python.cc.

◆ GetLength()

double GMAD::GetLength ( int  i)

Length of element.

Definition at line 52 of file python.cc.

◆ GetName()

const char * GMAD::GetName ( int  i)

Name of element.

Definition at line 38 of file python.cc.

◆ GetNElements()

int GMAD::GetNElements ( )

Length of list.

Definition at line 33 of file python.cc.

◆ GetType()

int GMAD::GetType ( int  i)

Type of element.

Definition at line 45 of file python.cc.

◆ GmadParser_c()

int GMAD::GmadParser_c ( char *  name)

Python interface

Python interface, need to match pybdsim/Gmad.py

Definition at line 27 of file python.cc.

◆ operator<<()

std::ostream & GMAD::operator<< ( std::ostream &  out,
ElementType  type 
)

output operator

Definition at line 24 of file elementtype.cc.

References typestr().

Here is the call graph for this function:

◆ typestr()

std::string GMAD::typestr ( ElementType  type)

conversion from enum to string

Definition at line 29 of file elementtype.cc.

Referenced by operator<<(), and BDSComponentFactory::PrepareColour().

Here is the caller graph for this function:

Variable Documentation

◆ include_linenum_stack

int GMAD::include_linenum_stack[max_include_depth]

Definition at line 63 of file parser.l.

◆ include_stack

YY_BUFFER_STATE GMAD::include_stack[max_include_depth]

Definition at line 61 of file parser.l.

◆ include_stack_ptr

int GMAD::include_stack_ptr = 0

Definition at line 64 of file parser.l.

◆ line_num

int GMAD::line_num = 1

Definition at line 66 of file parser.l.

◆ max_include_depth

const int GMAD::max_include_depth = 10

Definition at line 60 of file parser.l.

◆ yyfilename

std::string GMAD::yyfilename

Definition at line 67 of file parser.l.