Table Of Contents

Previous topic

bunch module

Next topic

simulation module

This Page

lattice module

The lattice module contains lattice elements, lattices and related classes.

Python-only Classes

class synergia.lattice.Mad8_reader(element_adaptor_map=None)

Read lattice descriptions written in Mad8 format

Parameters:element_adaptor_map – The Element_adaptor_map class used to interpret the elements. If None, the Mad8_adaptor_map class is used.
get_element_adaptor_map()

Returns the Element_adaptor_map used by the reader.

get_lattice(line_names, filename=None, enable_cache_write=True, enable_cache_read=True)

Retrieve a lattice

Parameters:
  • line_name – the name of the line to be used
  • filename – if given, parse filename first
  • enable_cache_write – if True, write cache to the lattice_cache directory when appropriate.
  • enable_cache_write – if True, read cache from the lattice_cache directory when appropriate.
get_lattice_element(label, filename=None)

Return the parsed definition of a lattice element.

Parameters:
  • label – the lattice element’s label
  • filename – if not None, parse filename first
get_lines(filename=None)

Return a list of lines found in the last parse.

Parameters:filename – if not None, parse filename first
parse(filename)

Parse a file containing a lattice description in Mad8 format.

parse_string(string)

Parse a string containing a lattice description in Mad8 format.

Classes

class Chef_lattice

Public Functions

Chef_lattice(Lattice_sptr lattice_sptr)

double get_brho()

Chef_lattice()

Chef_elements get_chef_elements(Lattice_element & lattice_element)

Chef_lattice_section_sptr get_chef_section_sptr(Chef_lattice_sptr this_chef_lattice_sptr, Lattice_element_slice & lattice_element_slice)

Lattice_element & get_lattice_element(ElmPtr const & chef_element)

Lattice_element_slice & get_lattice_element_slice(ElmPtr const & chef_element)

bool have_sliced_beamline()

void construct_sliced_beamline(Lattice_element_slices const & slices)

BmlPtr get_beamline_sptr()

BmlPtr get_sliced_beamline_sptr()

beamline::iterator get_sliced_beamline_iterator(int index)

beamline::const_iterator get_sliced_beamline_const_iterator(int index)

template < class Archive >
void save(Archive & ar, const unsigned int version)

template < class Archive >
void load(Archive & ar, const unsigned int version)

~Chef_lattice()

Public Static Attributes

const char internal_marker_name[]

class Begin_end

Public Functions

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

Public Members

int begin

int end

class Chef_lattice_section

Public Type

typedef beamline::iterator iterator

typedef beamline::const_iterator const_iterator

Public Functions

Chef_lattice_section(Chef_lattice_sptr chef_lattice_sptr)

Chef_lattice_section(Chef_lattice_sptr chef_lattice_sptr, int begin_index, int end_index)

Chef_lattice_section()

Default constructor for serialization use only.

void extend(Chef_lattice_section const & chef_lattice_section)

void extend(int begin_index, int end_index)

int get_begin_index()

int get_end_index()

iterator begin()

iterator end()

bool empty()

void clear()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class Drift_mad8_adaptor

Public Functions

Drift_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Drift_mad8_adaptor()

class Drift_madx_adaptor

Public Functions

Drift_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Drift_madx_adaptor()

class Ecollimator_mad8_adaptor

Public Functions

Ecollimator_mad8_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Ecollimator_mad8_adaptor()

class Ecollimator_madx_adaptor

Public Functions

Ecollimator_madx_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Ecollimator_madx_adaptor()

class Element_adaptor

Public Functions

Element_adaptor()

Lattice_element_sptr get_default_element_sptr()

Lattice_element & get_default_element()

void set_double_default(Lattice_element & lattice_element, std::string const & name, double value)

void set_string_default(Lattice_element & lattice_element, std::string const & name, std::string const & value)

void set_defaults(Lattice_element & lattice_element)

void set_derived_attributes_internal(Lattice_element & lattice_element)

void set_derived_attributes_external(Lattice_element & lattice_element, double lattice_length, double beta)

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Element_adaptor()

class Element_adaptor_map

Public Functions

Element_adaptor_map()

void set_adaptor(std::string const & name, Element_adaptor_sptr element_adaptor_sptr)

bool has_adaptor(std::string const & name)

Element_adaptor_sptr get_adaptor(std::string const & name)

std::list< std::string > get_adaptor_names()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Element_adaptor_map()

class Elseparator_mad8_adaptor

Public Functions

