Bayeux
3.4.1
Core Foundation library for SuperNEMO
bayeux
geomtools
geom_info.h
Go to the documentation of this file.
1
/* Author (s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3
* Creation date: 2010-04-30
4
* Last modified: 2010-04-30
5
*
6
* License:
7
*
8
* Description:
9
*
10
* Geometry information about an object from a geometry setup.
11
*
12
* History:
13
*
14
*/
15
16
#ifndef GEOMTOOLS_GEOM_INFO_H
17
#define GEOMTOOLS_GEOM_INFO_H 1
18
19
// Standard library:
20
#include <iostream>
21
22
// Third party:
23
// - Bayeux/datatools:
24
#include <
datatools/properties.h
>
25
#include <
datatools/i_predicate.h
>
26
27
// This project:
28
#include <
geomtools/geom_id.h
>
29
#include <
geomtools/placement.h
>
30
#include <
geomtools/logical_volume.h
>
31
32
namespace
geomtools
{
33
34
// Forward declaration:
35
class
logical_volume;
36
38
class
geom_info
39
{
40
41
public
:
42
44
geom_info
();
45
47
geom_info
(
const
geom_id
&);
48
50
geom_info
(
const
geom_id
&,
51
const
placement
&,
52
const
logical_volume
&);
53
55
bool
has_logical
()
const
;
56
58
const
placement
&
get_world_placement
()
const
;
59
61
const
logical_volume
&
get_logical
()
const
;
62
64
const
geom_id
&
get_id
()
const
;
65
67
const
geom_id
&
get_gid
()
const
;
68
70
const
geom_id
&
get_geom_id
()
const
;
71
73
const
datatools::properties
&
get_properties
()
const
;
74
76
datatools::properties
&
get_properties
();
77
79
friend
std::ostream &
operator<<
(std::ostream &,
const
geom_info
&);
80
81
private
:
82
83
datatools::properties
_properties_;
84
geom_id
_gid_;
85
placement
_world_placement_;
86
const
logical_volume
* _logical_;
87
88
};
89
91
struct
has_geom_type_predicate
:
public
datatools::i_predicate
<geom_info>
92
{
93
has_geom_type_predicate
(uint32_t geom_type_) :
_geom_type_
(geom_type_)
94
{
95
return
;
96
}
97
bool
operator ()
(
const
geom_info
& ginfo_)
const
98
{
99
return
(ginfo_.
get_geom_id
().
get_type
() ==
_geom_type_
);
100
}
101
uint32_t
_geom_type_
;
102
};
103
105
typedef
std::map<geom_id, geom_info>
geom_info_dict_type
;
106
107
}
// end of namespace geomtools
108
109
#endif // GEOMTOOLS_GEOM_INFO_H
110
111
/*
112
** Local Variables: --
113
** mode: c++ --
114
** c-file-style: "gnu" --
115
** tab-width: 2 --
116
** End: --
117
*/
geomtools::geom_info::geom_info
geom_info()
Default constructor.
geom_id.h
geomtools::geom_info::get_gid
const geom_id & get_gid() const
Return the geometry Id.
geomtools::geom_info::get_properties
const datatools::properties & get_properties() const
Return a reference to the non mutable container of auxiliary properties.
geomtools::geom_info::get_world_placement
const placement & get_world_placement() const
Return the placement of the physical volume in the world coordinate system.
geomtools::geom_info::has_logical
bool has_logical() const
Check if a logical volume is defined.
geomtools::geom_info
A record for geometry information about a physical volume in a virtual geometry.
Definition:
geom_info.h:38
geomtools::logical_volume
A logical geometry volume (ala GDML)
Definition:
logical_volume.h:40
geomtools::geom_info::operator<<
friend std::ostream & operator<<(std::ostream &, const geom_info &)
Basic print.
geomtools::geom_info_dict_type
std::map< geom_id, geom_info > geom_info_dict_type
Dictionary of geometry information objects (key type is: geomtools::geom_id)
Definition:
geom_info.h:105
i_predicate.h
geomtools::has_geom_type_predicate::_geom_type_
uint32_t _geom_type_
Definition:
geom_info.h:101
geomtools::geom_info::get_geom_id
const geom_id & get_geom_id() const
Return the geometry Id.
datatools::i_predicate
A template predicate abstract class.
Definition:
i_predicate.h:12
geomtools::geom_info::get_logical
const logical_volume & get_logical() const
Return the logical volume.
geomtools::has_geom_type_predicate::has_geom_type_predicate
has_geom_type_predicate(uint32_t geom_type_)
Definition:
geom_info.h:93
geomtools::has_geom_type_predicate::operator()
bool operator()(const geom_info &ginfo_) const
Definition:
geom_info.h:97
properties.h
logical_volume.h
geomtools::placement
The placement for a geometry volume with its translation and rotation with respect to some mother ref...
Definition:
placement.h:34
placement.h
geomtools::geom_id
Definition:
geom_id.h:41
geomtools::has_geom_type_predicate
Predicate that tests if a geom_info object has a given geometry Id.
Definition:
geom_info.h:91
geomtools::geom_id::get_type
uint32_t get_type() const
Return the type.
geomtools::geom_info::get_id
const geom_id & get_id() const
Return the geometry Id.
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