Bayeux  3.4.1
Core Foundation library for SuperNEMO
replicated_circular_model.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-05-15
4  * Last modified: 2014-05-17
5  *
6  * License:
7  *
8  * Description:
9  * Replicated model
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_REPLICATED_CIRCULAR_MODEL_H
16 #define GEOMTOOLS_REPLICATED_CIRCULAR_MODEL_H 1
17 
18 // Standard library:
19 #include <string>
20 #include <iostream>
21 
22 // This project:
26 #include <geomtools/tube.h>
27 #include <geomtools/i_stackable.h>
29 
30 namespace geomtools {
31 
32 
33  // Define a geometry model with a replicated circular volume within a tube:
35  {
36 
37  public:
38 
40  void set_model(const i_model &);
41 
43  const i_model & get_model() const;
44 
46  const geomtools::tube & get_solid() const;
47 
49  virtual std::string get_model_id() const;
50 
53 
55  const MWIM & get_internals () const;
56 
59 
62 
64  virtual void tree_dump(std::ostream & out_ = std::clog,
65  const std::string & title_ = "",
66  const std::string & indent_ = "",
67  bool inherit_ = false) const;
68 
69  protected:
70 
72  virtual void _pre_construct(datatools::properties & setup_,
73  models_col_type * models_ = 0);
74 
76  virtual void _at_construct(const std::string & name_,
77  const datatools::properties & config_,
78  models_col_type * models_ = 0);
79 
81  virtual void _post_construct (datatools::properties & setup_,
82  models_col_type * models_ = 0);
83 
84  private:
85 
86  const i_model * _model_;
87  regular_circular_placement _replica_placement_;
88  physical_volume _phys_;
89  // stackable_data _sd_;
90  geomtools::tube _solid_;
91  MWIM _internals_;
92 
93  // registration interface :
95 
96  };
97 
98 } // end of namespace geomtools
99 
100 #include <datatools/ocd_macros.h>
102 
103 #endif // GEOMTOOLS_REPLICATED_CIRCULAR_MODEL_H
104 
105 /*
106 ** Local Variables: --
107 ** mode: c++ --
108 ** c-file-style: "gnu" --
109 ** tab-width: 2 --
110 ** End: --
111 */
The base class for geometry models.
Definition: i_model.h:45
replicated_circular_model()
Default constructor.
virtual void _pre_construct(datatools::properties &setup_, models_col_type *models_=0)
Pre-construction.
A physical geometry volume (ala GDML)
Definition: physical_volume.h:36
Handler for internal items.
Definition: model_with_internal_items_tools.h:37
const MWIM & get_internals() const
Return a reference to the embedded MWIM object.
The 3D shape model for a tube.
Definition: tube.h:45
const i_model & get_model() const
Return the replicated model.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
virtual void _post_construct(datatools::properties &setup_, models_col_type *models_=0)
Post-construction.
const geomtools::tube & get_solid() const
Return the mother solid.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual std::string get_model_id() const
Return the model Id.
geomtools::models_col_type models_col_type
The collection of geometry models:
Definition: i_model.h:58
void set_model(const i_model &)
Set the replicated model.
virtual void _at_construct(const std::string &name_, const datatools::properties &config_, models_col_type *models_=0)
Construction.
Definition: replicated_circular_model.h:34
Regular circular placement.
Definition: regular_circular_placement.h:32
virtual ~replicated_circular_model()
Destructor.
#define GEOMTOOLS_MODEL_REGISTRATION_INTERFACE(ModelClassName)
Definition: model_macros.h:30
const regular_circular_placement & get_replica_placement() const
Return a reference to the embedded the regular circular placement object.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125