Bayeux  3.4.1
Core Foundation library for SuperNEMO
simulation_module.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date : 2011-07-04
4  * Last modified : 2013-12-13
5  *
6  * Description:
7  *
8  * Copyright (C) 2011-2013 Francois Mauger <mauger@lpccaen.in2p3.fr>
9  *
10  */
11 
12 #ifndef MCTOOLS_G4_SIMULATION_MODULE_H
13 #define MCTOOLS_G4_SIMULATION_MODULE_H 1
14 
15 // Third party:
16 // - Bayeux/dpp :
17 #include <dpp/base_module.h>
18 #include <mygsl/seed_manager.h>
20 
21 // This project:
23 
24 namespace geomtools {
25 // Forward declaration :
26 class manager;
27 }
28 
29 namespace mctools {
30 // Forward declaration :
31 class simulated_data;
32 
33 namespace g4 {
34 // Foward declarations
35 class manager;
36 class simulation_ctrl;
37 
40  public:
43 
45  virtual ~simulation_module();
46 
48  virtual void initialize(const datatools::properties & /* config_ */,
49  datatools::service_manager & /* service_mgr_ */,
50  dpp::module_handle_dict_type & /* modules_map_ */);
51 
53  virtual void reset();
54 
56  virtual dpp::base_module::process_status process(datatools::things & /* event_record_ */);
57 
59  void set_geo_label(const std::string &);
60 
62  const std::string& get_geo_label() const;
63 
65  void set_sd_label(const std::string &);
66 
68  const std::string& get_sd_label() const;
69 
72 
74  void set_geant4_parameters(const manager_parameters& params);
75 
78 
81 
84 
85  protected :
87 
88  void _terminate_manager();
89 
90  int _simulate_event(datatools::things & /* event_record_ */);
91 
92  private:
93  std::string geometryServiceName_;
94  std::string simdataBankName_;
95 
96  const geomtools::manager* geometryManagerRef_;
97 
98  manager_parameters geant4Parameters_;
99  manager* geant4Simulation_;
100  simulation_ctrl* geant4SimulationController_;
101 
102  // Registration of the module :
104 };
105 
106 } // end of namespace g4
107 
108 } // end of namespace mctools
109 
110 // Object configuration description (OCD) support :
111 #include <datatools/ocd_macros.h>
113 
114 #endif // MCTOOLS_G4_SIMULATION_MODULE_H
115 
116 /*
117 ** Local Variables: --
118 ** mode: c++ --
119 ** c-file-style: "gnu" --
120 ** tab-width: 2 --
121 ** End: --
122 */
A generic serializable and noncopyable container for arbitrary serializable objects.
Definition: things.h:85
const std::string & get_geo_label() const
Get the geometry service label (only used if no geometry manager is provided)
const manager_parameters & get_geant4_parameters() const
Return a non mutable reference to the simulation manager parameters.
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
void set_geometry_manager(const geomtools::manager &gm)
Set the reference to an external geometry manager.
virtual dpp::base_module::process_status process(datatools::things &)
Read/Process/Fill/Delete data.
Definition: base_step_hit.h:32
The set of parameters for the Geant4 simulation manager.
Definition: manager_parameters.h:54
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: logger.h:85
void _initialize_manager(datatools::service_manager &)
process_status
Processing status flags used as the returned value of data processing methods through the pipeline.
Definition: base_module.h:65
virtual void initialize(const datatools::properties &, datatools::service_manager &, dpp::module_handle_dict_type &)
Initialization.
A manager that can store the internal states associated to a set of PRNGs addressed with some labels.
Definition: prng_state_manager.h:50
int _simulate_event(datatools::things &)
void set_sd_label(const std::string &)
Set the SD bank label.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
const mygsl::seed_manager & get_seed_manager() const
Return a reference to the embedded seed manager.
std::map< std::string, module_entry_type > module_handle_dict_type
Definition: module_tools.h:141
Base processing module (abstract interface)
Definition: base_module.h:59
const std::string & get_sd_label() const
Get the SD bank label.
void set_geo_label(const std::string &)
Set the geometry service label (only used if no geometry manager is provided)
simulation_module(datatools::logger::priority logging_priority=datatools::logger::PRIO_FATAL)
Constructor.
#define DPP_MODULE_REGISTRATION_INTERFACE(T)
Definition: base_module.h:231
The Geant4 simulation module based on Bayeux/dpp API.
Definition: simulation_module.h:39
Definition: seed_manager.h:60
The Geant4 simulation manager.
Definition: manager.h:111
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of variou...
Definition: manager.h:70
const mygsl::prng_state_manager & get_state_manager() const
Return a non mutable reference to the manager of PRNG's states.
virtual void reset()
Reset.
void set_geant4_parameters(const manager_parameters &params)
Set the simulation manager parameters.
virtual ~simulation_module()
Destructor.
Service management class.
Definition: service_manager.h:57
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125