File indexing completed on 2024-04-06 12:22:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018
0019 class L1MuGMTParametersKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
0020 public:
0021 L1MuGMTParametersKeysOnlineProd(const edm::ParameterSet& iConfig) : L1ObjectKeysOnlineProdBase(iConfig) {
0022 LogDebug("L1-O2O") << "L1MuGMTParametersKeysOnlineProd created" << std::endl;
0023 }
0024 ~L1MuGMTParametersKeysOnlineProd() override {}
0025
0026 void fillObjectKeys(FillType) override;
0027
0028 private:
0029 };
0030
0031 void L1MuGMTParametersKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {
0032 std::string subsystemKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kGMT);
0033
0034 if (!subsystemKey.empty()) {
0035 l1t::OMDSReader::QueryResults lutKeyResults = m_omdsReader.basicQuery(
0036
0037 "LUT_KEY",
0038
0039 "CMS_GMT",
0040
0041 "GMT_CONFIG",
0042
0043 "GMT_CONFIG.KEY",
0044
0045 m_omdsReader.singleAttribute(subsystemKey));
0046
0047 if (lutKeyResults.queryFailed() || lutKeyResults.numberRows() != 1)
0048 {
0049 edm::LogError("L1-O2O") << "Problem extracting GMT LUT key from GMT config key.";
0050 return;
0051 }
0052
0053 l1t::OMDSReader::QueryResults softwareConfigKeyResults = m_omdsReader.basicQuery(
0054
0055 "GMT_SOFTWARE_CONFIG",
0056
0057 "CMS_GMT",
0058
0059 "GMT_LUTS",
0060
0061 "GMT_LUTS.KEY",
0062
0063 lutKeyResults);
0064
0065 if (softwareConfigKeyResults.queryFailed() ||
0066 softwareConfigKeyResults.numberRows() != 1)
0067 {
0068 edm::LogError("L1-O2O") << "Problem extracting GMT software config key from GMT config key.";
0069 return;
0070 }
0071
0072 std::string objectKey;
0073 softwareConfigKeyResults.fillVariable(objectKey);
0074
0075 pL1TriggerKey->add("L1MuGMTParametersRcd", "L1MuGMTParameters", objectKey);
0076 }
0077 }
0078
0079 DEFINE_FWK_EVENTSETUP_MODULE(L1MuGMTParametersKeysOnlineProd);