Elseparator_mad8_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Elseparator_mad8_adaptor()

class Elseparator_madx_adaptor

Public Functions

Elseparator_madx_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Elseparator_madx_adaptor()

class Hkicker_mad8_adaptor

Public Functions

Hkicker_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Hkicker_mad8_adaptor()

class Hkicker_madx_adaptor

Public Functions

Hkicker_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Hkicker_madx_adaptor()

class Hmonitor_mad8_adaptor

Public Functions

Hmonitor_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Hmonitor_mad8_adaptor()

class Hmonitor_madx_adaptor

Public Functions

Hmonitor_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Hmonitor_madx_adaptor()

class Instrument_mad8_adaptor

Public Functions

Instrument_mad8_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Instrument_mad8_adaptor()

class Instrument_madx_adaptor

Public Functions

Instrument_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Instrument_madx_adaptor()

class Kicker_mad8_adaptor

Public Functions

Kicker_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Kicker_mad8_adaptor()

class Kicker_madx_adaptor

Public Functions

Kicker_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Kicker_madx_adaptor()

class Lambertson_mad8_adaptor

Public Functions

Lambertson_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Lambertson_mad8_adaptor()

class Lambertson_madx_adaptor

Public Functions

Lambertson_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Lambertson_madx_adaptor()

class Lattice

The Lattice class contains an abstract representation of an ordered set of objects of type Lattice_element.

Each element of the Lattice is unique.

Public Functions

Lattice()

Construct a Lattice object without a name.

Defaults to interpreting elements as Mad8 elements

Lattice(std::string const & name)

Construct a Lattice object with a name Defaults to interpreting elements as Mad8 elements.

Parameters
  • name -

    an arbitrary name

Lattice(std::string const & name, Element_adaptor_map_sptr element_adaptor_map_sptr)

Construct a Lattice object with a name.

Parameters
  • name -

    an arbitrary name

  • element_adaptor_map_sptr -

    an Element_adaptor_map for interpreting elements

Lattice(Lattice const & lattice)

Copies of Lattices contain copies of elements.

std::string const & get_name()

Get the Lattice name.

void set_reference_particle(Reference_particle const & reference_particle)

Set the Lattice reference particle.

Parameters

bool has_reference_particle()

Determine whether the Lattice has a reference particle.

Reference_particle const & get_reference_particle()

Get the Lattice reference particle.

void append(Lattice_element const & element)

Append a copy of a Lattice_element.

Parameters

void set_defaults()

Set the defaults in elements of the Lattice.

void derive_internal_attributes()

Derive internal attributes where necessary.

void derive_external_attributes()

Derive external attributes where necessary.

void complete_attributes()

Complete all attribute updates. Includes defaults and derivations.

void set_all_double_attribute(std::string const & name, double value, bool increment_revision = true)

Set the value of the named double attribute on all elements.

Parameters
  • name -

    attribute name

  • value -

    attribute value

  • increment_revision -

    can be set to false for attributes that do not affect dynamics

void set_all_string_attribute(std::string const & name, std::string const & value, bool increment_revision = true)

Set the value of the named string attribute on all elements.

Parameters
  • name -

    attribute name

  • value -

    attribute value

  • increment_revision -

    can be set to false for attributes that do not affect dynamics

Lattice_elements & get_elements()

Get the list of elements in the Lattice.

Element_adaptor_map & get_element_adaptor_map()

double get_length()

Get the combined length of all the elements in the Lattice.

double get_total_angle()

Get the total angle in radians subtended by all the elements in the Lattice.

std::string as_string()

Return a human-readable summary of the elements in the Lattice.

void print()

Print a human-readable summary of the elements in the Lattice.

The Python version of this function is named “print_”.

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Lattice()

class Lattice_diagnostics

Public Functions

Lattice_diagnostics(Lattice_sptr lattice_sptr, std::string const & filename, std::string const & attribute, std::string const & local_dir = “”)

void set_default_value(double value)

double get_default_value()

void set_reduce(bool reduce)

bool get_reduce()

void set_reduce_op(MPI_Op op)

MPI_Op get_reduce_op()

bool is_serial()

Multiple serial diagnostics can be written to a single file.

void update()

Update the diagnostics.

void write()

Write the diagnostics to the file.

void update_and_write()

Update the diagnostics and write to file.

~Lattice_diagnostics()

class Lattice_element

The Lattice_element class contains the description of a single lattice element.

Each element has a name, a (string) type and dictionaries of named double and string attributes. Lattice structure is described by a list of ancestors stored in an element.

