Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The base class for hit objects that locate events in a geometry model. More...
#include <bayeux/geomtools/base_hit.h>
Classes | |
class | has_flag_predicate |
Predicate that checks if the auxiliaries container stores some specific flag. More... | |
class | has_geom_id_predicate |
Predicate that checks if the hit has some specific geometry ID. More... | |
class | has_hit_id_predicate |
Predicate that checks if the hit has some specific ID. More... | |
class | has_key_predicate |
Predicate that checks if the auxiliaries container stores some property with a specific key. More... | |
class | has_string_property_predicate |
Predicate that checks if the auxiliaries container stores some property with a specific key. More... | |
class | i_measurement |
Generic abstract interface for a measurement on a hit. More... | |
class | negates_predicate |
Predicate that negates another predicate. More... | |
Public Types | |
enum | store_mask_type { STORE_NOTHING = 0, STORE_HIT_ID = datatools::bit_mask::bit00, STORE_GEOM_ID = datatools::bit_mask::bit01, STORE_AUXILIARIES = datatools::bit_mask::bit02, STORE_RESERVED30 = datatools::bit_mask::bit30, STORE_RESERVED31 = datatools::bit_mask::bit31 } |
Masks to automatically tag the attributes to be stored. 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 | has_hit_id () const |
int32_t | get_hit_id () const |
void | set_hit_id (int32_t) |
Set the hit ID integer value. More... | |
void | invalidate_hit_id () |
bool | has_geom_id () const |
Check if the geometry ID is valid. More... | |
const geomtools::geom_id & | get_geom_id () const |
Get a reference on the non-mutable geometry ID. More... | |
geomtools::geom_id & | grab_geom_id () |
Get a reference on the mutable geometry ID. More... | |
void | set_geom_id (const geomtools::geom_id &) |
Set the geometry ID. More... | |
void | invalidate_geom_id () |
Reset the geometry ID. More... | |
bool | has_auxiliaries () const |
Check if there are stored auxiliary properties. More... | |
const datatools::properties & | get_auxiliaries () const |
Get a non-mutable reference on the auxiliaries container. More... | |
datatools::properties & | grab_auxiliaries () |
Get a mutable reference on the auxiliaries container. More... | |
void | set_auxiliaries (const datatools::properties &) |
Set the auxiliaries container. More... | |
void | invalidate_auxiliaries () |
Reset the mutable auxiliaries container. More... | |
base_hit () | |
Default constructor. More... | |
virtual | ~base_hit () |
Destructor. More... | |
virtual bool | is_valid () const |
Check if the hit is valid. More... | |
virtual void | invalidate () |
Reset the internals of the hit, making it invalid. More... | |
void | reset () |
Reset the internals of the hit, making it invalid. More... | |
virtual void | clear () |
Reset the internals of the hit, making it invalid. More... | |
base_hit & | measure (i_measurement &) |
Apply a measurement on the current hit. More... | |
virtual void | tree_dump (std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const |
void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=datatools::i_tree_dumpable::empty_options()) const override |
void | dump () const |
Smart print (default behaviour) 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... | |
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 |
Public Member Functions inherited from datatools::i_clear | |
virtual | ~i_clear () |
Destructor. More... | |
Static Public Attributes | |
static const int32_t | INVALID_HIT_ID = -1 |
Protected Member Functions | |
void | _store_set (uint32_t bit_mask_) |
Set the bits from a mask. More... | |
void | _store_unset (uint32_t bit_mask_) |
Unset the bits from a mask. More... | |
bool | _store_check (uint32_t bit_mask_) const |
Check the bits from a mask. More... | |
Protected Attributes | |
uint32_t | _store |
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_) |
The base class for hit objects that locate events in a geometry model.
Masks to automatically tag the attributes to be stored.
geomtools::base_hit::base_hit | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
Check the bits from a mask.
|
protected |
Set the bits from a mask.
|
protected |
Unset the bits from a mask.
|
virtual |
Reset the internals of the hit, making it invalid.
Implements datatools::i_clear.
Reimplemented in mctools::base_step_hit.
void geomtools::base_hit::dump | ( | ) | const |
Smart print (default behaviour)
const datatools::properties& geomtools::base_hit::get_auxiliaries | ( | ) | const |
Get a non-mutable reference on the auxiliaries container.
const geomtools::geom_id& geomtools::base_hit::get_geom_id | ( | ) | const |
Get a reference on the non-mutable geometry ID.
int32_t geomtools::base_hit::get_hit_id | ( | ) | const |
Get the hit ID integer value
datatools::properties& geomtools::base_hit::grab_auxiliaries | ( | ) |
Get a mutable reference on the auxiliaries container.
geomtools::geom_id& geomtools::base_hit::grab_geom_id | ( | ) |
Get a reference on the mutable geometry ID.
bool geomtools::base_hit::has_auxiliaries | ( | ) | const |
Check if there are stored auxiliary properties.
bool geomtools::base_hit::has_geom_id | ( | ) | const |
Check if the geometry ID is valid.
bool geomtools::base_hit::has_hit_id | ( | ) | const |
Check if the hit ID is valid
|
virtual |
Reset the internals of the hit, making it invalid.
Reimplemented in mctools::base_step_hit, and geomtools::blur_spot.
void geomtools::base_hit::invalidate_auxiliaries | ( | ) |
Reset the mutable auxiliaries container.
void geomtools::base_hit::invalidate_geom_id | ( | ) |
Reset the geometry ID.
void geomtools::base_hit::invalidate_hit_id | ( | ) |
Reset the hit ID integer value
|
virtual |
Check if the hit is valid.
We consider a base hit valid if:
Reimplemented in mctools::base_step_hit, geomtools::blur_spot, mctools::digitization::sampled_signal, and mctools::signal::base_signal.
base_hit& geomtools::base_hit::measure | ( | i_measurement & | ) |
Apply a measurement on the current hit.
|
overridevirtual |
Supported options:
Reimplemented from datatools::i_tree_dumpable.
Reimplemented in mctools::base_step_hit.
void geomtools::base_hit::reset | ( | ) |
Reset the internals of the hit, making it invalid.
void geomtools::base_hit::set_auxiliaries | ( | const datatools::properties & | ) |
Set the auxiliaries container.
void geomtools::base_hit::set_geom_id | ( | const geomtools::geom_id & | ) |
Set the geometry ID.
void geomtools::base_hit::set_hit_id | ( | int32_t | ) |
Set the hit ID integer value.
|
virtual |
Reimplemented from datatools::i_tree_dumpable.
Reimplemented in mctools::base_step_hit, mctools::signal::base_signal, geomtools::blur_spot, and mctools::digitization::sampled_signal.
|
protected |
The store field records the usage status of the each data field members. One bit is affected to each field: 0 : field member is not used 1 : field member is used This enables to serialize only the useful part of the hit. It is made protected in order to allow daughter classes to use it (32 bits are available)
|
static |