34 baseRcd.
get( baseSettings ) ;
37 if (objectKey.empty()) {
38 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"Key is empty";
40 throw std::runtime_error(
"SummaryForFunctionManager: BMTF | Faulty | Empty objectKey");
42 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonEndCapParams";
43 return std::make_shared< L1TMuonEndCapParams >( *(baseSettings.product()) ) ;
47 std::string tscKey = objectKey.substr(0, objectKey.find(
":") );
48 std::string rsKey = objectKey.substr( objectKey.find(
":")+1, std::string::npos );
50 edm::LogInfo(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"Producing L1TMuonEndCapParams with TSC key = " << tscKey <<
" and RS key = " << rsKey ;
55 std::map<std::string,std::string>
keys =
63 algo_key = keys[
"ALGO"];
77 }
catch ( std::runtime_error &
e ) {
78 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) << e.what();
80 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Broken key");
82 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonEndCapParams";
83 return std::make_shared< L1TMuonEndCapParams >( *(baseSettings.product()) ) ;
110 }
catch ( std::runtime_error &e ) {
111 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) << e.what();
113 throw std::runtime_error(
"SummaryForFunctionManager: EMTF | Faulty | Cannot parse XMLs");
115 edm::LogError(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"returning unmodified prototype of L1TMuonEndCapParams";
116 return std::make_shared< L1TMuonEndCapParams >( *(baseSettings.product()) ) ;
121 std::map<std::string, l1t::Parameter> conf = trgSys.
getParameters(
"EMTFp1");
124 std::string core_fwv = conf[
"core_firmware_version"].getValueAsStr();
126 strptime(core_fwv.c_str(),
"%Y-%m-%d %T", &brokenTime);
127 time_t fw_sinceEpoch = timegm(&brokenTime);
135 retval->firmwareVersion_ = fw_sinceEpoch;
136 retval->PtAssignVersion_ = conf[
"pt_lut_version"].getValue<
unsigned int>();
137 retval->PhiMatchWindowSt1_ = 1;
139 edm::LogInfo(
"L1-O2O: L1TMuonEndCapParamsOnlineProd" ) <<
"SummaryForFunctionManager: EMTF | OK | All looks good";
T getParameter(std::string const &) const
void setConfigured(bool state=true) noexcept
std::shared_ptr< L1TMuonEndCapParams > newObject(const std::string &objectKey, const L1TMuonEndCapParamsO2ORcd &record) override
l1t::OMDSReader m_omdsReader
L1TMuonEndCapParamsOnlineProd(const edm::ParameterSet &)
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)
const std::map< std::string, Parameter > & getParameters(const char *processor) const
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
bool get(HolderT &iHolder) const
~L1TMuonEndCapParamsOnlineProd(void) override