Public Functions

Lattice_element()

Construct a Lattice_element with an empty name and type.

Lattice_element(std::string const & type, std::string const & name)

Construct a Lattice_element.

Parameters
  • name -

    name

  • type -

    type

Lattice_element(Lattice_element const & lattice_element)

Copy constructor.

std::string const & get_type()

Get the type.

std::string const & get_name()

Get the name.

void set_default_element(Lattice_element_sptr default_element_sptr)

Set the defaults for this element.

void add_ancestor(std::string const & ancestor)

Add an ancestor to the list of ancestors.

Parameters
  • ancestor -

    ancestor name

std::list< std::string > const & get_ancestors()

Get the list of ancestors.

void set_double_attribute(std::string const & name, double value, bool increment_revision = true)

Set the value of the named double attribute.

Parameters
  • name -

    attribute name

  • value -

    attribute value

  • increment_revision -

    can be set to false for attributes that do not affect dynamics

bool has_double_attribute(std::string const & name, bool include_default = true)

Check for the existence of the named double attribute.

Parameters
  • name -

    attribute name

double get_double_attribute(std::string const & name)

Get the value of the named double attribute.

Parameters
  • name -

    attribute name

std::map< std::string, double > const & get_double_attributes()

Get the entire dictionary of double attributes.

void set_string_attribute(std::string const & name, std::string const & value, bool increment_revision = true)

Set the value of the named string attribute.

Parameters
  • name -

    attribute name

  • value -

    attribute value

  • increment_revision -

    can be set to false for attributes that do not affect dynamics

bool has_string_attribute(std::string const & name, bool include_default = true)

Check for the existence of the named string attribute.

Parameters
  • name -

    attribute name

std::string const & get_string_attribute(std::string const & name)

Get the value of the named string attribute.

Parameters
  • name -

    attribute name

std::map< std::string, std::string > const & get_string_attributes()

Get the entire dictionary of string attributes.

void set_vector_attribute(std::string const & name, std::vector< double > const & value, bool increment_revision = true)

Set the value of the named vector attribute.

Parameters
  • name -

    attribute name

  • value -

    attribute value

  • increment_revision -

    can be set to false for attributes that do not affect dynamics

bool has_vector_attribute(std::string const & name, bool include_default = true)

Check for the existence of the named vector attribute.

Parameters
  • name -

    attribute name

std::vector< double > const & get_vector_attribute(std::string const & name)

Get the value of the named vector attribute.

Parameters
  • name -

    attribute name

std::map< std::string, std::vector< double > > const & get_vector_attributes()

Get the entire dictionary of vector attributes.

void set_length_attribute_name(std::string const & attribute_name)

Set the attribute name to be used to determine the length of the Lattice_element.

Parameters
  • attribute_name -

    attribute name

void set_bend_angle_attribute_name(std::string const & attribute_name)

Set the attribute name to be used to determine the bend_angle of the Lattice_element.

Parameters
  • attribute_name -

    attribute name

void set_needs_internal_derive(bool value)

Set whether the element needs to determine some of its parameters from its other parameters.

bool get_needs_internal_derive()

Get whether the element needs to determine some of its parameters from its other parameters.

void set_needs_external_derive(bool value)

Set whether the element needs to determine some of its parameters from the lattice length and/or reference particle.

bool get_needs_external_derive()

Get whether the element needs to determine some of its parameters from the lattice length and/or reference particle.

double get_length()

Get the Lattice_element‘s length.

double get_bend_angle()

Get the Lattice_element‘s bend angle.

long int get_revision()

Get the Lattice_element‘s revision number.

std::string as_string()

Return a human-readable description of the Lattice_element.

void print()

Print a human-readable description of the Lattice_element The Python version of the function is named “print_”.

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class Lattice_element_slice

Public Functions

Lattice_element_slice(Lattice_element_sptr lattice_element_sptr)

Lattice_element_slice(Lattice_element_sptr lattice_element_sptr, double left, double right)

Lattice_element_slice()

bool is_whole()

bool has_left_edge()

bool has_right_edge()

double get_left()

double get_right()

Lattice_element const & get_lattice_element()

Lattice_element & get_lattice_element()

std::string as_string()

void print()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class Mad8_adaptor_map

Public Functions

Mad8_adaptor_map()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class MadX_adaptor_map

Public Functions

MadX_adaptor_map()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

class MadX_reader

Public Functions

MadX_reader()

