34 baseRcd.
get( baseSettings ) ;
36 if( objectKey.empty() ){
37 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"Key is empty";
39 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Empty objectKey");
41 edm::LogError(
"L1-O2O: L1TMuonGlobalParams" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
42 return std::make_shared< L1TMuonGlobalParams>( *(baseSettings.product()) ) ;
46 std::string tscKey = objectKey.substr(0, objectKey.find(
":") );
47 std::string rsKey = objectKey.substr( objectKey.find(
":")+1, std::string::npos );
49 edm::LogInfo(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"Producing L1TMuonGlobalParams with TSC key =" << tscKey <<
" and RS key = " << rsKey ;
53 std::map<std::string,std::string> rs_payloads, algo_payloads;
55 std::map<std::string,std::string>
keys =
61 algo_key = keys[
"ALGO"];
70 std::map<std::string,std::string> rsKeys =
77 std::map<std::string,std::string> algoKeys =
84 for(
auto &
key : rsKeys)
85 rs_payloads[
key.second ] =
92 for(
auto &
key : algoKeys)
93 algo_payloads[
key.second ] =
99 }
catch ( std::runtime_error &
e ) {
100 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
102 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Broken key");
104 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
105 return std::make_shared< L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
115 for(
auto &conf : rs_payloads){
120 for(
auto &conf : algo_payloads){
136 for(
auto &conf : algo_payloads){
140 for(
auto &conf : rs_payloads){
145 }
catch ( std::runtime_error &e ) {
146 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
148 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot parse XMLs");
150 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
151 return std::make_shared< L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
158 }
catch ( std::runtime_error &e ) {
159 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
161 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot run helper");
163 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
164 return std::make_shared< L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
168 std::shared_ptr< L1TMuonGlobalParams > retval = std::make_shared< L1TMuonGlobalParams >(
cast_to_L1TMuonGlobalParams(m_params_helper) );
170 edm::LogInfo(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"SummaryForFunctionManager: uGMT | OK | All looks good";
const L1TMuonGlobalParams & cast_to_L1TMuonGlobalParams(const L1TMuonGlobalParams_PUBLIC &x)
T getParameter(std::string const &) const
void setConfigured(bool state=true) noexcept
std::shared_ptr< L1TMuonGlobalParams > newObject(const std::string &objectKey, const L1TMuonGlobalParamsO2ORcd &record) override
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="")
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
~L1TMuonGlobalParamsOnlineProd(void) override
L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet &)
bool get(HolderT &iHolder) const