Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
geomtools::gdml_writer Class Reference

GDML writer class used by the geomtools GDML export functionalities. More...

#include <bayeux/geomtools/gdml_writer.h>

Classes

class  physvol
 Description of a physical volume. More...
 
class  replicavol
 Description of a replica volume. More...
 

Public Types

typedef std::map< std::string, std::ostringstream * > streams_col_type
 Dictionary of output stream associated by section name. More...
 

Public Member Functions

bool is_initialized () const
 Check initialization flag. More...
 
bool is_verbose () const
 Check verbosity flag. More...
 
void set_verbose (bool)
 Set verbosity flag. More...
 
void set_using_html_symbols (bool u_)
 Set flag for using HTML symbol. More...
 
bool is_using_html_symbols () const
 Check flag for using HTML symbol. More...
 
const std::ostringstream & get_stream (const std::string &section_) const
 Return output stream associated to a GDML section. More...
 
void attach_external_materials (const std::ostringstream &oss_)
 Attach an external output stream dedicated to GDML description of materials. More...
 
bool has_external_materials_stream () const
 Check if an external output stream dedicated to GDML description of materials is defined. More...
 
void reset_external_materials_stream ()
 Detach the external output stream dedicated to GDML description of materials. More...
 
 gdml_writer ()
 Default constructor. More...
 
virtual ~gdml_writer ()
 Destructor. More...
 
void init ()
 Initialize. More...
 
void initialize ()
 Initialize. More...
 
void reset ()
 Reset. More...
 
void add_constant (const std::string &name_, double value_)
 
void add_quantity (const std::string &name_, const std::string &quantity_type_, const std::string &unit_str_, double value_)
 
void add_variable (const std::string &name_, double value_)
 
void add_variable (const std::string &name_, const std::string &expr_value_)
 
void add_position (const std::string &name_, double x_, double y_, double z_, const std::string &unit_str_)
 
void add_position (const std::string &name_, const std::string &x_str_, const std::string &y_str_, const std::string &z_str_, const std::string &unit_str_)
 
void add_position (const std::string &name_, const vector_3d &v_, const std::string &unit_str_)
 
void add_rotation (const std::string &name_, const std::string &axis_, double angle_, const std::string &unit_str_)
 
void add_rotation (const std::string &name_, const rotation_3d &rot_, const std::string &unit_str_)
 
void add_scale (const std::string &name_, double x_, double y_, double z_)
 
void add_isotope (const std::string &name_, size_t atomic_number_, size_t number_of_nucleons_, double a_)
 
void add_element (const std::string &name_, size_t atomic_number_, const std::string &formula_, double a_)
 
void add_element (const std::string &name_, const std::map< std::string, double > &fractions_)
 
void add_element (const std::string &name_, const std::string &ref_)
 
void add_element (const std::string &name_, const std::string &ref1_, double fraction1_, const std::string &ref2_, double fraction2_)
 
void add_element (const std::string &name_, const std::string &ref1_, double fraction1_, const std::string &ref2_, double fraction2_, const std::string &ref3_, double fraction3_)
 
void add_element (const std::string &name_, const std::string &ref1_, double fraction1_, const std::string &ref2_, double fraction2_, const std::string &ref3_, double fraction3_, const std::string &ref4_, double fraction4_)
 
void add_element (const std::string &name_, const std::string &ref1_, double fraction1_, const std::string &ref2_, double fraction2_, const std::string &ref3_, double fraction3_, const std::string &ref4_, double fraction4_, const std::string &ref5_, double fraction5_)
 
void add_material (const std::string &name_, double atomic_number_, double density_, double a_, const std::string &state_label_="", double temperature_=std::numeric_limits< double >::quiet_NaN(), double pressure_=std::numeric_limits< double >::quiet_NaN())
 
void add_material (const std::string &name_, const std::string &formula_, double density_, const std::map< std::string, size_t > &composites_, const std::string &state_label_="", double temperature_=std::numeric_limits< double >::quiet_NaN(), double pressure_=std::numeric_limits< double >::quiet_NaN())
 
