Bayeux  3.4.1
Core Foundation library for SuperNEMO
physical_volume.h
Go to the documentation of this file.
1 /* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-08
4  * Last modified: 2010-02-08
5  *
6  * License:
7  *
8  * Description:
9  * Physical geometry volume
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_PHYSICAL_VOLUME_H
16 #define GEOMTOOLS_PHYSICAL_VOLUME_H 1
17 
18 // Standard library:
19 #include <iostream>
20 #include <string>
21 #include <map>
22 
23 // Third party:
24 // - Bayeux/datatools:
25 #include <datatools/properties.h>
26 #include <datatools/i_tree_dump.h>
27 #include <datatools/logger.h>
28 
29 namespace geomtools {
30 
31  // Forward class declarations:
32  class i_placement;
33  class logical_volume;
34 
37  {
38 
39  public:
40 
41  bool is_locked() const;
42 
43  void lock();
44 
45  void unlock();
46 
47  const std::string & get_name() const;
48 
49  void set_name(const std::string &);
50 
51  const datatools::properties & get_parameters() const;
52 
54 
55  bool has_placement() const;
56 
57  void set_placement(const i_placement &);
58 
59  void set_placement(const i_placement *);
60 
61  const i_placement & get_placement() const;
62 
63  bool has_logical() const;
64 
65  void set_logical(const logical_volume &);
66 
67  void set_logical(const logical_volume *);
68 
69  const logical_volume & get_logical() const;
70 
71  bool has_mother() const;
72 
73  void set_mother(const logical_volume &, const std::string & name_ = "");
74 
75  const logical_volume & get_mother() const;
76 
77  bool has_real_mother() const;
78 
79  void set_real_mother(const logical_volume &);
80 
81  const logical_volume & get_real_mother() const;
82 
84 
85  physical_volume(const std::string & name_,
87 
88  physical_volume(const std::string & name_,
89  const logical_volume & logical_,
90  const logical_volume & mother_,
91  const i_placement & placement_,
93 
94  physical_volume(const std::string & name_,
95  const logical_volume * logical_,
96  const logical_volume & mother_,
97  const i_placement & placement_,
99 
100  physical_volume(const std::string & name_,
101  const logical_volume & logical_,
102  const logical_volume & mother_,
103  const i_placement * placement_,
105 
106  physical_volume(const std::string & name_,
107  const logical_volume * logical_,
108  const logical_volume & mother_,
109  const i_placement * placement_,
111 
112  virtual ~physical_volume();
113 
115 
117 
118  virtual void tree_dump(std::ostream & out_ = std::clog,
119  const std::string & title_ = "",
120  const std::string & indent_ = "",
121  bool inherit_ = false) const;
122  private:
123 
124  void _init_defaults_();
125 
126  void _clear_logical_();
127 
128  void _clear_placement_();
129 
130  private:
131 
132  std::string _name_;
133  datatools::logger::priority _logging_priority_;
134  bool _locked_;
135  datatools::properties _parameters_;
136  bool _own_placement_;
137  const i_placement * _placement_;
138  bool _own_logical_;
139  const logical_volume * _logical_;
140  const logical_volume * _mother_;
141  const logical_volume * _real_mother_;
142 
143  public:
144 
145  typedef std::map<std::string, const physical_volume *> dict_type;
146 
147  };
148 
149 } // end of namespace geomtools
150 
151 #endif // GEOMTOOLS_PHYSICAL_VOLUME_H
152 
153 /*
154 ** Local Variables: --
155 ** mode: c++ --
156 ** c-file-style: "gnu" --
157 ** tab-width: 2 --
158 ** End: --
159 */
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
An interface with utilities for printable objects.
Definition: i_tree_dump.h:36
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: logger.h:85
A physical geometry volume (ala GDML)
Definition: physical_volume.h:36
void set_logical(const logical_volume &)
std::map< std::string, const physical_volume * > dict_type
Definition: physical_volume.h:145
A logical geometry volume (ala GDML)
Definition: logical_volume.h:40
const logical_volume & get_mother() const
void set_real_mother(const logical_volume &)
void set_name(const std::string &)
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Main old interface method for printing.
void set_logging_priority(datatools::logger::priority)
void set_mother(const logical_volume &, const std::string &name_="")
const datatools::properties & get_parameters() const
datatools::properties & grab_parameters()
Abstract interface for all placement objects.
Definition: i_placement.h:42
Utilities for logging information.
physical_volume(datatools::logger::priority=datatools::logger::PRIO_FATAL)
const logical_volume & get_logical() const
void set_placement(const i_placement &)
const i_placement & get_placement() const
const std::string & get_name() const
const logical_volume & get_real_mother() const
datatools::logger::priority get_logging_priority() const
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125