Bayeux
3.4.1
Core Foundation library for SuperNEMO
bayeux
geomtools
i_locator.h
Go to the documentation of this file.
1
/* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3
* Xavier Garrido <garrido@lal.in2p3.fr>
4
* Creation date: 2010-02-09
5
* Last modified: 2013-07-16
6
*
7
* License:
8
*
9
* Description:
10
*
11
* Geometry locator abstract interface
12
*
13
* History:
14
*
15
*/
16
17
#ifndef GEOMTOOLS_I_LOCATOR_H
18
#define GEOMTOOLS_I_LOCATOR_H 1
19
20
// This project:
21
#include <
geomtools/clhep.h
>
22
#include <
geomtools/geomtools_config.h
>
23
#include <
geomtools/geom_id.h
>
24
25
namespace
geomtools
{
26
27
class
geom_info;
28
31
class
i_base_locator
32
{
33
virtual
bool
find_geom_id (
const
vector_3d
& position_,
34
int
type_,
35
geom_id
& gid_,
36
double
tolerance_ =
GEOMTOOLS_PROPER_TOLERANCE
)
const
= 0;
37
38
};
39
42
class
i_locator
:
public
i_base_locator
43
{
44
45
public
:
46
48
virtual
bool
validate_id
(
const
geom_id
& id_)
const
= 0;
49
51
virtual
const
geom_info
&
get_geom_info
(
const
geom_id
& id_)
const
= 0;
52
53
56
virtual
const
geom_id
&
get_geom_id
(
const
vector_3d
& position_,
57
int
type_ =
geom_id::INVALID_TYPE
,
58
double
tolerance_ =
GEOMTOOLS_PROPER_TOLERANCE
)
const
= 0;
59
62
virtual
bool
find_geom_id
(
const
vector_3d
& position_,
63
int
type_,
64
geom_id
& gid_,
65
double
tolerance_ =
GEOMTOOLS_PROPER_TOLERANCE
)
const
;
66
67
};
68
69
class
manager
;
70
71
class
base_locator
:
public
i_base_locator
72
{
73
public
:
74
76
base_locator
();
77
79
virtual
~base_locator
();
80
82
virtual
void
initialize
(
const
datatools::properties
& config_) = 0;
83
85
bool
has_geo_manager
()
const
;
86
88
void
set_geo_manager
(
const
manager
& mgr_);
89
91
const
manager
&
get_geo_manager
()
const
;
92
94
virtual
void
reset
() = 0;
95
97
virtual
bool
is_initialized
()
const
= 0;
98
100
datatools::logger::priority
get_logging_priority
()
const
;
101
103
void
set_logging_priority
(
datatools::logger::priority
);
104
107
virtual
bool
find_geom_id
(
const
vector_3d
& position_,
108
int
type_,
109
geom_id
& gid_,
110
double
tolerance_ =
GEOMTOOLS_PROPER_TOLERANCE
)
const
= 0;
111
112
protected
:
113
114
void
_basic_initialize
(
const
datatools::properties
& config_);
115
116
datatools::logger::priority
_logging_priority
;
117
118
private
:
119
120
const
geomtools::manager
* _geo_manager_;
121
};
122
123
}
// end of namespace geomtools
124
125
#endif // GEOMTOOLS_I_LOCATOR_H
126
127
/*
128
** Local Variables: --
129
** mode: c++ --
130
** c-file-style: "gnu" --
131
** tab-width: 2 --
132
** End: --
133
*/
geomtools::base_locator::_logging_priority
datatools::logger::priority _logging_priority
Definition:
i_locator.h:116
geomtools::base_locator::_basic_initialize
void _basic_initialize(const datatools::properties &config_)
datatools::logger::priority
priority
Priority levels for logging from most to least critical.
Definition:
logger.h:82
geomtools::i_locator::get_geom_id
virtual const geom_id & get_geom_id(const vector_3d &position_, int type_=geom_id::INVALID_TYPE, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const =0
geomtools_config.h
geom_id.h
geomtools::i_locator
Definition:
i_locator.h:42
geomtools::base_locator::has_geo_manager
bool has_geo_manager() const
Check if there is a geometry manager.
geomtools::base_locator
Definition:
i_locator.h:71
geomtools::base_locator::set_geo_manager
void set_geo_manager(const manager &mgr_)
Set the reference to the geometry manager.
geomtools::base_locator::initialize
virtual void initialize(const datatools::properties &config_)=0
Main initialization method from a list of properties.
geomtools::geom_info
A record for geometry information about a physical volume in a virtual geometry.
Definition:
geom_info.h:38
clhep.h
geomtools::base_locator::base_locator
base_locator()
Constructor.
GEOMTOOLS_PROPER_TOLERANCE
#define GEOMTOOLS_PROPER_TOLERANCE
Definition:
geomtools_config.h:26
geomtools::i_locator::validate_id
virtual bool validate_id(const geom_id &id_) const =0
Given a geometry ID, check if it is valid (known within some internal table).
geomtools::i_base_locator
Definition:
i_locator.h:31
geomtools::base_locator::find_geom_id
virtual bool find_geom_id(const vector_3d &position_, int type_, geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const =0
geomtools::base_locator::get_geo_manager
const manager & get_geo_manager() const
Get a non-mutable reference to the geometry manager.
geomtools::i_locator::get_geom_info
virtual const geom_info & get_geom_info(const geom_id &id_) const =0
Given a geometry ID, returns the associated geom_info instance (from some internal table).
geomtools::base_locator::is_initialized
virtual bool is_initialized() const =0
Check if locator is initialized.
geomtools::vector_3d
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition:
clhep.h:63
geomtools::base_locator::reset
virtual void reset()=0
Main reset method.
geomtools::manager
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of variou...
Definition:
manager.h:70
geomtools::geom_id
Definition:
geom_id.h:41
geomtools::geom_id::INVALID_TYPE
static const uint32_t INVALID_TYPE
Definition:
geom_id.h:45
geomtools::base_locator::~base_locator
virtual ~base_locator()
Destructor.
geomtools::base_locator::get_logging_priority
datatools::logger::priority get_logging_priority() const
Get the logging priority threshold.
geomtools::i_locator::find_geom_id
virtual bool find_geom_id(const vector_3d &position_, int type_, geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
geomtools::base_locator::set_logging_priority
void set_logging_priority(datatools::logger::priority)
Set the logging priority threshold.
geomtools
Top-level namespace of the Bayeux/geomtools module library.
Definition:
electromagnetic_field_manager.h:39
datatools::properties
A dictionary of arbitrary properties.
Definition:
properties.h:125
Generated by
1.8.15