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

#include <bayeux/geomtools/regular_grid_placement.h>

Inheritance diagram for geomtools::regular_grid_placement:
geomtools::i_placement datatools::i_serializable datatools::i_tree_dumpable

Public Types

enum  mode_type { MODE_XY = 0, MODE_YZ = 1, MODE_XZ = 2 }
 Orientation of the grid placement. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 

Public Member Functions

bool is_valid () const
 
void invalidate ()
 
int get_mode () const
 
bool is_mode_xy () const
 
bool is_mode_yz () const
 
bool is_mode_xz () const
 
void set_mode (int m_)
 
bool is_centered () const
 
void set_centered (bool c_)
 
void set_column_step (double dx_)
 
void set_row_step (double dx_)
 
void set_steps (double dx_, double dy_)
 
double get_column_step () const
 
double get_row_step () const
 
double get_x_step () const
 
double get_y_step () const
 
double get_z_step () const
 
void set_basic_placement (const placement &bp_)
 
const placementget_basic_placement () const
 
placementget_basic_placement ()
 
placementgrab_basic_placement ()
 
void set_number_of_rows (size_t nr_)
 
void set_number_of_columns (size_t nc_)
 
size_t get_number_of_rows () const
 
size_t get_number_of_columns () const
 
void get_placement (int col_, int row_, placement &p_) const
 
placement get_placement (int col_, int row_) const
 
virtual bool has_only_one_rotation () const
 Check if the placement is based on one unique rotation. More...
 
virtual size_t get_dimension () const
 
virtual bool is_replica () const
 Check if the placement is a replica (GDML/Geant4 concept for multiple placement objects) More...
 
virtual size_t get_number_of_items () const
 Return the number of placement items. More...
 
virtual void get_placement (int item_, placement &p_) const
 Compute the placement at given item rank/index. More...
 
virtual size_t compute_index_map (std::vector< uint32_t > &map_, int item_) const
 Compute an array of indexes in a multidimensional frame from the item rank/index. More...
 
 regular_grid_placement ()
 
 regular_grid_placement (const placement &basic_placement_, double column_step_, double row_step_, size_t number_of_columns_, size_t number_of_rows_, int mode_, bool centered_=true)
 
virtual ~regular_grid_placement ()
 
void init (const placement &basic_placement_, double column_step_, double row_step_, size_t number_of_columns_, size_t number_of_rows_, int mode_, bool centered_=true)
 
virtual void reset ()
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="geomutils::regular_grid_placement", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
- Public Member Functions inherited from geomtools::i_placement
 i_placement ()
 Default constructor. More...
 
virtual ~i_placement ()
 Destructor. More...
 
bool is_multiple () const
 Check if the placement handles multiple positions. More...
 
placement get_placement (int item_) const
 Return the placement at given item rank/index. More...
 
placement get_placement_by_index (int item_) const
 Same as get_placement(int) but workaround method overloading for CAMP. More...
 
void compute_placement (int item_, placement &p_) const
 Compute the placement at given item rank/index. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Static Public Attributes

static const bool CENTERED = true
 
static const bool UNCENTERED = false
 

Additional Inherited Members

- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Member Enumeration Documentation

◆ mode_type

Orientation of the grid placement.

Enumerator
MODE_XY 
MODE_YZ 
MODE_XZ 

Constructor & Destructor Documentation

◆ regular_grid_placement() [1/2]

geomtools::regular_grid_placement::regular_grid_placement ( )

◆ regular_grid_placement() [2/2]

geomtools::regular_grid_placement::regular_grid_placement ( const placement basic_placement_,
double  column_step_,
double  row_step_,
size_t  number_of_columns_,
size_t  number_of_rows_,
int  mode_,
bool  centered_ = true 
)

◆ ~regular_grid_placement()

virtual geomtools::regular_grid_placement::~regular_grid_placement ( )
virtual

Member Function Documentation

◆ compute_index_map()

virtual size_t geomtools::regular_grid_placement::compute_index_map ( std::vector< uint32_t > &  map_,
int  item_ 
) const
virtual

Compute an array of indexes in a multidimensional frame from the item rank/index.

Implements geomtools::i_placement.

◆ get_basic_placement() [1/2]

const placement& geomtools::regular_grid_placement::get_basic_placement ( ) const

◆ get_basic_placement() [2/2]

placement& geomtools::regular_grid_placement::get_basic_placement ( )
Deprecated:
Please use grab_basic_placement

