File indexing completed on 2024-04-06 12:22:14
0001 #include "L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFObjectKeysOnlineProd.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003
0004 CSCTFObjectKeysOnlineProd::CSCTFObjectKeysOnlineProd(const edm::ParameterSet& iConfig)
0005 : L1ObjectKeysOnlineProdBase(iConfig),
0006 m_enableConfiguration(iConfig.getParameter<bool>("enableConfiguration")),
0007 m_enablePtLut(iConfig.getParameter<bool>("enablePtLut")) {}
0008
0009 void CSCTFObjectKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {
0010 std::string csctfKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kCSCTF);
0011
0012 if (!csctfKey.empty()) {
0013 if (m_enableConfiguration) {
0014
0015
0016 pL1TriggerKey->add("L1MuCSCTFConfigurationRcd", "L1MuCSCTFConfiguration", csctfKey);
0017
0018 }
0019
0020 if (m_enablePtLut) {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 std::string sp1key = csctfKey + "0001";
0031
0032
0033 l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery(
0034 "PTLUT_VERSION", "CMS_CSC_TF", "CSCTF_SP_CONF", "CSCTF_SP_CONF.SP_KEY", m_omdsReader.singleAttribute(sp1key));
0035
0036
0037 if (objectKeyResults.queryFailed() || objectKeyResults.numberRows() != 1) {
0038 edm::LogError("L1-O2O") << "Problem with CSCTF key while retrieving "
0039 << "the PTLUT_VERSION";
0040 return;
0041 }
0042
0043
0044 std::string ptLutKey;
0045 objectKeyResults.fillVariable(ptLutKey);
0046 pL1TriggerKey->add("L1MuCSCPtLutRcd", "L1MuCSCPtLut", ptLutKey);
0047
0048 }
0049 }
0050 }