MadX_reader(Element_adaptor_map_sptr element_adaptor_map_sptr)

void parse(std::string const & string)

void parse_file(std::string const & filename)

std::vector< std::string > get_line_names()

std::vector< std::string > get_sequence_names()

std::vector< std::string > get_all_names()

double get_double_variable(std::string const & name)

std::string get_string_variable(std::string const & name)

Lattice_sptr get_lattice_sptr(std::string const & line_name)

Lattice_sptr get_lattice_sptr(std::string const & line_name, std::string const & filename)

~MadX_reader()

class Marker_mad8_adaptor

Public Functions

Marker_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Marker_mad8_adaptor()

class Marker_madx_adaptor

Public Functions

Marker_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Marker_madx_adaptor()

class Monitor_mad8_adaptor

Public Functions

Monitor_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Monitor_mad8_adaptor()

class Monitor_madx_adaptor

Public Functions

Monitor_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Monitor_madx_adaptor()

class Multipole_mad8_adaptor

Public Functions

Multipole_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Multipole_mad8_adaptor()

class Multipole_madx_adaptor

Public Functions

Multipole_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Multipole_madx_adaptor()

class Octupole_mad8_adaptor

Public Functions

Octupole_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Octupole_mad8_adaptor()

class Octupole_madx_adaptor

Public Functions

Octupole_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Octupole_madx_adaptor()

class Quadrupole_mad8_adaptor

Public Functions

Quadrupole_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Quadrupole_mad8_adaptor()

class Quadrupole_madx_adaptor

Public Functions

Quadrupole_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Quadrupole_madx_adaptor()

class Rbend_mad8_adaptor

Public Functions

Rbend_mad8_adaptor()

void set_defaults(Lattice_element & lattice_element)

void set_derived_attributes_internal(Lattice_element & lattice_element)

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rbend_mad8_adaptor()

class Rbend_madx_adaptor

Public Functions

Rbend_madx_adaptor()

void set_defaults(Lattice_element & lattice_element)

void set_derived_attributes_internal(Lattice_element & lattice_element)

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rbend_madx_adaptor()

class Rcollimator_mad8_adaptor

Public Functions

Rcollimator_mad8_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rcollimator_mad8_adaptor()

class Rcollimator_madx_adaptor

Public Functions

Rcollimator_madx_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rcollimator_madx_adaptor()

class Rfcavity_mad8_adaptor

Public Functions

Rfcavity_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rfcavity_mad8_adaptor()

class Rfcavity_madx_adaptor

Public Functions

Rfcavity_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

void set_derived_attributes_external(Lattice_element & lattice_element, double lattice_length, double beta)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Rfcavity_madx_adaptor()

class Sbend_mad8_adaptor

Public Functions

Sbend_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Sbend_mad8_adaptor()

class Sbend_madx_adaptor

Public Functions

Sbend_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Sbend_madx_adaptor()

class Septum_mad8_adaptor

Public Functions

Septum_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Septum_mad8_adaptor()

class Septum_madx_adaptor

Public Functions

Septum_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Septum_madx_adaptor()

class Sextupole_mad8_adaptor

Public Functions

Sextupole_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Sextupole_mad8_adaptor()

class Sextupole_madx_adaptor

Public Functions

Sextupole_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Sextupole_madx_adaptor()

class Solenoid_mad8_adaptor

Public Functions

Solenoid_mad8_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Solenoid_mad8_adaptor()

class Solenoid_madx_adaptor

Public Functions

Solenoid_madx_adaptor()

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Solenoid_madx_adaptor()

class Srot_mad8_adaptor

Public Functions

Srot_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Srot_mad8_adaptor()

class Srot_madx_adaptor

Public Functions

Srot_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Srot_madx_adaptor()

class Thinpole_mad8_adaptor

Public Functions

Thinpole_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Thinpole_mad8_adaptor()

class Thinpole_madx_adaptor

Public Functions

Thinpole_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Thinpole_madx_adaptor()

class Vkicker_mad8_adaptor

Public Functions

Vkicker_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Vkicker_mad8_adaptor()

class Vkicker_madx_adaptor

Public Functions

Vkicker_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Vkicker_madx_adaptor()

class Vmonitor_mad8_adaptor

Public Functions

Vmonitor_mad8_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Vmonitor_mad8_adaptor()

class Vmonitor_madx_adaptor

Public Functions

Vmonitor_madx_adaptor()

Chef_elements get_chef_elements(Lattice_element const & lattice_element, double brho)

