gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
scanner_plugin.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
25 
26 #ifndef SCANNER_PLUGIN_HPP
27 #define SCANNER_PLUGIN_HPP
28 
33 
34 // Needed for plugin_info access. If there is a better way to call the "early_shutdown_in_progress"
35 // function then feel free to change this.
37 
42 #define scanner_plugin(...) SCANNER_PLUGIN(__VA_ARGS__)
43 
45 #define __SCANNER_SETUP__ \
46 using namespace Gambit::Scanner; \
47  \
48 void *get_purpose(const std::string &purpose) \
49 { \
50  void *ptr = (get_input_value<Factory_Base>(1))(purpose); \
51  static_cast <Function_Base<void(void)>*>(ptr)->setPurpose(purpose); \
52  static_cast <Function_Base<void(void)>*>(ptr)->setPrinter(get_printer().get_stream()); \
53  static_cast <Function_Base<void(void)>*>(ptr)->setPrior(&get_prior()); \
54  assign_aux_numbers(purpose, "pointID", "MPIrank"); \
55  \
56  return ptr; \
57 } \
58  \
59 inline unsigned int &get_dimension() {return get_input_value<unsigned int>(0);} \
60 
61 #define SCANNER_PLUGIN(plug_name, ...) \
62  GAMBIT_PLUGIN_INITIALIZE(__SCANNER_SETUP__, plug_name, scanner, __VA_ARGS__) \
63 
64 #endif
declaration for gambit module
Utility Functions for the Gambit Scanner.
declaration for scanner module
Loader singleton class for scanner plugins.
declaration for scanner module