Bayeux  3.4.1
Core Foundation library for SuperNEMO
replicated_boxed_model.h
Go to the documentation of this file.
1 /* Author (s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-24
4  * Last modified: 2010-02-24
5  *
6  * License:
7  *
8  * Description:
9  * Factory for geometry models
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_REPLICATED_BOXED_MODEL_H
16 #define GEOMTOOLS_REPLICATED_BOXED_MODEL_H 1
17 
18 // Standard libraries:
19 #include <string>
20 #include <iostream>
21 
22 // This project:
26 #include <geomtools/box.h>
27 
28 namespace geomtools {
29 
30  class box;
31 
32  // \brief A geometry model implementing a single box with daughter boxes replicated along an axis
33  class replicated_boxed_model : public i_boxed_model
34  {
35 
36  public:
37 
38  void set_number_of_items (size_t);
39  size_t get_number_of_items ();
40  void set_boxed_model (const i_model &);
41  const i_model & get_boxed_model () const;
42 
43  double get_x () const;
44  double get_y () const;
45  double get_z () const;
46  virtual const geomtools::box & get_box () const;
47  const geomtools::box & get_solid () const;
48 
50 
51  virtual ~replicated_boxed_model ();
52 
53  virtual std::string get_model_id () const;
54 
55  virtual void tree_dump (std::ostream & out_ = std::clog,
56  const std::string & title_ = "",
57  const std::string & indent_ = "",
58  bool inherit_ = false) const;
59 
60  protected:
61 
62  virtual void _at_construct (const std::string & name_,
63  const datatools::properties & config_,
64  models_col_type * models_ = 0);
65  private:
66 
67  const i_model * _boxed_model_;
68  regular_linear_placement _boxed_replica_placement_;
69  physical_volume _boxed_phys_;
70  size_t _number_of_items_;
71  double _x_;
72  double _y_;
73  double _z_;
74  geomtools::box _solid_;
75 
76  // registration interface :
78 
79  };
80 
81 } // end of namespace geomtools
82 
83 #endif // GEOMTOOLS_REPLICATED_BOXED_MODEL_H
84 
85 /*
86 ** Local Variables: --
87 ** mode: c++ --
88 ** c-file-style: "gnu" --
89 ** tab-width: 2 --
90 ** End: --
91 */
The base class for geometry models.
Definition: i_model.h:45
The 3D shape model for a box.
Definition: box.h:44
A physical geometry volume (ala GDML)
Definition: physical_volume.h:36
std::map< std::string, i_model * > models_col_type
Type alias for dictionary of geometry model plain handles.
Definition: model_tools.h:29
virtual void _at_construct(const std::string &name_, const datatools::properties &config_, models_col_type *models_=0)
void set_boxed_model(const i_model &)
const i_model & get_boxed_model() const
virtual const geomtools::box & get_box() const
Definition: replicated_boxed_model.h:33
virtual std::string get_model_id() const
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
#define GEOMTOOLS_MODEL_REGISTRATION_INTERFACE(ModelClassName)
Definition: model_macros.h:30
const geomtools::box & get_solid() const
Regular linear placement.
Definition: regular_linear_placement.h:32
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125