33 baseRcd.
get( baseSettings ) ;
35 if( objectKey.empty() ){
36 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"Key is empty";
38 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Empty objectKey");
40 edm::LogError(
"L1-O2O: L1TMuonGlobalParams" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
41 return std::make_unique< const L1TMuonGlobalParams>( *(baseSettings.product()) ) ;
45 std::string tscKey = objectKey.substr(0, objectKey.find(
":") );
46 std::string rsKey = objectKey.substr( objectKey.find(
":")+1, std::string::npos );
48 edm::LogInfo(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"Producing L1TMuonGlobalParams with TSC key =" << tscKey <<
" and RS key = " << rsKey ;
52 std::map<std::string,std::string> rs_payloads, algo_payloads;
54 std::map<std::string,std::string>
keys =
60 algo_key = keys[
"ALGO"];
69 std::map<std::string,std::string> rsKeys =
76 std::map<std::string,std::string> algoKeys =
83 for(
auto &
key : rsKeys)
84 rs_payloads[
key.second ] =
91 for(
auto &
key : algoKeys)
92 algo_payloads[
key.second ] =
98 }
catch ( std::runtime_error &
e ) {
99 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
101 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Broken key");
103 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
104 return std::make_unique< const L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
114 for(
auto &conf : rs_payloads){
119 for(
auto &conf : algo_payloads){
135 for(
auto &conf : algo_payloads){
139 for(
auto &conf : rs_payloads){
144 }
catch ( std::runtime_error &e ) {
145 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
147 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot parse XMLs");
149 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
150 return std::make_unique< const L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
157 }
catch ( std::runtime_error &e ) {
158 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) << e.what();
160 throw std::runtime_error(
"SummaryForFunctionManager: uGMT | Faulty | Cannot run helper");
162 edm::LogError(
"L1-O2O: L1TMuonGlobalParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonGlobalParams";
163 return std::make_unique< const L1TMuonGlobalParams >( *(baseSettings.product()) ) ;
169 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::unique_ptr< const L1TMuonGlobalParams > newObject(const std::string &objectKey, const L1TMuonGlobalParamsO2ORcd &record) override
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="")
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
~L1TMuonGlobalParamsOnlineProd(void) override
L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet &)