#include <IterationConfig.h>
Classes | |
struct | PatchReport |
Public Member Functions | |
void | cd (const std::string &path) |
void | cd_top (const std::string &path="") |
void | cd_up (const std::string &path="") |
ConfigJsonPatcher (bool verbose=false) | |
std::string | dump (int indent=2) |
nlohmann::json & | get (const std::string &path) |
template<class T > | |
void | load (const T &o) |
template<typename T > | |
void | replace (const std::string &path, T val) |
template<typename T > | |
void | replace (int first, int last, const std::string &path, T val) |
int | replace (const nlohmann::json &j) |
template<> | |
void | save (IterationsInfo &o) |
template<class T > | |
void | save (T &o) |
~ConfigJsonPatcher () | |
Private Member Functions | |
std::string | exc_hdr (const char *func=nullptr) const |
std::string | get_abs_path () const |
Private Attributes | |
nlohmann::json * | m_current = nullptr |
std::unique_ptr< nlohmann::json > | m_json |
std::vector< nlohmann::json * > | m_json_stack |
std::vector< std::string > | m_path_stack |
bool | m_verbose = false |
Definition at line 305 of file IterationConfig.h.
mkfit::ConfigJsonPatcher::ConfigJsonPatcher | ( | bool | verbose = false | ) |
Definition at line 226 of file IterationConfig.cc.
|
default |
void mkfit::ConfigJsonPatcher::cd | ( | const std::string & | path | ) |
Definition at line 277 of file IterationConfig.cc.
References m_current, m_json_stack, m_path_stack, and castor_dqm_sourceclient_file_cfg::path.
Referenced by cd_top(), cd_up(), dqm_interfaces.DQMcommunicator::get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_recursive(), replace(), mkfit::ConfigJson::test_Patcher(), and dqm_interfaces.DirWalkerFile::walk().
void mkfit::ConfigJsonPatcher::cd_top | ( | const std::string & | path = "" | ) |
Definition at line 295 of file IterationConfig.cc.
References cd(), m_current, m_json, m_json_stack, m_path_stack, and castor_dqm_sourceclient_file_cfg::path.
Referenced by load(), mkfit::ConfigJson::patch_Files(), mkfit::ConfigJson::patchLoad_File(), and mkfit::ConfigJson::test_Patcher().
void mkfit::ConfigJsonPatcher::cd_up | ( | const std::string & | path = "" | ) |
Definition at line 284 of file IterationConfig.cc.
References cd(), m_current, m_json_stack, m_path_stack, and castor_dqm_sourceclient_file_cfg::path.
Referenced by replace().
std::string mkfit::ConfigJsonPatcher::dump | ( | int | indent = 2 | ) |
Definition at line 444 of file IterationConfig.cc.
References validateAlignments::indent, and m_json.
Referenced by mkfit::ConfigJson::test_Patcher().
|
private |
Definition at line 238 of file IterationConfig.cc.
References EcalMonitorTask_cff::func, get_abs_path(), alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by replace().
nlohmann::json & mkfit::ConfigJsonPatcher::get | ( | const std::string & | path | ) |
Definition at line 323 of file IterationConfig.cc.
References m_current, and castor_dqm_sourceclient_file_cfg::path.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), and mkfit::ConfigJson::test_Patcher().
|
private |
Definition at line 230 of file IterationConfig.cc.
References m_path_stack, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by exc_hdr(), and replace().
template void mkfit::ConfigJsonPatcher::load< IterationConfig > | ( | const T & | o | ) |
Definition at line 253 of file IterationConfig.cc.
References cd_top(), m_json, and EcalTangentSkim_cfg::o.
Referenced by mkfit::ConfigJson::patch_Files(), mkfit::ConfigJson::patchLoad_File(), and mkfit::ConfigJson::test_Patcher().
void mkfit::ConfigJsonPatcher::replace | ( | const std::string & | path, |
T | val | ||
) |
Definition at line 304 of file IterationConfig.cc.
References m_current, castor_dqm_sourceclient_file_cfg::path, and heppy_batch::val.
Referenced by mkfit::ConfigJson::patch_Files(), mkfit::ConfigJson::patchLoad_File(), replace(), and mkfit::ConfigJson::test_Patcher().
void mkfit::ConfigJsonPatcher::replace | ( | int | first, |
int | last, | ||
const std::string & | path, | ||
T | val | ||
) |
Definition at line 313 of file IterationConfig.cc.
References dqmdumpme::first, mps_fire::i, dqmdumpme::last, m_current, castor_dqm_sourceclient_file_cfg::path, and heppy_batch::val.
int mkfit::ConfigJsonPatcher::replace | ( | const nlohmann::json & | j | ) |
Definition at line 328 of file IterationConfig.cc.
References cd(), cd_up(), gather_cfg::cout, exc_hdr(), dqmdumpme::first, get_abs_path(), mps_fire::i, createfilelist::int, dqmiolumiharvest::j, submitPVResolutionJobs::key, dqmdumpme::last, visualization-live-secondInstance_cfg::m, m_current, m_verbose, replace(), alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, to_string(), and relativeConstraints::value.
void mkfit::ConfigJsonPatcher::save | ( | IterationsInfo & | o | ) |
Definition at line 270 of file IterationConfig.cc.
References mkfit::from_json(), mps_fire::i, and EcalTangentSkim_cfg::o.
template void mkfit::ConfigJsonPatcher::save< IterationConfig > | ( | T & | o | ) |
Definition at line 262 of file IterationConfig.cc.
References mkfit::from_json(), m_json, and EcalTangentSkim_cfg::o.
Referenced by mkfit::ConfigJson::patch_Files(), mkfit::ConfigJson::patchLoad_File(), and mkfit::ConfigJson::test_Patcher().
|
private |
|
private |
|
private |
Definition at line 330 of file IterationConfig.h.
|
private |
Definition at line 331 of file IterationConfig.h.
Referenced by cd(), cd_top(), cd_up(), and get_abs_path().
|
private |
Definition at line 333 of file IterationConfig.h.
Referenced by replace().