Bayeux  3.4.1
Core Foundation library for SuperNEMO
in_materials_vertex_validator.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-07-16
4  * Last modified: 2014-07-16
5  *
6  * License: GPL 3.0
7  *
8  * Description:
9  *
10  * History:
11  *
12  */
13 
14 #ifndef GENVTX_IN_MATERIALS_VERTEX_VALIDATOR_H
15 #define GENVTX_IN_MATERIALS_VERTEX_VALIDATOR_H 1
16 
17 // Standard library:
18 #include <string>
19 #include <set>
20 
21 // Third party:
22 // - Bayeux/cuts:
23 #include <cuts/i_cut.h>
24 
25 namespace genvtx {
26 
29  {
30  public:
31 
35 
38 
40  virtual void initialize(const datatools::properties &,
43 
45  virtual void reset();
46 
48  bool is_reversed() const;
49 
51  void set_reversed(bool);
52 
54  void add_material(const std::string & material_name_);
55 
57  bool has_material(const std::string & material_name_) const;
58 
60  bool has_max_depth() const;
61 
63  void set_max_depth(int);
64 
66  int get_max_depth() const;
67 
69  virtual void tree_dump(std::ostream & out_ = std::clog,
70  const std::string & title_ = "",
71  const std::string & indent_ = "",
72  bool inherit_ = false) const;
73 
74  protected :
75 
77  virtual int _accept();
78 
79  private:
80 
81  bool _reversed_;
82  std::set<std::string> _materials_;
83  int _max_depth_;
84 
87 
88  };
89 
90 } // end of namespace genvtx
91 
92 #endif // GENVTX_IN_MATERIALS_VERTEX_VALIDATOR_H
93 
94 /*
95 ** Local Variables: --
96 ** mode: c++ --
97 ** c-file-style: "gnu" --
98 ** tab-width: 2 --
99 ** End: --
100 */
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
bool has_material(const std::string &material_name_) const
Check if a given material name is set.
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: logger.h:85
The cut abstract base class (interface)
Definition: i_cut.h:62
void add_material(const std::string &material_name_)
Add the name of a material to be validated.
bool is_reversed() const
Check reversed flag.
in_materials_vertex_validator(datatools::logger::priority a_logging_priority=datatools::logger::PRIO_FATAL)
Constructor.
int get_max_depth() const
Return the maximum depth in the hierarchy of daughter volumes to investigate materials.
virtual void initialize(const datatools::properties &, datatools::service_manager &, cuts::cut_handle_dict_type &)
Initialization.
void set_reversed(bool)
Set the reversed flag.
virtual int _accept()
Selection.
#define CUT_REGISTRATION_INTERFACE(T)
Definition: i_cut.h:411
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
void set_max_depth(int)
Set the maximum depth in the hierarchy of daughter volumes to investigate materials.
std::map< std::string, cut_entry_type > cut_handle_dict_type
Alias type of a dictionary of cut entry.
Definition: cut_tools.h:175
bool has_max_depth() const
Check the use of a maximum depth in the hierarchy of daughter volumes to investigate materials.
The vertex validation.
Definition: in_materials_vertex_validator.h:28
virtual ~in_materials_vertex_validator()
Destructor.
Service management class.
Definition: service_manager.h:57
A dictionary of arbitrary properties.
Definition: properties.h:125