◆ get_column_step()

double geomtools::regular_grid_placement::get_column_step ( ) const

◆ get_dimension()

virtual size_t geomtools::regular_grid_placement::get_dimension ( ) const
virtual

Return the dimension of the placement object

A single unique placement is of dimension 0 A multiple placement replicated along a given axis is of dimension 0 A multiple placement replicated along a 2D mesh addresses by X-Y grid coordinates is of dimension 2

Implements geomtools::i_placement.

◆ get_mode()

int geomtools::regular_grid_placement::get_mode ( ) const

◆ get_number_of_columns()

size_t geomtools::regular_grid_placement::get_number_of_columns ( ) const

◆ get_number_of_items()

virtual size_t geomtools::regular_grid_placement::get_number_of_items ( ) const
virtual

Return the number of placement items.

Implements geomtools::i_placement.

◆ get_number_of_rows()

size_t geomtools::regular_grid_placement::get_number_of_rows ( ) const

◆ get_placement() [1/3]

void geomtools::regular_grid_placement::get_placement ( int  col_,
int  row_,
placement p_ 
) const

◆ get_placement() [2/3]

placement geomtools::regular_grid_placement::get_placement ( int  col_,
int  row_ 
) const

◆ get_placement() [3/3]

virtual void geomtools::regular_grid_placement::get_placement ( int  item_,
placement p_ 
) const
virtual

Compute the placement at given item rank/index.

Implements geomtools::i_placement.

◆ get_row_step()

double geomtools::regular_grid_placement::get_row_step ( ) const

◆ get_x_step()

double geomtools::regular_grid_placement::get_x_step ( ) const

◆ get_y_step()

double geomtools::regular_grid_placement::get_y_step ( ) const

◆ get_z_step()

double geomtools::regular_grid_placement::get_z_step ( ) const

◆ grab_basic_placement()

placement& geomtools::regular_grid_placement::grab_basic_placement ( )

◆ has_only_one_rotation()

virtual bool geomtools::regular_grid_placement::has_only_one_rotation ( ) const
virtual

Check if the placement is based on one unique rotation.

Reimplemented from geomtools::i_placement.

◆ init()

void geomtools::regular_grid_placement::init ( const placement basic_placement_,
double  column_step_,
double  row_step_,
size_t  number_of_columns_,
size_t  number_of_rows_,
int  mode_,
bool  centered_ = true 
)

◆ invalidate()

void geomtools::regular_grid_placement::invalidate ( )

◆ is_centered()

bool geomtools::regular_grid_placement::is_centered ( ) const

◆ is_mode_xy()

bool geomtools::regular_grid_placement::is_mode_xy ( ) const

◆ is_mode_xz()

bool geomtools::regular_grid_placement::is_mode_xz ( ) const

◆ is_mode_yz()

bool geomtools::regular_grid_placement::is_mode_yz ( ) const

◆ is_replica()

virtual bool geomtools::regular_grid_placement::is_replica ( ) const
virtual

Check if the placement is a replica (GDML/Geant4 concept for multiple placement objects)

Implements geomtools::i_placement.

◆ is_valid()

bool geomtools::regular_grid_placement::is_valid ( ) const

◆ reset()

virtual void geomtools::regular_grid_placement::reset ( )
virtual

◆ set_basic_placement()

void geomtools::regular_grid_placement::set_basic_placement ( const placement bp_)

◆ set_centered()

void geomtools::regular_grid_placement::set_centered ( bool  c_)

◆ set_column_step()

void geomtools::regular_grid_placement::set_column_step ( double  dx_)

◆ set_mode()

void geomtools::regular_grid_placement::set_mode ( int  m_)

◆ set_number_of_columns()

void geomtools::regular_grid_placement::set_number_of_columns ( size_t  nc_)

◆ set_number_of_rows()

void geomtools::regular_grid_placement::set_number_of_rows ( size_t  nr_)

◆ set_row_step()

void geomtools::regular_grid_placement::set_row_step ( double  dx_)

◆ set_steps()

void geomtools::regular_grid_placement::set_steps ( double  dx_,
double  dy_ 
)

◆ tree_dump()

virtual void geomtools::regular_grid_placement::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "geomutils::regular_grid_placement",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from geomtools::i_placement.

Member Data Documentation

◆ CENTERED

const bool geomtools::regular_grid_placement::CENTERED = true
static

◆ UNCENTERED

const bool geomtools::regular_grid_placement::UNCENTERED = false
static

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