GENIEGenerator
|
A singleton class holding all configuration registries built while parsing all loaded XML configuration files. More...
#include <AlgConfigPool.h>
Classes | |
struct | Cleaner |
Public Member Functions | |
Registry * | FindRegistry (string key) const |
Registry * | FindRegistry (string alg_name, string param_set) const |
Registry * | FindRegistry (const Algorithm *algorithm) const |
Registry * | FindRegistry (const AlgId &algid) const |
Registry * | GlobalParameterList (void) const |
Registry * | CommonList (const string &file_id, const string &set_name) const |
Registry * | TuneGeneratorList (void) const |
const vector< string > & | ConfigKeyList (void) const |
void | Print (ostream &stream) const |
Static Public Member Functions | |
static AlgConfigPool * | Instance () |
Private Member Functions | |
AlgConfigPool () | |
AlgConfigPool (const AlgConfigPool &config_pool) | |
virtual | ~AlgConfigPool () |
string | BuildConfigKey (string alg_name, string param_set) const |
string | BuildConfigKey (const Algorithm *algorithm) const |
bool | LoadAlgConfig (void) |
bool | LoadMasterConfig (std::string configname) |
bool | LoadMasterConfigs (void) |
bool | LoadGlobalParamLists (void) |
bool | LoadCommonLists (const string &file_id) |
bool | LoadTuneGeneratorList (void) |
bool | LoadSingleAlgConfig (string alg_name, string file_name) |
bool | LoadRegistries (string key_base, string file_name, string root) |
int | AddParameterVector (Registry *r, string pt, string pn, string pv, const string &delim=";") |
int | AddParameterMatrix (Registry *r, string pt, string pn, string pv, const string &rowdelim, const string &coldelim) |
int | AddParameterMatrix (Registry *r, string pt, string pn, string pv) |
void | AddConfigParameter (Registry *r, string pt, string pn, string pv) |
void | AddBasicParameter (Registry *r, string pt, string pn, string pv) |
void | AddRootObjParameter (Registry *r, string pt, string pn, string pv) |
Private Attributes | |
map< string, Registry * > | fRegistryPool |
algorithm/param_set -> Registry More... | |
map< string, string > | fConfigFiles |
algorithm -> XML config file More... | |
vector< string > | fConfigKeyList |
list of all available configuration keys More... | |
string | fMasterConfig |
lists config files for all algorithms More... | |
Static Private Attributes | |
static AlgConfigPool * | fInstance = 0 |
Friends | |
struct | Cleaner |
ostream & | operator<< (ostream &stream, const AlgConfigPool &cp) |
A singleton class holding all configuration registries built while parsing all loaded XML configuration files.
Definition at line 40 of file AlgConfigPool.h.
|
private |
Definition at line 52 of file AlgConfigPool.cxx.
References fInstance, LoadAlgConfig(), LOG, and pERROR.
Referenced by Instance().
|
private |
|
privatevirtual |
Definition at line 59 of file AlgConfigPool.cxx.
References fConfigFiles, fConfigKeyList, fInstance, fRegistryPool, and genie::gAbortingInErr.
|
private |
Definition at line 591 of file AlgConfigPool.cxx.
References LOG, pERROR, pFATAL, genie::Registry::Set(), and genie::utils::str::Split().
Referenced by AddConfigParameter().
|
private |
Definition at line 561 of file AlgConfigPool.cxx.
References AddBasicParameter(), AddRootObjParameter(), pDEBUG, pERROR, and SLOG.
Referenced by AddParameterMatrix(), AddParameterVector(), and LoadRegistries().
|
private |
Definition at line 441 of file AlgConfigPool.cxx.
References AddConfigParameter(), genie::Algorithm::BuildParamMatColSizeKey(), genie::Algorithm::BuildParamMatKey(), genie::Algorithm::BuildParamMatRowSizeKey(), LOG, pDEBUG, pFATAL, SLOG, genie::utils::str::Split(), and genie::utils::str::TrimSpaces().
Referenced by LoadRegistries().
|
private |
Definition at line 501 of file AlgConfigPool.cxx.
References AddConfigParameter(), genie::Algorithm::BuildParamMatColSizeKey(), genie::Algorithm::BuildParamMatKey(), genie::Algorithm::BuildParamMatRowSizeKey(), LOG, pFATAL, and genie::utils::str::TrimSpaces().
|
private |
Definition at line 406 of file AlgConfigPool.cxx.
References AddConfigParameter(), genie::Algorithm::BuildParamVectKey(), genie::Algorithm::BuildParamVectSizeKey(), pDEBUG, SLOG, genie::utils::str::Split(), and genie::utils::str::TrimSpaces().
Referenced by LoadRegistries().
|
private |
Definition at line 645 of file AlgConfigPool.cxx.
References pERROR, pWARN, genie::Registry::Set(), SLOG, and genie::utils::str::Split().
Referenced by AddConfigParameter().
|
private |
|
private |
Registry * AlgConfigPool::CommonList | ( | const string & | file_id, |
const string & | set_name | ||
) | const |
Definition at line 744 of file AlgConfigPool.cxx.
References FindRegistry(), and LoadCommonLists().
Referenced by genie::PDGLibrary::AddDarkSector(), genie::PDGLibrary::AddHNL(), CheckUnitarityLimit(), genie::GVldContext::Decode(), genie::TabulatedLabFrameHadronTensor::dSigma_dT_dCosTheta_rosenbluth(), genie::KPhaseSpace::GetTMaxDFR(), genie::PDGLibrary::LoadDBase(), and main().
const vector< string > & AlgConfigPool::ConfigKeyList | ( | void | ) | const |
Definition at line 766 of file AlgConfigPool.cxx.
References fConfigKeyList.
Referenced by genie::NtpMCJobConfig::Load(), and main().
Registry * AlgConfigPool::FindRegistry | ( | string | key | ) | const |
Definition at line 719 of file AlgConfigPool.cxx.
References fRegistryPool, LOG, and pDEBUG.
Referenced by CommonList(), genie::Algorithm::FindConfig(), FindRegistry(), GlobalParameterList(), genie::NtpMCJobConfig::Load(), main(), testReconfigInCommonPool(), and TuneGeneratorList().
Registry * AlgConfigPool::FindRegistry | ( | string | alg_name, |
string | param_set | ||
) | const |
Definition at line 712 of file AlgConfigPool.cxx.
References FindRegistry().
Definition at line 700 of file AlgConfigPool.cxx.
References FindRegistry(), genie::Algorithm::Id(), and genie::AlgId::Key().
Definition at line 706 of file AlgConfigPool.cxx.
References FindRegistry(), and genie::AlgId::Key().
Registry * AlgConfigPool::GlobalParameterList | ( | void | ) | const |
Definition at line 734 of file AlgConfigPool.cxx.
References FindRegistry().
Referenced by genie::PauliBlocker::LoadModelType(), main(), genie::utils::nuclear::NuclQELXSecSuppression(), and genie::AlgFactory::Print().
|
static |
Definition at line 85 of file AlgConfigPool.cxx.
References AlgConfigPool(), genie::AlgConfigPool::Cleaner::DummyMethodAndSilentCompiler(), and fInstance.
Referenced by genie::PDGLibrary::AddDarkSector(), genie::PDGLibrary::AddHNL(), genie::EventGeneratorListAssembler::AssembleGeneratorList(), CheckUnitarityLimit(), genie::HadronTransporter::Configure(), genie::EmpiricalMECPXSec2015::Configure(), genie::QPMDISPXSec::Configure(), genie::QPMDMDISPXSec::Configure(), genie::EventGenerator::Configure(), genie::NuclearModelMap::Configure(), genie::GVldContext::Decode(), genie::TabulatedLabFrameHadronTensor::dSigma_dT_dCosTheta_rosenbluth(), genie::Algorithm::FindConfig(), genie::KPhaseSpace::GetTMaxDFR(), genie::GMCJDriver::InitJob(), genie::NtpMCJobConfig::Load(), genie::NuclearModelI::LoadConfig(), genie::PDGLibrary::LoadDBase(), genie::PauliBlocker::LoadModelType(), main(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::AlgFactory::Print(), and testReconfigInCommonPool().
|
private |
Definition at line 95 of file AlgConfigPool.cxx.
References fConfigFiles, genie::utils::xml::GetXMLFilePath(), LoadGlobalParamLists(), LoadMasterConfigs(), LoadSingleAlgConfig(), LoadTuneGeneratorList(), pERROR, pINFO, pNOTICE, pWARN, and SLOG.
Referenced by AlgConfigPool().
|
private |
Definition at line 235 of file AlgConfigPool.cxx.
References genie::utils::xml::GetXMLFilePath(), LoadRegistries(), pERROR, pINFO, and SLOG.
Referenced by CommonList().
|
private |
Definition at line 218 of file AlgConfigPool.cxx.
References genie::utils::xml::GetXMLFilePath(), LoadRegistries(), pINFO, and SLOG.
Referenced by LoadAlgConfig().
|
private |
Definition at line 149 of file AlgConfigPool.cxx.
References fConfigFiles, fMasterConfig, genie::utils::xml::GetAttribute(), genie::utils::xml::GetXMLFilePath(), pERROR, SLOG, genie::utils::str::TrimSpaces(), and genie::utils::xml::TrimSpaces().
Referenced by LoadMasterConfigs().
|
private |
Definition at line 209 of file AlgConfigPool.cxx.
References LoadMasterConfig(), and main().
Referenced by LoadAlgConfig().
|
private |
Definition at line 287 of file AlgConfigPool.cxx.
References AddConfigParameter(), AddParameterMatrix(), AddParameterVector(), fConfigKeyList, fRegistryPool, genie::utils::xml::GetAttribute(), genie::Registry::Lock(), LOG, pDEBUG, pERROR, pNOTICE, genie::Registry::SetName(), SLOG, genie::utils::str::TrimSpaces(), and genie::utils::xml::TrimSpaces().
Referenced by LoadCommonLists(), LoadGlobalParamLists(), LoadSingleAlgConfig(), and LoadTuneGeneratorList().
|
private |
Definition at line 275 of file AlgConfigPool.cxx.
References LoadRegistries().
Referenced by LoadAlgConfig().
|
private |
Definition at line 258 of file AlgConfigPool.cxx.
References genie::utils::xml::GetXMLFilePath(), LoadRegistries(), pINFO, and SLOG.
Referenced by LoadAlgConfig().
void AlgConfigPool::Print | ( | ostream & | stream | ) | const |
Definition at line 771 of file AlgConfigPool.cxx.
References fRegistryPool.
Referenced by genie::operator<<().
Registry * AlgConfigPool::TuneGeneratorList | ( | void | ) | const |
Definition at line 757 of file AlgConfigPool.cxx.
References FindRegistry().
|
friend |
Definition at line 100 of file AlgConfigPool.h.
|
friend |
Definition at line 43 of file AlgConfigPool.cxx.
|
private |
algorithm -> XML config file
Definition at line 87 of file AlgConfigPool.h.
Referenced by LoadAlgConfig(), LoadMasterConfig(), and ~AlgConfigPool().
|
private |
list of all available configuration keys
Definition at line 88 of file AlgConfigPool.h.
Referenced by ConfigKeyList(), LoadRegistries(), and ~AlgConfigPool().
|
staticprivate |
Definition at line 84 of file AlgConfigPool.h.
Referenced by AlgConfigPool(), Instance(), ~AlgConfigPool(), and genie::AlgConfigPool::Cleaner::~Cleaner().
|
private |
lists config files for all algorithms
Definition at line 89 of file AlgConfigPool.h.
Referenced by LoadMasterConfig().
|
private |
algorithm/param_set -> Registry
Definition at line 86 of file AlgConfigPool.h.
Referenced by FindRegistry(), LoadRegistries(), Print(), and ~AlgConfigPool().