void add_material (const std::string &name_, const std::string &formula_, double density_, const std::map< std::string, double > &fractions_, const std::string &state_label_="", double temperature_=std::numeric_limits< double >::quiet_NaN(), double pressure_=std::numeric_limits< double >::quiet_NaN())
 
void add_gdml_box (const std::string &name_, double x_, double y_, double z_, const std::string &lunit_str_="mm")
 
void add_box (const std::string &name_, const box &b_, const std::string &lunit_str_="mm")
 
void add_gdml_cone_segment (const std::string &name_, double rmin1_, double rmax1_, double rmin2_, double rmax2_, double z_, double startphi_, double deltaphi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_cone_segment (const std::string &name_, const right_circular_conical_frustrum &cf_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_ellipsoid (const std::string &name_, double rx_, double ry, double rz_, double bottom_z_, double top_z_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_ellipsoid (const std::string &name_, const ellipsoid &e_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_elliptical_tube (const std::string &name_, double rx_, double ry, double z_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_elliptical_tube (const std::string &name_, const elliptical_cylinder &t_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_orb (const std::string &name_, double r_, const std::string &lunit_str_="mm")
 
void add_orb (const std::string &name_, const sphere &s_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_polycone (const std::string &name_, std::map< double, std::pair< double, double > > zplanes_, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_polycone (const std::string &name_, const polycone &s_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_generic_polycone (const std::string &name_, std::map< double, double > rzpoints_, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_polyhedra (const std::string &name_, size_t num_sides_, std::map< double, std::pair< double, double > > zplanes_, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_polyhedra (const std::string &name_, const polyhedra &s_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_generic_polyhedra (const std::string &name_, size_t num_sides_, std::map< double, double > rzpoints_, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_sphere (const std::string &name_, double rmin_, double rmax, double start_phi_, double delta_phi_, double start_theta_, double delta_theta_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_sphere (const std::string &name_, const sphere &s_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_tube (const std::string &name_, double rmin_, double rmax, double z_, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_tube (const std::string &name_, const tube &t_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_gdml_torus (const std::string &name_, double rsweep_, double rmin_, double rmax, double start_phi_, double delta_phi_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_torus (const std::string &name_, const torus &t_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_cylinder (const std::string &name_, const cylinder &c_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_tessellated (const std::string &name_, const tessellated_solid &ts_, const std::string &lunit_str_="mm")
 
void add_wall (const std::string &name_, const wall_solid &ts_, const std::string &lunit_str_="mm")
 
void add_gdml_boolean (const std::string &name_, const std::string &boolean_type_, const std::string &first_ref_, const std::string &second_ref_, const std::string &position_ref_, const std::string &rotation_ref_)
 
void add_gdml_union (const std::string &name_, const std::string &first_ref_, const std::string &second_ref_, const std::string &position_ref_, const std::string &rotation_ref_)
 
void add_gdml_subtraction (const std::string &name_, const std::string &first_ref_, const std::string &second_ref_, const std::string &position_ref_, const std::string &rotation_ref_)
 
void add_gdml_intersection (const std::string &name_, const std::string &first_ref_, const std::string &second_ref_, const std::string &position_ref_, const std::string &rotation_ref_)
 
void add_volume_auxiliaries (const std::map< std::string, std::string > &aux_)
 
void add_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_, const std::map< std::string, std::string > &aux_)
 
void add_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_)
 
void add_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_, const std::list< physvol > &phys_vols_, const std::map< std::string, std::string > &aux_)
 
void add_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_, const std::list< physvol > &phys_vols_)
 
void add_replica_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_, const replicavol &replicavol_, const std::string &lunit_str_, const std::string &aunit_str_, const std::map< std::string, std::string > &aux_)
 
void add_replica_volume (const std::string &name_, const std::string &material_ref_, const std::string &solid_ref_, const replicavol &replicavol_, const std::string &lunit_str_="mm", const std::string &aunit_str_="radian")
 
void add_setup (const std::string &name_, const std::string &world_ref_, const std::string &version_="1.0")
 
void xml_header (std::ostream &, const std::string &xml_version_="", const std::string &xml_encoding_="", bool standalone_=false)
 
void gdml_begin (std::ostream &, const std::string &schema_="", const std::string &xsi_="<default>")
 
void gdml_end (std::ostream &)
 
void gdml_section_begin (std::ostream &, const std::string &section_)
 
void gdml_section_end (std::ostream &, const std::string &section_)
 
void full_write (std::ostream &out_, const std::string &version_="", const std::string &encoding_="", const std::string &schema_="", const std::string &xsi_="<default>")
 Write the full GDML description in an output stream. More...
 
void save_file (const std::string &filename_, const std::string &version_="", const std::string &encoding_="", const std::string &schema_="", const std::string &xsi_="<default>")
 Write the full GDML description in a file. More...
 
void dump (std::ostream &) const
 Basic print. More...
 

Static Public Member Functions

static const std::string & default_xml_version ()
 Return default XML version. More...
 
static const std::string & default_xml_encoding ()
 Return default XML encoding. More...
 
static const std::string & default_xsi ()
 Return default XSI. More...
 
static const std::string & default_gdml_schema ()
 Return default GDML schema. More...
 
static const std::string & default_remote_gdml_schema ()
 Return default remote GDML schema. More...
 
static const std::string & define_section ()
 Return define section tag. More...
 
static const std::string & materials_section ()
 Return materials section tag. More...
 
static const std::string & solids_section ()
 Return solids section tag. More...
 
static const std::string & structure_section ()
 Return structure section tag. More...
 
static const std::string & setup_section ()
 Return setup section tag. More...
 
static const std::string & state_convert (::materials::material::state_type)
 Convert material state (gas, liquid, solid...) to GDML supported label. More...
 
static std::string to_html (const std::string &, bool using_html_symbols_=false)
 Convert string to HTML. More...
 
static std::string to_ascii (const std::string &, bool using_html_symbols_=true)
 Convert string to ASCII. More...
 
static bool solid_type_is_valid (const std::string &solid_type_)
 Check if a solid type given by name is valid. More...
 
static bool solid_type_is_supported (const std::string &solid_type_)
 Check if a solid type given by name is supported. More...
 

Protected Member Functions

void _allocate_streams ()
 Allocate the output streams associated to GDML sections. More...
 
void _free_streams ()
 Deallocate the output streams associated to GDML sections. More...
 
const std::ostringstream & _get_stream (const std::string &section_) const
 Return a const reference to an output stream associated to a given GDML section. More...
 
std::ostringstream & _get_stream (const std::string &section_)
 Return a mutable reference to an output stream associated to a given GDML section. More...
 

Detailed Description

GDML writer class used by the geomtools GDML export functionalities.

Member Typedef Documentation

◆ streams_col_type

typedef std::map<std::string, std::ostringstream *> geomtools::gdml_writer::streams_col_type

Dictionary of output stream associated by section name.

Constructor & Destructor Documentation

◆ gdml_writer()

geomtools::gdml_writer::gdml_writer ( )

Default constructor.

◆ ~gdml_writer()

virtual geomtools::gdml_writer::~gdml_writer ( )
virtual

Destructor.

Member Function Documentation

◆ _allocate_streams()

void geomtools::gdml_writer::_allocate_streams ( )
protected

Allocate the output streams associated to GDML sections.

◆ _free_streams()

void geomtools::gdml_writer::_free_streams ( )
protected

Deallocate the output streams associated to GDML sections.

◆ _get_stream() [1/2]

const std::ostringstream& geomtools::gdml_writer::_get_stream ( const std::string &  section_) const
protected

Return a const reference to an output stream associated to a given GDML section.

◆ _get_stream() [2/2]

std::ostringstream& geomtools::gdml_writer::_get_stream ( const std::string &  section_)
protected

Return a mutable reference to an output stream associated to a given GDML section.

◆ add_box()

void geomtools::gdml_writer::add_box ( const std::string &  name_,
const box b_,
const std::string &  lunit_str_ = "mm" 
)

◆ add_cone_segment()

void geomtools::gdml_writer::add_cone_segment ( const std::string &  name_,
const right_circular_conical_frustrum cf_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_constant()

void geomtools::gdml_writer::add_constant ( const std::string &  name_,
double  value_ 
)

◆ add_cylinder()

void geomtools::gdml_writer::add_cylinder ( const std::string &  name_,
const cylinder c_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_element() [1/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
size_t  atomic_number_,
const std::string &  formula_,
double  a_ 
)

◆ add_element() [2/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::map< std::string, double > &  fractions_ 
)

◆ add_element() [3/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::string &  ref_ 
)

◆ add_element() [4/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::string &  ref1_,
double  fraction1_,
const std::string &  ref2_,
double  fraction2_ 
)

◆ add_element() [5/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::string &  ref1_,
double  fraction1_,
const std::string &  ref2_,
double  fraction2_,
const std::string &  ref3_,
double  fraction3_ 
)

◆ add_element() [6/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::string &  ref1_,
double  fraction1_,
const std::string &  ref2_,
double  fraction2_,
const std::string &  ref3_,
double  fraction3_,
const std::string &  ref4_,
double  fraction4_ 
)

◆ add_element() [7/7]

void geomtools::gdml_writer::add_element ( const std::string &  name_,
const std::string &  ref1_,
double  fraction1_,
const std::string &  ref2_,
double  fraction2_,
const std::string &  ref3_,
double  fraction3_,
const std::string &  ref4_,
double  fraction4_,
const std::string &  ref5_,
double  fraction5_ 
)

◆ add_ellipsoid()

void geomtools::gdml_writer::add_ellipsoid ( const std::string &  name_,
const ellipsoid e_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_elliptical_tube()

void geomtools::gdml_writer::add_elliptical_tube ( const std::string &  name_,
const elliptical_cylinder t_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_boolean()

void geomtools::gdml_writer::add_gdml_boolean ( const std::string &  name_,
const std::string &  boolean_type_,
const std::string &  first_ref_,
const std::string &  second_ref_,
const std::string &  position_ref_,
const std::string &  rotation_ref_ 
)

◆ add_gdml_box()

void geomtools::gdml_writer::add_gdml_box ( const std::string &  name_,
double  x_,
double  y_,
double  z_,
const std::string &  lunit_str_ = "mm" 
)

◆ add_gdml_cone_segment()

void geomtools::gdml_writer::add_gdml_cone_segment ( const std::string &  name_,
double  rmin1_,
double  rmax1_,
double  rmin2_,
double  rmax2_,
double  z_,
double  startphi_,
double  deltaphi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_ellipsoid()

void geomtools::gdml_writer::add_gdml_ellipsoid ( const std::string &  name_,
double  rx_,
double  ry,
double  rz_,
double  bottom_z_,
double  top_z_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_elliptical_tube()

void geomtools::gdml_writer::add_gdml_elliptical_tube ( const std::string &  name_,
double  rx_,
double  ry,
double  z_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_generic_polycone()

void geomtools::gdml_writer::add_gdml_generic_polycone ( const std::string &  name_,
std::map< double, double >  rzpoints_,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_generic_polyhedra()

void geomtools::gdml_writer::add_gdml_generic_polyhedra ( const std::string &  name_,
size_t  num_sides_,
std::map< double, double >  rzpoints_,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_intersection()

void geomtools::gdml_writer::add_gdml_intersection ( const std::string &  name_,
const std::string &  first_ref_,
const std::string &  second_ref_,
const std::string &  position_ref_,
const std::string &  rotation_ref_ 
)

◆ add_gdml_orb()

void geomtools::gdml_writer::add_gdml_orb ( const std::string &  name_,
double  r_,
const std::string &  lunit_str_ = "mm" 
)

◆ add_gdml_polycone()

void geomtools::gdml_writer::add_gdml_polycone ( const std::string &  name_,
std::map< double, std::pair< double, double > >  zplanes_,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_polyhedra()

void geomtools::gdml_writer::add_gdml_polyhedra ( const std::string &  name_,
size_t  num_sides_,
std::map< double, std::pair< double, double > >  zplanes_,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_sphere()

void geomtools::gdml_writer::add_gdml_sphere ( const std::string &  name_,
double  rmin_,
double  rmax,
double  start_phi_,
double  delta_phi_,
double  start_theta_,
double  delta_theta_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_subtraction()

void geomtools::gdml_writer::add_gdml_subtraction ( const std::string &  name_,
const std::string &  first_ref_,
const std::string &  second_ref_,
const std::string &  position_ref_,
const std::string &  rotation_ref_ 
)

◆ add_gdml_torus()

void geomtools::gdml_writer::add_gdml_torus ( const std::string &  name_,
double  rsweep_,
double  rmin_,
double  rmax,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_tube()

void geomtools::gdml_writer::add_gdml_tube ( const std::string &  name_,
double  rmin_,
double  rmax,
double  z_,
double  start_phi_,
double  delta_phi_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_gdml_union()

void geomtools::gdml_writer::add_gdml_union ( const std::string &  name_,
const std::string &  first_ref_,
const std::string &  second_ref_,
const std::string &  position_ref_,
const std::string &  rotation_ref_ 
)

◆ add_isotope()

void geomtools::gdml_writer::add_isotope ( const std::string &  name_,
size_t  atomic_number_,
size_t  number_of_nucleons_,
double  a_ 
)

◆ add_material() [1/3]

void geomtools::gdml_writer::add_material ( const std::string &  name_,
double  atomic_number_,
double  density_,
double  a_,
const std::string &  state_label_ = "",
double  temperature_ = std::numeric_limits< double >::quiet_NaN(),
double  pressure_ = std::numeric_limits< double >::quiet_NaN() 
)

◆ add_material() [2/3]

void geomtools::gdml_writer::add_material ( const std::string &  name_,
const std::string &  formula_,
double  density_,
const std::map< std::string, size_t > &  composites_,
const std::string &  state_label_ = "",
double  temperature_ = std::numeric_limits< double >::quiet_NaN(),
double  pressure_ = std::numeric_limits< double >::quiet_NaN() 
)

◆ add_material() [3/3]

void geomtools::gdml_writer::add_material ( const std::string &  name_,
const std::string &  formula_,
double  density_,
const std::map< std::string, double > &  fractions_,
const std::string &  state_label_ = "",
double  temperature_ = std::numeric_limits< double >::quiet_NaN(),
double  pressure_ = std::numeric_limits< double >::quiet_NaN() 
)

◆ add_orb()

void geomtools::gdml_writer::add_orb ( const std::string &  name_,
const sphere s_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_polycone()

void geomtools::gdml_writer::add_polycone ( const std::string &  name_,
const polycone s_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_polyhedra()

void geomtools::gdml_writer::add_polyhedra ( const std::string &  name_,
const polyhedra s_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_position() [1/3]

void geomtools::gdml_writer::add_position ( const std::string &  name_,
double  x_,
double  y_,
double  z_,
const std::string &  unit_str_ 
)

◆ add_position() [2/3]

void geomtools::gdml_writer::add_position ( const std::string &  name_,
const std::string &  x_str_,
const std::string &  y_str_,
const std::string &  z_str_,
const std::string &  unit_str_ 
)

◆ add_position() [3/3]

void geomtools::gdml_writer::add_position ( const std::string &  name_,
const vector_3d v_,
const std::string &  unit_str_ 
)

◆ add_quantity()

void geomtools::gdml_writer::add_quantity ( const std::string &  name_,
const std::string &  quantity_type_,
const std::string &  unit_str_,
double  value_ 
)

◆ add_replica_volume() [1/2]

void geomtools::gdml_writer::add_replica_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_,
const replicavol replicavol_,
const std::string &  lunit_str_,
const std::string &  aunit_str_,
const std::map< std::string, std::string > &  aux_ 
)

◆ add_replica_volume() [2/2]

void geomtools::gdml_writer::add_replica_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_,
const replicavol replicavol_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_rotation() [1/2]

void geomtools::gdml_writer::add_rotation ( const std::string &  name_,
const std::string &  axis_,
double  angle_,
const std::string &  unit_str_ 
)

◆ add_rotation() [2/2]

void geomtools::gdml_writer::add_rotation ( const std::string &  name_,
const rotation_3d rot_,
const std::string &  unit_str_ 
)

◆ add_scale()

void geomtools::gdml_writer::add_scale ( const std::string &  name_,
double  x_,
double  y_,
double  z_ 
)

◆ add_setup()

void geomtools::gdml_writer::add_setup ( const std::string &  name_,
const std::string &  world_ref_,
const std::string &  version_ = "1.0" 
)

◆ add_sphere()

void geomtools::gdml_writer::add_sphere ( const std::string &  name_,
const sphere s_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_tessellated()

void geomtools::gdml_writer::add_tessellated ( const std::string &  name_,
const tessellated_solid ts_,
const std::string &  lunit_str_ = "mm" 
)

◆ add_torus()

void geomtools::gdml_writer::add_torus ( const std::string &  name_,
const torus t_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_tube()

void geomtools::gdml_writer::add_tube ( const std::string &  name_,
const tube t_,
const std::string &  lunit_str_ = "mm",
const std::string &  aunit_str_ = "radian" 
)

◆ add_variable() [1/2]

void geomtools::gdml_writer::add_variable ( const std::string &  name_,
double  value_ 
)

◆ add_variable() [2/2]

void geomtools::gdml_writer::add_variable ( const std::string &  name_,
const std::string &  expr_value_ 
)

◆ add_volume() [1/4]

void geomtools::gdml_writer::add_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_,
const std::map< std::string, std::string > &  aux_ 
)

◆ add_volume() [2/4]

void geomtools::gdml_writer::add_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_ 
)

◆ add_volume() [3/4]

void geomtools::gdml_writer::add_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_,
const std::list< physvol > &  phys_vols_,
const std::map< std::string, std::string > &  aux_ 
)

◆ add_volume() [4/4]

void geomtools::gdml_writer::add_volume ( const std::string &  name_,
const std::string &  material_ref_,
const std::string &  solid_ref_,
const std::list< physvol > &  phys_vols_ 
)

◆ add_volume_auxiliaries()

void geomtools::gdml_writer::add_volume_auxiliaries ( const std::map< std::string, std::string > &  aux_)

◆ add_wall()

void geomtools::gdml_writer::add_wall ( const std::string &  name_,
const wall_solid ts_,
const std::string &  lunit_str_ = "mm" 
)

◆ attach_external_materials()

void geomtools::gdml_writer::attach_external_materials ( const std::ostringstream &  oss_)

Attach an external output stream dedicated to GDML description of materials.

◆ default_gdml_schema()

static const std::string& geomtools::gdml_writer::default_gdml_schema ( )
static

Return default GDML schema.

◆ default_remote_gdml_schema()

static const std::string& geomtools::gdml_writer::default_remote_gdml_schema ( )
static

Return default remote GDML schema.

◆ default_xml_encoding()

static const std::string& geomtools::gdml_writer::default_xml_encoding ( )
static

Return default XML encoding.

◆ default_xml_version()

static const std::string& geomtools::gdml_writer::default_xml_version ( )
static

Return default XML version.

◆ default_xsi()

static const std::string& geomtools::gdml_writer::default_xsi ( )
static

Return default XSI.

◆ define_section()

static const std::string& geomtools::gdml_writer::define_section ( )
static

Return define section tag.

◆ dump()

void geomtools::gdml_writer::dump ( std::ostream &  ) const

Basic print.

◆ full_write()

void geomtools::gdml_writer::full_write ( std::ostream &  out_,
const std::string &  version_ = "",
const std::string &  encoding_ = "",
const std::string &  schema_ = "",
const std::string &  xsi_ = "<default>" 
)

Write the full GDML description in an output stream.

◆ gdml_begin()

void geomtools::gdml_writer::gdml_begin ( std::ostream &  ,
const std::string &  schema_ = "",
const std::string &  xsi_ = "<default>" 
)

◆ gdml_end()

void geomtools::gdml_writer::gdml_end ( std::ostream &  )

◆ gdml_section_begin()

void geomtools::gdml_writer::gdml_section_begin ( std::ostream &  ,
const std::string &  section_ 
)

◆ gdml_section_end()

void geomtools::gdml_writer::gdml_section_end ( std::ostream &  ,
const std::string &  section_ 
)

◆ get_stream()

const std::ostringstream& geomtools::gdml_writer::get_stream ( const std::string &  section_) const

Return output stream associated to a GDML section.

◆ has_external_materials_stream()

bool geomtools::gdml_writer::has_external_materials_stream ( ) const

Check if an external output stream dedicated to GDML description of materials is defined.

◆ init()

void geomtools::gdml_writer::init ( )

Initialize.

◆ initialize()

void geomtools::gdml_writer::initialize ( )

Initialize.

◆ is_initialized()

bool geomtools::gdml_writer::is_initialized ( ) const

Check initialization flag.

◆ is_using_html_symbols()

bool geomtools::gdml_writer::is_using_html_symbols ( ) const

Check flag for using HTML symbol.

◆ is_verbose()

bool geomtools::gdml_writer::is_verbose ( ) const

Check verbosity flag.

◆ materials_section()

static const std::string& geomtools::gdml_writer::materials_section ( )
static

Return materials section tag.

◆ reset()

void geomtools::gdml_writer::reset ( )

Reset.

◆ reset_external_materials_stream()

void geomtools::gdml_writer::reset_external_materials_stream ( )

Detach the external output stream dedicated to GDML description of materials.

◆ save_file()

void geomtools::gdml_writer::save_file ( const std::string &  filename_,
const std::string &  version_ = "",
const std::string &  encoding_ = "",
const std::string &  schema_ = "",
const std::string &  xsi_ = "<default>" 
)

Write the full GDML description in a file.

◆ set_using_html_symbols()

void geomtools::gdml_writer::set_using_html_symbols ( bool  u_)

Set flag for using HTML symbol.

◆ set_verbose()

void geomtools::gdml_writer::set_verbose ( bool  )

Set verbosity flag.

◆ setup_section()

static const std::string& geomtools::gdml_writer::setup_section ( )
static

Return setup section tag.

◆ solid_type_is_supported()

static bool geomtools::gdml_writer::solid_type_is_supported ( const std::string &  solid_type_)
static

Check if a solid type given by name is supported.

◆ solid_type_is_valid()

static bool geomtools::gdml_writer::solid_type_is_valid ( const std::string &  solid_type_)
static

Check if a solid type given by name is valid.

◆ solids_section()

static const std::string& geomtools::gdml_writer::solids_section ( )
static

Return solids section tag.

◆ state_convert()

static const std::string& geomtools::gdml_writer::state_convert ( ::materials::material::state_type  )
static

Convert material state (gas, liquid, solid...) to GDML supported label.

◆ structure_section()

static const std::string& geomtools::gdml_writer::structure_section ( )
static

Return structure section tag.

◆ to_ascii()

static std::string geomtools::gdml_writer::to_ascii ( const std::string &  ,
bool  using_html_symbols_ = true 
)
static

Convert string to ASCII.

◆ to_html()

static std::string geomtools::gdml_writer::to_html ( const std::string &  ,
bool  using_html_symbols_ = false 
)
static

Convert string to HTML.

◆ xml_header()

void geomtools::gdml_writer::xml_header ( std::ostream &  ,
const std::string &  xml_version_ = "",
const std::string &  xml_encoding_ = "",
bool  standalone_ = false 
)

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