30 baseSettings_token(wrappedSetWhatProduced(iConfig).consumes()) {}
37 if (objectKey.empty()) {
38 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"Key is empty";
40 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Empty objectKey");
42 edm::LogError(
"L1-O2O: L1TMuonGlobalParams") <<
"returning unmodified prototype of L1TMuonGlobalParams";
43 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
47 std::string tscKey = objectKey.substr(0, objectKey.find(
':'));
48 std::string rsKey = objectKey.substr(objectKey.find(
':') + 1, std::string::npos);
51 <<
"Producing L1TMuonGlobalParams with TSC key =" << tscKey <<
" and RS key = " << rsKey;
55 std::map<std::string, std::string> rs_payloads, algo_payloads;
57 std::map<std::string, std::string>
keys =
59 algo_key =
keys[
"ALGO"];
64 std::map<std::string, std::string> rsKeys =
67 std::map<std::string, std::string> algoKeys =
70 for (
auto &
key : rsKeys)
71 rs_payloads[
key.second] =
74 for (
auto &
key : algoKeys)
75 algo_payloads[
key.second] =
77 }
catch (std::runtime_error &
e) {
78 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
80 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Broken key");
82 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
83 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
93 for (
auto &conf : rs_payloads) {
98 for (
auto &conf : algo_payloads) {
114 for (
auto &conf : algo_payloads) {
118 for (
auto &conf : rs_payloads) {
123 }
catch (std::runtime_error &
e) {
124 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
126 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot parse XMLs");
128 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
129 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
136 }
catch (std::runtime_error &
e) {
137 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
e.what();
139 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot run helper");
141 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonGlobalParams";
142 return std::make_unique<const L1TMuonGlobalParams>(baseSettings);
149 <<
"SummaryForFunctionManager: uGMT | OK | All looks good";
const L1TMuonGlobalParams & cast_to_L1TMuonGlobalParams(const L1TMuonGlobalParams_PUBLIC &x)
void setConfigured(bool state=true) noexcept
std::unique_ptr< const L1TMuonGlobalParams > newObject(const std::string &objectKey, const L1TMuonGlobalParamsO2ORcd &record) override
const edm::ESGetToken< L1TMuonGlobalParams, L1TMuonGlobalParamsRcd > baseSettings_token
Log< level::Error, false > LogError
l1t::OMDSReader m_omdsReader
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
static std::map< std::string, std::string > fetch(const std::vector< std::string > &queryColumns, const std::string &table, const std::string &key, l1t::OMDSReader &m_omdsReader)
void loadFromOnline(l1t::TriggerSystem &trgSys, const std::string &processorId="")
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, false > LogInfo
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
~L1TMuonGlobalParamsOnlineProd(void) override
L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet &)
const bool transactionSafe