template < class Archive >
void serialize(Archive & ar, const unsigned int version)

~Vmonitor_madx_adaptor()

class synergia::Mad8

Public Functions

Mad8()

string_t variable_as_string(string_t const & name)

double variable_as_number(string_t const & name)

size_t command_count()

Mad8_command const & command(size_t idx)

size_t label_count()

Mad8_command const & label(string_t const & l)

size_t line_count()

Mad8_line const & line(string_t const & l)

void insert_variable(string_t const & name, double value)

void insert_variable(string_t const & name, string_t const & value)

void insert_label(string_t const & name, Mad8_command const & cmd)

void insert_line(string_t const & name, Mad8_line const & line)

void insert_command(Mad8_command const & cmd)

class synergia::Mad8_command

Public Functions

Mad8_command()

string_t name()

size_t attribute_count()

string_t attribute_as_string(string_t const & name)

double attribute_as_number(string_t const & name)

void set_name(string_t const & name)

void insert_attribute(string_t const & name, double val)

void insert_attribute(string_t const & name, string_t const & val)

class synergia::Mad8_line

Public Functions

Mad8_line()

size_t element_count()

ele_t element_type(size_t idx)

string_t element_as_string(size_t idx)

Mad8_line element_as_line(size_t idx)

void insert_operator(string_t const & op)

void insert_element(string_t const & ele)

void insert_subline(Mad8_line const & line)

class synergia::MadX

Public Functions

MadX()

string_t variable_as_string(string_t const & name)

string_t variable_as_string(string_t const & name, string_t const & def)

double variable_as_number(string_t const & name)

double variable_as_number(string_t const & name, double def)

bool variable_as_boolean(string_t const & name)

std::vector< double > variable_as_number_seq(string_t const & name)

std::vector< double > variable_as_number_seq(string_t const & name, double def)

size_t command_count()

std::vector< string_t > commands()

MadX_command command(size_t idx, bool resolve = true)

size_t label_count()

std::vector< string_t > command_labels()

MadX_command command(string_t const & l, bool resolve = true)

size_t line_count()

std::vector< string_t > line_labels()

MadX_line const & line(string_t const & l)

size_t sequence_count()

std::vector< string_t > sequence_labels()

MadX_sequence const & sequence(string_t const & s)

MadX_sequence const & current_sequence()

MadX_sequence & current_sequence()

MadX_entry_type entry_type(string_t const & entry)

void print()

void insert_variable(string_t const & name, string_t const & value)

void insert_variable(string_t const & name, mx_expr const & value)

void insert_variable(string_t const & name, mx_exprs const & value)

void insert_label(string_t const & name, MadX_command const & cmd)

void insert_line(string_t const & name, MadX_line const & line)

void insert_command(MadX_command const & cmd)

void start_sequence()

void end_sequence()

void insert_attribute(string_t const & name, string_t const & value)

void insert_attribute(string_t const & name, mx_expr const & value)

void insert_attribute(string_t const & name, mx_exprs const & value)

Public Static Attributes

double nan

string_t nst

class synergia::MadX_command

Public Functions

MadX_command(MadX * parent = NULL)

string_t name()

string_t label()

size_t attribute_count()

std::vector< string_t > attribute_names()

MadX_value_type attribute_type(string_t const & name)

string_t attribute_as_string(string_t const & name)

string_t attribute_as_string(string_t const & name, string_t const & def)

double attribute_as_number(string_t const & name)

double attribute_as_number(string_t const & name, double def)

bool attribute_as_boolean(string_t const & name)

std::vector< double > attribute_as_number_seq(string_t const & name)

std::vector< double > attribute_as_number_seq(string_t const & name, double def)

MadX_command_type type()

bool is_element()

bool is_reference()

bool is_command()

void set_parent(MadX const & parent)

void set_name(string_t const & name, MadX_command_type cmd_type)

void set_label(string_t const & label)

void insert_attribute(string_t const & name, string_t const & val)

void insert_attribute(string_t const & name, mx_expr const & val)

void insert_attribute(string_t const & name, mx_exprs const & val)

void merge_with_overwrite(MadX_command const & other)

void merge(MadX_command const & other)

class synergia::MadX_line

Public Functions

MadX_line(MadX const & parent)

size_t element_count()

string_t element_name(size_t idx)

MadX_command element(size_t idx, bool resolve = true)

void insert_element(string_t const & ele)

void print()

class synergia::MadX_sequence

Public Functions

MadX_sequence(MadX const & parent)

