Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | List of all members
geomtools::id_selector Class Reference

A selector of geometry IDs using a specific geometry category. More...

#include <bayeux/geomtools/id_selector.h>

Public Member Functions

 id_selector ()
 Default constructor. More...
 
 id_selector (const id_mgr &id_mgr_)
 Constructor. More...
 
 ~id_selector ()
 Destructor. More...
 
bool is_initialized () const
 Check initialization status. More...
 
void initialize (const std::string &rules_)
 
void initialize (const datatools::properties &config_)
 
void reset ()
 Reset the selector. More...
 
void set_id_mgr (const id_mgr &id_mgr_)
 Set the GID manager. More...
 
const id_mgr::category_infoget_category_info () const
 Get the information associated to the requested geometry category. More...
 
bool match (const geom_id &gid_) const
 Check if a geometry ID match the selection. More...
 
void dump (std::ostream &out_=std::clog, const std::string &title_="") const
 Print. More...
 
void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="") const
 Print. More...
 

Detailed Description

A selector of geometry IDs using a specific geometry category.

The selector is given a textual rule that describes:

Constructor & Destructor Documentation

◆ id_selector() [1/2]

geomtools::id_selector::id_selector ( )

Default constructor.

◆ id_selector() [2/2]

geomtools::id_selector::id_selector ( const id_mgr id_mgr_)

Constructor.

◆ ~id_selector()

geomtools::id_selector::~id_selector ( )

Destructor.

Member Function Documentation

◆ dump()

void geomtools::id_selector::dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "" 
) const

Print.

◆ get_category_info()

const id_mgr::category_info& geomtools::id_selector::get_category_info ( ) const

Get the information associated to the requested geometry category.

◆ initialize() [1/2]

void geomtools::id_selector::initialize ( const std::string &  rules_)

Initialize the selector from a textual rule Supported syntax is:

"category='name' [NAME1=rule1 [NAME1=rule2 [...]]]"

where :

  • 'name' is the identifier of an exiting geometry category published by the ID manager.
  • 'ruleN' represents a set of addresses associated to the NAMEN addressing level. Supported formats are:
    • singleton: {5}
    • range: [0;4]
    • list: [0; 1; 4; 12; 42]
    • all: {*} Example:
      "category='detector' row={1} column=[0;4]"

◆ initialize() [2/2]

void geomtools::id_selector::initialize ( const datatools::properties config_)

Initialize the selector from a set of properties Supported properties are:

  • category (string) : the identifier of an exiting geometry category published by the ID manager.
  • address.NAME.set (string) : the rule representing the set of addresses associated to the NAME addressing level Example:
    category : string = "detector" # Detection unit
    address.row.set : string = "{1}" # Row #1
    address.column.set : string = "[0;4]" # Column from #0 to #4

◆ is_initialized()

bool geomtools::id_selector::is_initialized ( ) const

Check initialization status.

◆ match()

bool geomtools::id_selector::match ( const geom_id gid_) const

Check if a geometry ID match the selection.

◆ reset()

void geomtools::id_selector::reset ( )

Reset the selector.

◆ set_id_mgr()

void geomtools::id_selector::set_id_mgr ( const id_mgr id_mgr_)

Set the GID manager.

◆ tree_dump()

void geomtools::id_selector::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "" 
) const

Print.


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