gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
ini_functions.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
27 
28 #ifndef __ini_functions_hpp__
29 #define __ini_functions_hpp__
30 
31 #include <vector>
32 
34 
35 namespace Gambit
36 {
38  class module_functor_common;
39  class model_functor;
40  class Options;
41 
44 
47 
49  int add_model(str, str);
50 
52  int add_parameter(model_functor&, str);
53 
55  int set_model_name(model_functor&, str);
56 
58  int copy_parameters(model_functor&, model_functor&, bool, str="", str="");
59 
61  int register_model_functor(std::map<str, bool(*)()>, std::map<str, str>, bool(*)(), const str&, const str&);
62 
65 
67  int register_function(module_functor_common&, bool, safe_ptr<bool>*, safe_ptr<Options>&,
68  safe_ptr<std::set<sspair>>&, safe_ptr<Options>&);
69 
71  int register_function_nesting(module_functor_common&, omp_safe_ptr<long long>&, const str&, const str&);
72 
74  int register_model_singly(module_functor_common&, const str&);
75 
77  int register_model_group(module_functor_common&, const str&, const str&);
78 
80  int register_backend_requirement(module_functor_common&, const str&, const str&,
81  const str&, bool, const str&, const str&, void(*)(functor*));
82 
84  int register_model_combination(module_functor_common&, const str&);
85 
87  int register_dependency(module_functor_common&, const str&, const str&,
88  void(*)(functor*, module_functor_common*));
89 
91  int register_conditional_dependency(module_functor_common&, const str&, const str&);
92 
94  int register_model_parameter_dependency(module_functor_common&, const str&, const str&,
95  void(*resolver)(functor*, module_functor_common*));
96 
98  int register_model_conditional_dependency(module_functor_common&, const str&,
99  const str&, void(*)(functor*, module_functor_common*));
100 
102  int register_backend_conditional_dependency(module_functor_common&, const str&, const str&,
103  const str&, const str&, void(*)(functor*, module_functor_common*));
104 
106  int apply_backend_matching_rule(module_functor_common&, const str&);
107 
109  int apply_backend_option_rule(module_functor_common&, const str&, const str&);
110 
111 
112  namespace slhahelp
113  {
114 
116  typedef std::pair<int,str> p_int_string;
117  typedef std::pair<int,int> pair_ints;
118  typedef std::pair<str,pair_ints> pair_string_ints;
119  typedef std::pair<str,str> pair_strings;
120 
122  std::map<str, p_int_string> init_gauge_label_to_index_type();
123 
125  std::map<str, p_int_string> init_mass_label_to_index_type();
126 
128  std::map<str, pair_string_ints> init_familystate_label();
129 
132  std::map<p_int_string, std::vector<str> > init_type_family_to_gauge_states();
133 
136  std::map<str,std::vector<str> > init_family_state_to_gauge_state();
137 
140  std::map<str,std::vector<str> > init_gauge_es_to_family_states();
141 
144  std::map<str,std::vector<str> > init_type_to_vec_of_mass_es();
145 
148  std::map<str,std::vector<str> > init_type_to_vec_of_gauge_es();
149 
150  }
151 
152 }
153 
154 #endif // #defined __ini_functions_hpp__
std::pair< int, str > p_int_string
Typedefs for pairs that we will use in maps.
int register_model_functor(std::map< str, bool(*)()>, std::map< str, str >, bool(*)(), const str &, const str &)
Register a model functor.
int set_model_name(model_functor &, str)
Set the model name in a primary model functor.
int register_conditional_dependency(module_functor_common &, const str &, const str &)
Register a conditional dependency of a module function.
int register_model_singly(module_functor_common &, const str &)
Register that a module function is compatible with a single model.
std::map< str, std::vector< str > > init_family_state_to_gauge_state()
maps directly from family string to left_right gauge_pairs helps us reuse other routines that take st...
std::pair< str, str > pair_strings
int register_function_nesting(module_functor_common &, omp_safe_ptr< long long > &, const str &, const str &)
Register the fact that a module function needs to run nested.
int register_model_combination(module_functor_common &, const str &)
Register a combination of models as allowed with a functor.
std::pair< str, pair_ints > pair_string_ints
int register_dependency(module_functor_common &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a dependency of a module function.
General small utility classes, typedefs, etc.
int register_function(module_functor_common &, bool, safe_ptr< bool > *, safe_ptr< Options > &, safe_ptr< std::set< sspair >> &, safe_ptr< Options > &)
Register a function with a module.
int add_parameter(model_functor &, str)
Add a new parameter to a primary model functor.
std::map< p_int_string, std::vector< str > > init_type_family_to_gauge_states()
map to obtain left_right gauge_pairs from state info helps us reuse other routiones with string argum...
std::map< str, p_int_string > init_mass_label_to_index_type()
map from mass eigenstate strings to string, index pairs
int apply_backend_matching_rule(module_functor_common &, const str &)
Apply a backend-matching rule.
int register_module_with_log(str)
Create a log tag for a new module.
int apply_backend_option_rule(module_functor_common &, const str &, const str &)
Apply a backend option rule.
int register_backend_conditional_dependency(module_functor_common &, const str &, const str &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a backend-conditional dependency of a module function.
std::pair< int, int > pair_ints
int add_model(str, str)
Runtime addition of model to GAMBIT model database.
int pass_default_to_backendinfo(str, str)
Helper function for passing default backend information at initialisation.
std::map< str, std::vector< str > > init_type_to_vec_of_mass_es()
map from string representing type (ie up-squarks, down-squarks or charged sleptons) to appropriate se...
int copy_parameters(model_functor &, model_functor &, bool, str="", str="")
Tell a model functor to take its parameter definition from another model functor. ...
int register_model_conditional_dependency(module_functor_common &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a model-conditional dependency of a module function.
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
std::map< str, std::vector< str > > init_type_to_vec_of_gauge_es()
map from string representing type (ie up-squarks, down-squarks or charged sleptons) to appropriate se...
std::map< str, pair_string_ints > init_familystate_label()
map to extract info from family state
int register_model_parameter_dependency(module_functor_common &, const str &, const str &, void(*resolver)(functor *, module_functor_common *))
Register a model parameters dependency of a module function.
std::map< str, p_int_string > init_gauge_label_to_index_type()
map from gauge eigenstate strings to string, index pairs
int register_backend_requirement(module_functor_common &, const str &, const str &, const str &, bool, const str &, const str &, void(*)(functor *))
Register a backend requirement for a module function.
int register_model_group(module_functor_common &, const str &, const str &)
Register a model group with a functor.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
int add_equivrelation(str, str)
Helper function for adding a type equivalency at initialisation.
std::map< str, std::vector< str > > init_gauge_es_to_family_states()
maps directly from gauge_es string to familystates helps us reuse other routines that take string arg...