string_t label()

double length()

size_t element_count()

MadX_command element(size_t idx, bool resolve = true)

MadX_entry_type element_type(size_t idx)

MadX_sequence_refer refer()

void set_label(string_t const & label)

void set_length(double length)

void set_refer(MadX_sequence_refer ref)

void add_element(MadX_command const & cmd)

void reset()

void print()

class synergia::mx_attr

Public Functions

mx_attr()

void set_attr(std::string const & name, boost::any const & val)

void set_lazy_attr(std::string const & name, boost::any const & val)

mx_attr_type type()

std::string name()

boost::any value()

class synergia::mx_calculator

Public Functions

mx_calculator()

mx_calculator(double def)

mx_calculator(MadX const & mx)

mx_calculator(MadX const & mx, double def)

double operator()(double val)

double operator()(std::string const & ref)

double operator()(string_pair_t const & ref)

double operator()(nop_t const & n)

double operator()(uop_t const & u)

double operator()(bop_t const & b)

Public Static Attributes

double nan

class synergia::mx_command

Public Functions

mx_command()

void set_label(std::string const & label)

void set_keyword(mx_keyword const & keyword)

void set_keyword(std::string const & keyword, mx_cmd_type tag)

void ins_attr(mx_attr const & attr)

bool has_label()

void interpret(MadX & mx)

void execute(MadX & mx)

void print()

class synergia::mx_if

Public Functions

mx_if()

void assign_if(mx_logic const & logic, mx_tree const & block)

void assign_elseif(mx_logic const & logic, mx_tree const & block)

void assign_else(mx_tree const & block)

void interpret(MadX & mx)

void print()

class synergia::mx_if_block

Public Functions

mx_if_block()

mx_if_block(mx_logic const & logic, mx_tree const & block)

bool valid()

bool evaluate_logic(MadX const & mx)

void interpret_block(MadX & mx)

void print_logic()

void print_block()

class synergia::mx_line

Public Functions

mx_line()

mx_line(string_t const & name, mx_line_seq const & seq)

void interpret(MadX & mx)

class synergia::mx_line_member

Public Functions

mx_line_member()

mx_line_member(string_t const & name)

mx_line_member(mx_line_seq const & seq)

void interpret(MadX const & mx, MadX_line & line, int op = 1)

class synergia::mx_line_seq

Public Functions

mx_line_seq()

void insert_member(int op, mx_line_member const & member)

void interpret(MadX const & mx, MadX_line & line, int op = 1)

class synergia::mx_logic

Public Functions

mx_logic(bool p = true)

mx_logic(mx_expr const & l, mx_expr const & r, logic_op_t o)

void set(mx_expr const & l, logic_op_t o, mx_expr const & r)

bool evaluate(MadX const & mx)

class synergia::mx_statement

Public Functions

mx_statement()

mx_statement(mx_command const & st)

mx_statement(mx_if const & st)

mx_statement(mx_while const & st)

mx_statement(mx_line const & st)

void assign(mx_command const & st)

void assign(mx_if const & st)

void assign(mx_while const & st)

void assign(mx_line const & st)

void interpret(MadX & mx)

void print()

class synergia::mx_tree

Public Functions

mx_tree()

mx_tree(mx_statements_t const & sts)

void push(mx_statement const & st)

void interpret(MadX & mx)

void print()

class synergia::mx_while

Public Functions

mx_while()

void assign(mx_logic const & logic, mx_tree const & block)

void interpret(MadX & mx)

void print()

Typedefs

typedef std::list< ElmPtr > Chef_elements

typedef boost::shared_ptr< Chef_lattice_section > Chef_lattice_section_sptr

typedef boost::shared_ptr< Chef_lattice > Chef_lattice_sptr

typedef boost::shared_ptr< Element_adaptor_map > Element_adaptor_map_sptr

typedef boost::shared_ptr< Element_adaptor > Element_adaptor_sptr

typedef boost::shared_ptr< Lattice_diagnostics > Lattice_diagnostics_sptr

typedef boost::shared_ptr< Lattice_element_slice > Lattice_element_slice_sptr

typedef std::list< Lattice_element_slice_sptr > Lattice_element_slices

typedef boost::shared_ptr< Lattice_element > Lattice_element_sptr

typedef std::list< Lattice_element_sptr > Lattice_elements

typedef boost::shared_ptr< Lattice > Lattice_sptr

typedef boost::shared_ptr< Mad8_adaptor_map > Mad8_adaptor_map_sptr