File indexing completed on 2024-04-06 12:22:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
0023 #include <sstream>
0024 #include "CoralBase/TimeStamp.h"
0025 #include <cmath>
0026
0027 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0028
0029
0030
0031
0032
0033 class L1RCT_RSKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
0034 public:
0035 L1RCT_RSKeysOnlineProd(const edm::ParameterSet& iConfig);
0036 ~L1RCT_RSKeysOnlineProd() override {}
0037
0038 void fillObjectKeys(FillType pL1TriggerKey) override;
0039
0040 private:
0041
0042 bool m_enableL1RCTChannelMask;
0043 };
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 L1RCT_RSKeysOnlineProd::L1RCT_RSKeysOnlineProd(const edm::ParameterSet& iConfig)
0057 : L1ObjectKeysOnlineProdBase(iConfig),
0058 m_enableL1RCTChannelMask(iConfig.getParameter<bool>("enableL1RCTChannelMask")) {}
0059
0060
0061
0062
0063
0064
0065 void L1RCT_RSKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {
0066 if (m_enableL1RCTChannelMask) {
0067 l1t::OMDSReader::QueryResults objectKeyResults =
0068 m_omdsReader.basicQuery("ID", "CMS_RCT", "RCT_RUN_SETTINGS_KEY_CURRENT");
0069
0070 std::string objectKey;
0071
0072 if (objectKeyResults.queryFailed())
0073
0074 {
0075 edm::LogError("L1-O2O") << "Problem with jey for record L1RCTCHannelMaskRcd: query failed.";
0076 } else if (objectKeyResults.numberRows() != 1) {
0077 edm::LogError("L1-O2O") << "Problem with key for record L1RCTChannelMaskRcd: " << (objectKeyResults.numberRows())
0078 << " rows were returned";
0079 } else {
0080 objectKeyResults.fillVariable(objectKey);
0081 }
0082 pL1TriggerKey->add("L1RCTChannelMaskRcd", "L1RCTChannelMask", objectKey);
0083 }
0084 }
0085
0086
0087 DEFINE_FWK_EVENTSETUP_MODULE(L1RCT_RSKeysOnlineProd);