38 if (objectKey.empty()) {
39 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"Key is empty";
41 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Empty objectKey");
43 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
44 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
48 std::string tscKey = objectKey.substr(0, objectKey.find(
':'));
49 std::string rsKey = objectKey.substr(objectKey.find(
':') + 1, std::string::npos);
52 <<
"Producing L1TMuonEndCapParams with TSC key = " << tscKey <<
" and RS key = " << rsKey;
57 std::map<std::string, std::string>
keys =
61 algo_key =
keys[
"ALGO"];
67 }
catch (std::runtime_error&
e) {
68 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
e.what();
70 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Broken key");
72 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
73 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
100 }
catch (std::runtime_error&
e) {
101 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
e.what();
103 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Cannot parse XMLs");
105 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonEndCapParams";
106 return std::make_unique<const L1TMuonEndCapParams>(baseSettings);
111 std::map<std::string, l1t::Parameter> conf = trgSys.
getParameters(
"EMTFp1");
114 std::string core_fwv = conf[
"core_firmware_version"].getValueAsStr();
116 strptime(core_fwv.c_str(),
"%Y-%m-%d %T", &brokenTime);
117 time_t fw_sinceEpoch = timegm(&brokenTime);
123 auto retval = std::make_unique<L1TMuonEndCapParams>();
125 retval->firmwareVersion_ = fw_sinceEpoch;
126 retval->PtAssignVersion_ = conf[
"pt_lut_version"].getValue<
unsigned int>();
127 retval->PhiMatchWindowSt1_ = 1;
130 <<
"SummaryForFunctionManager: EMTF | OK | All looks good";