39 if (objectKey.empty()) {
40 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"Key is empty";
42 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Empty objectKey");
44 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
45 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
49 std::string tscKey = objectKey.substr(0, objectKey.find(
":"));
50 std::string rsKey = objectKey.substr(objectKey.find(
":") + 1, std::string::npos);
53 <<
"Producing L1TMuonEndCapParams with TSC key = " << tscKey <<
" and RS key = " << rsKey;
58 std::map<std::string, std::string>
keys =
62 algo_key =
keys[
"ALGO"];
68 }
catch (std::runtime_error&
e) {
69 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
e.what();
71 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Broken key");
73 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
74 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
101 }
catch (std::runtime_error&
e) {
102 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
e.what();
104 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Cannot parse XMLs");
106 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
107 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
112 std::map<std::string, l1t::Parameter> conf = trgSys.
getParameters(
"EMTFp1");
115 std::string core_fwv = conf[
"core_firmware_version"].getValueAsStr();
117 strptime(core_fwv.c_str(),
"%Y-%m-%d %T", &brokenTime);
118 time_t fw_sinceEpoch = timegm(&brokenTime);
124 auto retval = std::make_unique<L1TMuonEndCapParams>();
126 retval->firmwareVersion_ = fw_sinceEpoch;
127 retval->PtAssignVersion_ = conf[
"pt_lut_version"].getValue<
unsigned int>();
128 retval->PhiMatchWindowSt1_ = 1;
131 <<
"SummaryForFunctionManager: EMTF | OK | All looks good";