38 if (objectKey.empty()) {
39 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"Key is empty";
41 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Empty objectKey");
43 edm::LogError(
"L1-O2O: L1TMuonGlobalParams") <<
"returning unmodified prototype of L1TMuonGlobalParams";
44 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
48 std::string tscKey = objectKey.substr(0, objectKey.find(
':'));
49 std::string rsKey = objectKey.substr(objectKey.find(
':') + 1, std::string::npos);
52 <<
"Producing L1TMuonGlobalParams with TSC key =" << tscKey <<
" and RS key = " << rsKey;
56 std::map<std::string, std::string> rs_payloads, algo_payloads;
58 std::map<std::string, std::string>
keys =
60 algo_key =
keys[
"ALGO"];
65 std::map<std::string, std::string> rsKeys =
68 std::map<std::string, std::string> algoKeys =
71 for (
auto &
key : rsKeys)
72 rs_payloads[
key.second] =
75 for (
auto &
key : algoKeys)
76 algo_payloads[
key.second] =
78 }
catch (std::runtime_error &
e) {
79 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
81 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Broken key");
83 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
84 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
94 for (
auto &conf : rs_payloads) {
99 for (
auto &conf : algo_payloads) {
115 for (
auto &conf : algo_payloads) {
119 for (
auto &conf : rs_payloads) {
124 }
catch (std::runtime_error &
e) {
125 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
127 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot parse XMLs");
129 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
130 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
136 m_params_helper.loadFromOnline(trgSys);
137 }
catch (std::runtime_error &
e) {
138 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
140 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot run helper");
142 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
143 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
150 <<
"SummaryForFunctionManager: uGMT | OK | All looks good";