BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Data Fields | Private Member Functions
GMAD::Query Class Reference

Query structure class for parser. More...

#include <query.h>

Inheritance diagram for GMAD::Query:
Inheritance graph
Collaboration diagram for GMAD::Query:
Collaboration graph

Public Member Functions

 Query ()
 Constructor. More...
 
void clear ()
 Reset. More...
 
void print () const
 Print some properties. More...
 
template<typename T >
void set_value (std::string property, T value)
 Set methods by property name and value. More...
 
- Public Member Functions inherited from GMAD::Published< Query >
bool NameExists (const std::string &name) const
 
Published< Query >::template AttributeMap< T > & attribute_map () const
 

Data Fields

std::string name
 Name of object. More...
 
int nx
 Number of samples in x. More...
 
int ny
 Number of samples in y. More...
 
int nz
 Number of samples in z. More...
 
int nt
 Number of samples in t. More...
 
double xmin
 X start. More...
 
double xmax
 X finish. More...
 
double ymin
 Y start. More...
 
double ymax
 Y finish. More...
 
double zmin
 Z start. More...
 
double zmax
 Z finish. More...
 
double tmin
 T start. More...
 
double tmax
 T finish. More...
 
std::string outfileMagnetic
 Output file name. More...
 
std::string outfileElectric
 
std::string fieldObject
 Name of field to query. More...
 
bool queryMagneticField
 Whether to query the magnetic field. More...
 
bool queryElectricField
 Whether to query the electric field. More...
 
bool overwriteExistingFiles
 
bool printTransform
 
bool drawArrows
 
bool drawZeroValuePoints
 
bool drawBoxes
 
double boxAlpha
 
std::string pointsFile
 File with 3D points to use. More...
 
std::string referenceElement
 Name of reference element w.r.t. to place to. More...
 
int referenceElementNumber
 Index of repetition of element if there are multiple uses. More...
 
double s
 Curvilinear s position to place w.r.t.. More...
 
double x
 Offset in x. More...
 
double y
 Offset in y. More...
 
double z
 
bool axisAngle
 Flag to use the axis angle construction of rotation. More...
 
bool checkParameters
 
double phi
 Euler angle for rotation. More...
 
double theta
 Euler angle for rotation. More...
 
double psi
 Euler angle for rotation. More...
 
double axisX
 
double axisY
 
double axisZ
 
double angle
 

Private Member Functions

void PublishMembers ()
 publish members More...
 

Additional Inherited Members

- Protected Types inherited from GMAD::Published< Query >
using AttributeMap = typename std::unordered_map< std::string, T C::* >
 Define AttributeMap of string and class member pointer. More...
 
- Protected Member Functions inherited from GMAD::Published< Query >
void publish (const std::string &name, T C::*mp)
 Make pointer to member from class C and type T with accessible with a name. More...
 
void set (Query *instance, const Query *instance2, const std::string &name)
 Set member with name of class instance to value of second instance. More...
 
AttributeMap< T > & attribute_map () const
 Access method to static map for type T and class C.
 
get (const Query *instance, const std::string &name) const
 Get method for class C. More...
 
void set (Query *instance, const std::string &name, double value)
 
void set (Query *instance, const std::string &name, GMAD::Array *const &value)
 
void set (Query *instance, const std::string &name, const T &value)
 

Detailed Description

Query structure class for parser.

Author
Laurie Nevay

Definition at line 36 of file query.h.

Constructor & Destructor Documentation

◆ Query()

Query::Query ( )

Constructor.

Definition at line 23 of file query.cc.

References clear(), and PublishMembers().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Query::clear ( )

Reset.

Definition at line 29 of file query.cc.

References angle, axisAngle, axisX, axisY, axisZ, checkParameters, fieldObject, name, nt, nx, ny, nz, outfileMagnetic, phi, pointsFile, psi, queryElectricField, queryMagneticField, referenceElement, referenceElementNumber, s, theta, tmax, tmin, x, xmax, xmin, y, ymax, ymin, z, zmax, and zmin.

Referenced by Query().

Here is the caller graph for this function:

◆ print()

void Query::print ( ) const

◆ PublishMembers()

void Query::PublishMembers ( )
private

publish members

Definition at line 79 of file query.cc.

References angle, axisAngle, axisX, axisY, axisZ, checkParameters, fieldObject, name, nt, nx, ny, nz, outfileMagnetic, phi, pointsFile, psi, GMAD::Published< Query >::publish(), queryElectricField, queryMagneticField, referenceElement, referenceElementNumber, s, theta, tmax, tmin, x, xmax, xmin, y, ymax, ymin, z, zmax, and zmin.

