BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Query structure class for parser. More...
#include <query.h>
Public Member Functions | |
Query () | |
Constructor. | |
void | clear () |
Reset. | |
void | print () const |
Print some properties. | |
template<typename T > | |
void | set_value (std::string property, T value) |
Set methods by property name and value. | |
![]() | |
bool | NameExists (const std::string &name) const |
Published< Query >::template AttributeMap< T > & | attribute_map () const |
Data Fields | |
std::string | name |
Name of object. | |
int | nx |
Number of samples in x. | |
int | ny |
Number of samples in y. | |
int | nz |
Number of samples in z. | |
int | nt |
Number of samples in t. | |
double | xmin |
X start. | |
double | xmax |
X finish. | |
double | ymin |
Y start. | |
double | ymax |
Y finish. | |
double | zmin |
Z start. | |
double | zmax |
Z finish. | |
double | tmin |
T start. | |
double | tmax |
T finish. | |
std::string | outfileMagnetic |
Output file name. | |
std::string | outfileElectric |
std::string | fieldObject |
Name of field to query. | |
bool | queryMagneticField |
Whether to query the magnetic field. | |
bool | queryElectricField |
Whether to query the electric field. | |
bool | overwriteExistingFiles |
bool | printTransform |
bool | drawArrows |
bool | drawZeroValuePoints |
bool | drawBoxes |
double | boxAlpha |
std::string | pointsFile |
File with 3D points to use. | |
std::string | referenceElement |
Name of reference element w.r.t. to place to. | |
int | referenceElementNumber |
Index of repetition of element if there are multiple uses. | |
double | s |
Curvilinear s position to place w.r.t.. | |
double | x |
Offset in x. | |
double | y |
Offset in y. | |
double | z |
bool | axisAngle |
Flag to use the axis angle construction of rotation. | |
bool | checkParameters |
double | phi |
Euler angle for rotation. | |
double | theta |
Euler angle for rotation. | |
double | psi |
Euler angle for rotation. | |
double | axisX |
double | axisY |
double | axisZ |
double | angle |
Private Member Functions | |
void | PublishMembers () |
publish members | |
Additional Inherited Members | |
![]() | |
using | AttributeMap = typename std::unordered_map< std::string, T C::* > |
Define AttributeMap of string and class member pointer. | |
![]() | |
void | publish (const std::string &name, T C::*mp) |
Make pointer to member from class C and type T with accessible with a name. | |
void | set (Query *instance, const Query *instance2, const std::string &name) |
Set member with name of class instance to value of second instance. | |
AttributeMap< T > & | attribute_map () const |
Access method to static map for type T and class C. | |
T | get (const Query *instance, const std::string &name) const |
Get method for class C. | |
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) |
Query::Query | ( | ) |
Constructor.
Definition at line 23 of file query.cc.
References clear(), and PublishMembers().
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().
void Query::print | ( | ) | const |
Print some properties.
Definition at line 129 of file query.cc.
References angle, axisAngle, axisX, axisY, axisZ, fieldObject, name, 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.
|
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().
void GMAD::Query::set_value | ( | std::string | property, |
T | value | ||
) |
Set methods by property name and value.
Definition at line 109 of file query.h.
References GMAD::Published< Query >::set().
double GMAD::Query::angle |
Axis angle rotation.
Definition at line 85 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
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().
double GMAD::Query::axisX |
Axis angle rotation.
Definition at line 82 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::Query::axisY |
Axis angle rotation.
Definition at line 83 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::Query::axisZ |
Axis angle rotation.
Definition at line 84 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
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().
std::string GMAD::Query::fieldObject |
Name of field to query.
Definition at line 54 of file query.h.
Referenced by clear(), print(), and PublishMembers().
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().
int GMAD::Query::nt |
Number of samples in t.
Definition at line 43 of file query.h.
Referenced by clear(), and PublishMembers().
int GMAD::Query::nx |
Number of samples in x.
Definition at line 40 of file query.h.
Referenced by clear(), print(), and PublishMembers().
int GMAD::Query::ny |
Number of samples in y.
Definition at line 41 of file query.h.
Referenced by clear(), print(), and PublishMembers().
int GMAD::Query::nz |
Number of samples in z.
Definition at line 42 of file query.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Query::outfileMagnetic |
Output file name.
Definition at line 52 of file query.h.
Referenced by clear(), print(), and PublishMembers().
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().
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().
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().
bool GMAD::Query::queryElectricField |
Whether to query the electric field.
Definition at line 57 of file query.h.
Referenced by clear(), print(), and PublishMembers().
bool GMAD::Query::queryMagneticField |
Whether to query the magnetic field.
Definition at line 56 of file query.h.
Referenced by clear(), print(), and PublishMembers().
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().
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().
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().
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().
double GMAD::Query::tmax |
T finish.
Definition at line 51 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::tmin |
T start.
Definition at line 50 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::x |
Offset in x.
Definition at line 73 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::Query::xmax |
X finish.
Definition at line 45 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::xmin |
X start.
Definition at line 44 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::y |
Offset in y.
Definition at line 74 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::Query::ymax |
Y finish.
Definition at line 47 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::ymin |
Y start.
Definition at line 46 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::z |
Offset in z.
Definition at line 75 of file query.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::Query::zmax |
Z finish.
Definition at line 49 of file query.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Query::zmin |
Z start.
Definition at line 48 of file query.h.
Referenced by clear(), print(), and PublishMembers().