13 #include "xercesc/util/PlatformUtils.hpp"
22 std::unique_ptr<const L1TMuonBarrelParams> newObject(
const std::string& objectKey,
40 if (objectKey.empty()) {
41 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"Key is empty, returning empty L1TMuonBarrelParams";
43 throw std::runtime_error(
"SummaryForFunctionManager: BMTF | Faulty | Empty objectKey");
45 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
46 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
50 std::string tscKey = objectKey.substr(0, objectKey.find(
":"));
51 std::string rsKey = objectKey.substr(objectKey.find(
":") + 1, std::string::npos);
54 <<
"Producing L1TMuonBarrelParams with TSC key = " << tscKey <<
" and RS key = " << rsKey;
58 std::string hw_payload, algo_payload, mp7_payload, amc13_payload;
60 std::map<std::string, std::string>
keys =
62 algo_key =
keys[
"ALGO"];
69 std::map<std::string, std::string> rsKeys =
71 mp7_key = rsKeys[
"MP7"];
72 amc13_key = rsKeys[
"AMC13"];
77 }
catch (std::runtime_error&
e) {
78 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
80 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
82 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
83 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
129 }
catch (std::runtime_error&
e) {
130 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
132 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
134 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
135 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
142 }
catch (std::runtime_error&
e) {
143 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
145 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
147 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
148 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
152 auto retval = std::make_unique<const L1TMuonBarrelParams>(m_params_helper);
154 edm::LogInfo(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"SummaryForFunctionManager: BMTF | OK | All looks good";