#include "ArtG4tkModelConfig.hh"
Definition at line 14 of file ArtG4tkModelConfig.hh.
artg4tk::ArtG4tkModelConfig::ArtG4tkModelConfig |
( |
| ) |
|
|
inline |
artg4tk::ArtG4tkModelConfig::ArtG4tkModelConfig |
( |
const bool & |
flag | ) |
|
|
inline |
Definition at line 19 of file ArtG4tkModelConfig.hh.
std::map< std::string, std::vector< std::pair< std::string, double > > > fModelConfig
artg4tk::ArtG4tkModelConfig::~ArtG4tkModelConfig |
( |
| ) |
|
|
inline |
void artg4tk::ArtG4tkModelConfig::DoFill |
( |
std::string & |
key, |
|
|
std::string & |
modkey, |
|
|
fhicl::ParameterSet & |
mpset |
|
) |
| |
|
private |
Definition at line 50 of file ArtG4tkModelConfig.cc.
References fhicl::ParameterSet::get(), Insert(), and value.
Referenced by Fill().
55 std::string mkey = modkey;
56 for (
unsigned int ik = 0; ik < modkey.size(); ++ik)
57 mkey[ik] = std::tolower(mkey[ik]);
58 if (mkey.find(
"use") != std::string::npos) {
59 int ivalue = mpset.
get<
int>(modkey, 0);
60 Insert(key, modkey, ivalue);
62 double value = mpset.
get<
double>(modkey);
63 Insert(key, modkey, value);
void Insert(const std::string &, const std::string &, const double &)
T get(std::string const &key) const
Definition at line 6 of file ArtG4tkModelConfig.cc.
References DoFill(), fDefaultPhysics, fhicl::ParameterSet::get(), and fhicl::ParameterSet::get_names().
14 std::vector<std::string> keys = pset.
get_names();
15 std::vector<std::string> modkeys;
16 for (
unsigned int i = 0; i < keys.size(); ++i) {
17 if (keys[i] ==
"DefaultPhysics") {
26 for (
unsigned i1 = 0; i1 < modkeys.size(); ++i1) {
27 std::string modkey = modkeys[i1];
28 for (
unsigned int ik = 0; ik < modkey.size(); ++ik)
29 modkey[ik] = std::tolower(modkey[ik]);
30 if (modkey ==
"underlyingmodels") {
32 std::vector<std::string> ukeys = umpset.
get_names();
33 for (
unsigned int iu = 0; iu < ukeys.size(); ++iu) {
35 std::vector<std::string> umconfig = umodel.
get_names();
36 for (
unsigned int iukm = 0; iukm < umconfig.size(); ++iukm) {
37 DoFill(ukeys[iu], umconfig[iukm], umodel);
41 DoFill(keys[i], modkeys[i1], mpset);
void DoFill(std::string &, std::string &, fhicl::ParameterSet &)
T get(std::string const &key) const
std::vector< std::string > get_names() const
const std::vector< std::pair< std::string, double > > * artg4tk::ArtG4tkModelConfig::GetConfig |
( |
const std::string & |
model | ) |
const |
Definition at line 111 of file ArtG4tkModelConfig.cc.
References fModelConfig.
114 std::map<std::string, std::vector<std::pair<std::string, double>>>
::const_iterator itr =
124 return &(itr->second);
std::map< std::string, std::vector< std::pair< std::string, double > > > fModelConfig
std::vector< std::string > artg4tk::ArtG4tkModelConfig::GetConfiguredModels |
( |
| ) |
const |
Definition at line 96 of file ArtG4tkModelConfig.cc.
References fModelConfig.
99 std::vector<std::string> models;
101 std::map<std::string, std::vector<std::pair<std::string, double>>>
::const_iterator itr =
104 models.push_back(itr->first);
std::map< std::string, std::vector< std::pair< std::string, double > > > fModelConfig
void artg4tk::ArtG4tkModelConfig::Insert |
( |
const std::string & |
model, |
|
|
const std::string & |
param, |
|
|
const double & |
value |
|
) |
| |
Definition at line 70 of file ArtG4tkModelConfig.cc.
References fDefaultPhysics, fModelConfig, and lar::dump::vector().
Referenced by DoFill().
84 model,
std::vector<std::pair<std::string, double>>()));
87 std::map<std::string, std::vector<std::pair<std::string, double>>>
::iterator itr =
90 (itr->second).push_back(std::pair<std::string, double>(param,
value));
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::map< std::string, std::vector< std::pair< std::string, double > > > fModelConfig
bool artg4tk::ArtG4tkModelConfig::IsDefaultPhysics |
( |
| ) |
const |
|
inline |
bool artg4tk::ArtG4tkModelConfig::fDefaultPhysics |
|
private |
std::map<std::string, std::vector<std::pair<std::string, double> > > artg4tk::ArtG4tkModelConfig::fModelConfig |
|
private |
The documentation for this class was generated from the following files: