13 #include "xercesc/util/PlatformUtils.hpp" 22 std::unique_ptr<const L1TMuonBarrelParams> newObject(
const std::string& objectKey,
32 baseSettings_token(wrappedSetWhatProduced(iConfig).consumes()) {}
39 if (objectKey.empty()) {
40 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"Key is empty, returning empty L1TMuonBarrelParams";
42 throw std::runtime_error(
"SummaryForFunctionManager: BMTF | Faulty | Empty objectKey");
44 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
45 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
49 std::string tscKey = objectKey.substr(0, objectKey.find(
':'));
50 std::string rsKey = objectKey.substr(objectKey.find(
':') + 1, std::string::npos);
53 <<
"Producing L1TMuonBarrelParams with TSC key = " << tscKey <<
" and RS key = " << rsKey;
57 std::string hw_payload, algo_payload, mp7_payload, amc13_payload;
59 std::map<std::string, std::string>
keys =
61 algo_key =
keys[
"ALGO"];
68 std::map<std::string, std::string> rsKeys =
70 mp7_key = rsKeys[
"MP7"];
71 amc13_key = rsKeys[
"AMC13"];
76 }
catch (std::runtime_error&
e) {
77 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
79 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
81 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
82 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
128 }
catch (std::runtime_error&
e) {
129 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
131 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
133 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
134 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
141 }
catch (std::runtime_error&
e) {
142 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
e.what();
144 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") +
e.what());
146 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd") <<
"returning unmodified prototype of L1TMuonBarrelParams";
147 return std::make_unique<const L1TMuonBarrelParams>(baseSettings);
151 auto retval = std::make_unique<const L1TMuonBarrelParams>(m_params_helper);
154 <<
"SummaryForFunctionManager: BMTF | OK | All looks good";
void setConfigured(bool state=true) noexcept
Log< level::Error, false > LogError
~L1TMuonBarrelParamsOnlineProd(void) override
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)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, false > LogInfo
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > baseSettings_token
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
std::unique_ptr< const L1TMuonBarrelParams > newObject(const std::string &objectKey, const L1TMuonBarrelParamsO2ORcd &record) override
void configFromDB(l1t::TriggerSystem &trgSys)
L1TMuonBarrelParamsOnlineProd
L1TMuonBarrelParamsOnlineProd(const edm::ParameterSet &)
const bool transactionSafe