Referenced by Query().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_value()

template<typename T >
void GMAD::Query::set_value ( std::string  property,
value 
)

Set methods by property name and value.

Definition at line 109 of file query.h.

References GMAD::Published< Query >::set().

Here is the call graph for this function:

Field Documentation

◆ angle

double GMAD::Query::angle

Axis angle rotation.

Definition at line 85 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ axisAngle

bool GMAD::Query::axisAngle

Flag to use the axis angle construction of rotation.

Definition at line 87 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ axisX

double GMAD::Query::axisX

Axis angle rotation.

Definition at line 82 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ axisY

double GMAD::Query::axisY

Axis angle rotation.

Definition at line 83 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ axisZ

double GMAD::Query::axisZ

Axis angle rotation.

Definition at line 84 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ boxAlpha

double GMAD::Query::boxAlpha

Definition at line 65 of file query.h.

◆ checkParameters

bool GMAD::Query::checkParameters

For internal use to speed up testing - we use degenerate input for bdsim and bdsinterpolator and want to avoid warnings that slow things down, so allow us to bypass it. Not documented.

Definition at line 91 of file query.h.

Referenced by clear(), and PublishMembers().

◆ drawArrows

bool GMAD::Query::drawArrows

Definition at line 62 of file query.h.

◆ drawBoxes

bool GMAD::Query::drawBoxes

Definition at line 64 of file query.h.

◆ drawZeroValuePoints

bool GMAD::Query::drawZeroValuePoints

Definition at line 63 of file query.h.

◆ fieldObject

std::string GMAD::Query::fieldObject

Name of field to query.

Definition at line 54 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ name

std::string GMAD::Query::name

Name of object.

Definition at line 39 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ nt

int GMAD::Query::nt

Number of samples in t.

Definition at line 43 of file query.h.

Referenced by clear(), and PublishMembers().

◆ nx

int GMAD::Query::nx

Number of samples in x.

Definition at line 40 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ ny

int GMAD::Query::ny

Number of samples in y.

Definition at line 41 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ nz

int GMAD::Query::nz

Number of samples in z.

Definition at line 42 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ outfileElectric

std::string GMAD::Query::outfileElectric

Definition at line 53 of file query.h.

◆ outfileMagnetic

std::string GMAD::Query::outfileMagnetic

Output file name.

Definition at line 52 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ overwriteExistingFiles

bool GMAD::Query::overwriteExistingFiles

Definition at line 59 of file query.h.

◆ phi

double GMAD::Query::phi

Euler angle for rotation.

Definition at line 77 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ pointsFile

std::string GMAD::Query::pointsFile

File with 3D points to use.

Definition at line 67 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ printTransform

bool GMAD::Query::printTransform

Definition at line 60 of file query.h.

◆ psi

double GMAD::Query::psi

Euler angle for rotation.

Definition at line 79 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ queryElectricField

bool GMAD::Query::queryElectricField

Whether to query the electric field.

Definition at line 57 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ queryMagneticField

bool GMAD::Query::queryMagneticField

Whether to query the magnetic field.

Definition at line 56 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ referenceElement

std::string GMAD::Query::referenceElement

Name of reference element w.r.t. to place to.

Definition at line 70 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ referenceElementNumber

int GMAD::Query::referenceElementNumber

Index of repetition of element if there are multiple uses.

Definition at line 71 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ s

double GMAD::Query::s

Curvilinear s position to place w.r.t..

Definition at line 72 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ theta

double GMAD::Query::theta

Euler angle for rotation.

Definition at line 78 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ tmax

double GMAD::Query::tmax

T finish.

Definition at line 51 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ tmin

double GMAD::Query::tmin

T start.

Definition at line 50 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ x

double GMAD::Query::x

Offset in x.

Definition at line 73 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ xmax

double GMAD::Query::xmax

X finish.

Definition at line 45 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ xmin

double GMAD::Query::xmin

X start.

Definition at line 44 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ y

double GMAD::Query::y

Offset in y.

Definition at line 74 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ ymax

double GMAD::Query::ymax

Y finish.

Definition at line 47 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ ymin

double GMAD::Query::ymin

Y start.

Definition at line 46 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ z

double GMAD::Query::z

Offset in z.

Definition at line 75 of file query.h.

Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().

◆ zmax

double GMAD::Query::zmax

Z finish.

Definition at line 49 of file query.h.

Referenced by clear(), print(), and PublishMembers().

◆ zmin

double GMAD::Query::zmin

Z start.

Definition at line 48 of file query.h.

Referenced by clear(), print(), and PublishMembers().


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