File indexing completed on 2024-04-06 12:22:17
0001 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003
0004 class L1GctTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
0005 public:
0006 L1GctTSCObjectKeysOnlineProd(const edm::ParameterSet& iConfig) : L1ObjectKeysOnlineProdBase(iConfig) {}
0007 ~L1GctTSCObjectKeysOnlineProd() override {}
0008
0009 void fillObjectKeys(FillType pL1TriggerKey) override;
0010
0011 private:
0012 };
0013
0014 void L1GctTSCObjectKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {
0015
0016
0017 std::string subsystemKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kGCT);
0018
0019 if (!subsystemKey.empty()) {
0020
0021
0022
0023
0024 l1t::OMDSReader::QueryResults mainCrateKeyResults =
0025 m_omdsReader.basicQuery("GCT_MAIN_CRATE_KEY",
0026 "CMS_GCT",
0027 "GCT_CONFIG",
0028 "GCT_CONFIG.CONFIG_KEY",
0029 m_omdsReader.singleAttribute(subsystemKey));
0030
0031
0032 l1t::OMDSReader::QueryResults physParamsKeyResults = m_omdsReader.basicQuery(
0033 "GCT_PHYS_PARAMS_KEY", "CMS_GCT", "GCT_MAIN_CRATE", "GCT_MAIN_CRATE.CONFIG_KEY", mainCrateKeyResults);
0034
0035 std::string physParamsKey;
0036
0037 if (physParamsKeyResults.queryFailed()) {
0038 edm::LogError("L1-O2O") << "Problem with key for record L1GctJetFinderParamsRcd: query failed ";
0039 } else if (physParamsKeyResults.numberRows() != 1) {
0040 edm::LogError("L1-O2O") << "Problem with key for record L1GctJetFinderParamsRcd: "
0041 << (physParamsKeyResults.numberRows()) << " rows were returned";
0042 } else {
0043 physParamsKeyResults.fillVariable(physParamsKey);
0044 }
0045
0046 pL1TriggerKey->add("L1GctJetFinderParamsRcd", "L1GctJetFinderParams", physParamsKey);
0047 pL1TriggerKey->add("L1JetEtScaleRcd", "L1CaloEtScale", physParamsKey);
0048 pL1TriggerKey->add("L1HtMissScaleRcd", "L1CaloEtScale", physParamsKey);
0049 pL1TriggerKey->add("L1HfRingEtScaleRcd", "L1CaloEtScale", physParamsKey);
0050 }
0051 }
0052
0053 DEFINE_FWK_EVENTSETUP_MODULE(L1GctTSCObjectKeysOnlineProd);