30 transactionSafe(iConfig.getParameter<bool>(
"transactionSafe")),
31 baseSettings_token(wrappedSetWhatProduced(iConfig).consumes()) {}
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);
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";
const L1TMuonGlobalParams & cast_to_L1TMuonGlobalParams(const L1TMuonGlobalParams_PUBLIC &x)
void setConfigured(bool state=true) noexcept
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
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
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
l1t::OMDSReader m_omdsReader
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="")
tuple key
prepare the HTCondor submission files and eventually submit them
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
~L1TMuonGlobalParamsOnlineProd(void) override
L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet &)
const bool transactionSafe