13 #include "xercesc/util/PlatformUtils.hpp" 34 baseRcd.
get( baseSettings ) ;
36 if (objectKey.empty()) {
37 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"Key is empty, returning empty L1TMuonBarrelParams";
39 throw std::runtime_error(
"SummaryForFunctionManager: BMTF | Faulty | Empty objectKey");
41 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonBarrelParams";
42 return std::make_unique< const L1TMuonBarrelParams >( *(baseSettings.product()) ) ;
46 std::string tscKey = objectKey.substr(0, objectKey.find(
":") );
47 std::string rsKey = objectKey.substr( objectKey.find(
":")+1, std::string::npos );
50 edm::LogInfo(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"Producing L1TMuonBarrelParams with TSC key = " << tscKey <<
" and RS key = " << rsKey ;
54 std::string hw_payload, algo_payload, mp7_payload, amc13_payload;
56 std::map<std::string,std::string>
keys =
62 algo_key = keys[
"ALGO"];
79 std::map<std::string,std::string> rsKeys =
85 mp7_key = rsKeys[
"MP7"];
86 amc13_key = rsKeys[
"AMC13"];
101 }
catch ( std::runtime_error &
e ) {
102 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) << e.what();
104 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") + e.what());
106 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonBarrelParams";
107 return std::make_unique< const L1TMuonBarrelParams >( *(baseSettings.product()) ) ;
154 }
catch ( std::runtime_error &e ) {
155 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) << e.what();
157 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") + e.what());
159 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonBarrelParams";
160 return std::make_unique< const L1TMuonBarrelParams >( *(baseSettings.product()) ) ;
167 }
catch ( std::runtime_error &e ) {
168 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) << e.what();
170 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: BMTF | Faulty | ") + e.what());
172 edm::LogError(
"L1-O2O: L1TMuonBarrelParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonBarrelParams";
173 return std::make_unique< const L1TMuonBarrelParams >( *(baseSettings.product()) ) ;
177 auto retval = std::make_unique< const L1TMuonBarrelParams>( m_params_helper );
179 edm::LogInfo(
"L1-O2O: L1TCaloParamsOnlineProd" ) <<
"SummaryForFunctionManager: BMTF | OK | All looks good";
T getParameter(std::string const &) const
void setConfigured(bool state=true) noexcept
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
~L1TMuonBarrelParamsOnlineProd(void) 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)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
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(const edm::ParameterSet &)