15 #ifndef GENVTX_I_VERTEX_GENERATOR_H 16 #define GENVTX_I_VERTEX_GENERATOR_H 1 24 #include <boost/scoped_ptr.hpp> 25 #include <boost/noncopyable.hpp> 42 class service_manager;
56 class vertex_validation;
74 const std::string &
get_name()
const;
186 virtual void reset() = 0;
189 virtual void tree_dump(std::ostream & out_ = std::clog,
190 const std::string & title_ =
"",
191 const std::string & indent_ =
"",
192 bool inherit_ =
false)
const;
257 bool _time_generator_;
258 std::string _geo_label_;
259 std::string _geom_setup_requirement_;
260 const ::geomtools::manager * _geom_manager_;
263 bool _vertex_validation_support_;
264 boost::scoped_ptr<vertex_validation> _vertex_validation_;
275 #endif // GENVTX_I_VERTEX_GENERATOR_H const weight_info & get_total_weight() const
Get the weight info attached to the vertex generator.
void set_vertex_validation_support(bool)
Set vertex validation support flag.
void set_geo_label(const std::string &geo_label_)
Set the geometry service's label.
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
bool has_geom_manager() const
Check if a geometry manager is attached to the vertex generator.
const std::string & get_name() const
Return the name.
virtual void initialize(const datatools::properties &setup_, datatools::service_manager &service_manager_, vg_dict_type &dictionary_)=0
Main initialization interface method.
void check_geom_setup_requirement(const geomtools::manager *gmgr_) const
Check the geometry setup requirement with respect to a geometry manager.
virtual void _shoot_vertex_and_time(mygsl::rng &random_, geomtools::vector_3d &vertex_, double &time_)
Main vertex randomization interface method (default: throw exception)
bool has_name() const
Check if a name is defined.
void _initialize_vertex_validation(const datatools::properties &setup_, datatools::service_manager &service_manager_)
virtual void initialize_with_service_only(const datatools::properties &setup_, datatools::service_manager &service_manager_)
Initialization from a container of properties and a service manager.
bool has_total_weight() const
Check if some weight info is attached to the vertex generator.
void _set_time_generator(bool)
Set the time generator flag.
void set_logging_priority(datatools::logger::priority)
Set the logging priority threshold.
weight_info & _grab_total_weight()
Return a mutable total weight information.
void shoot_vertex_and_time(mygsl::rng &random_, geomtools::vector_3d &vertex_, double &time_)
Wrapper method for vertex/time randomization.
void _reset()
Internal reset.
std::string get_geom_setup_requirement() const
Return has a geometry setup requirement.
void set_external_prng(mygsl::rng &prng_)
Set the reference to an external PRNG.
datatools::logger::priority get_logging_priority() const
Return the logging priority threshold.
void set_debug(bool debug_)
Set the debug flag.
void _initialize_basics(const datatools::properties &setup_, datatools::service_manager &service_manager_)
bool has_geom_setup_requirement() const
Check if the generator has a geometry setup requirement.
bool has_external_prng() const
Check is an external PRNG is used.
bool is_debug() const
Check the debug flag.
The vertex validation.
Definition: vertex_validation.h:52
i_vertex_generator()
Constructor.
void set_geom_manager(const geomtools::manager &gmgr_)
Set a geometry manager.
const std::string & get_geo_label() const
Return the geometry service's label.
void _set_total_weight(const weight_info &a_info)
Set a total weight information.
virtual void initialize_simple()
Simple initialization(no external resource)
static void ocd_support(datatools::object_configuration_description &, const std::string &label_="")
OCD support.
mygsl::rng & grab_prng()
Return a mutable reference to the available PRNG.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual void initialize_with_dictionary_only(const datatools::properties &setup_, vg_dict_type &dictionary_)
Initialization from a container of properties, a service manager and a dictionnary of vertex generato...
bool has_prng() const
Check if a PRNG is available.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
Utilities for logging information.
The base interface class for all vertex generator classes.
Definition: i_vertex_generator.h:59
void set_name(const std::string &)
Set the name.
virtual bool is_initialized() const =0
Check initialization status.
void _initialize(const datatools::properties &setup_, datatools::service_manager &service_manager_)
Internal initialization.
Information about the weighting of combined vertex generators.
Definition: utils.h:84
Macros to automatically register vertex generator class.
vertex_validation & _grab_vertex_validation()
Return a reference to the embedded mutable vertex validation.
void _initialize_geo_manager(const datatools::properties &setup_, datatools::service_manager &service_manager_)
virtual void reset()=0
Reset method.
bool has_vertex_validation() const
Check vertex validation.
virtual ~i_vertex_generator()
Destructor.
virtual void _shoot_vertex(mygsl::rng &random_, geomtools::vector_3d &vertex_)
Main vertex randomization interface method.
const geomtools::manager & get_geom_manager() const
Get the geometry manager attached to the vertex generator.
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
#define DATATOOLS_FACTORY_SYSTEM_REGISTER_INTERFACE(BaseType)
Declaration of a system (allocator/functor) factory register as a static member of a base class and s...
Definition: factory_macros.h:52
bool has_geo_label() const
Check if the generator has a geometry service's label.
void set_geom_setup_requirement(const std::string &geom_setup_requirement_)
Set has a geometry setup requirement.
virtual void initialize_standalone(const datatools::properties &setup_)
Initialization from a container of properties.
virtual bool has_next_vertex() const
Check if another vertex is available.
Pseudo random number generator.
Definition: rng.h:53
virtual bool is_vertex_validation_supported() const
Check if vertex validation is supported.
bool is_time_generator() const
Check if the generator also generates a random time associated to the vertex.
datatools::logger::priority _logging_priority
Logging priority threshold.
Definition: i_vertex_generator.h:252
void shoot_vertex(mygsl::rng &random_, geomtools::vector_3d &vertex_)
Wrapper method for vertex randomization.