CMS 3D CMS Logo

L1MuGMTRSKeysOnlineProd.cc
Go to the documentation of this file.
1 
17 
19 public:
22 
23  void fillObjectKeys(FillType pL1TriggerKey) override;
24 
25 private:
27 };
28 
30  : L1ObjectKeysOnlineProdBase(iConfig),
31  m_enableL1MuGMTChannelMask(iConfig.getParameter<bool>("enableL1MuGMTChannelMask")) {}
32 
35  // Execute SQL queries to get data from OMDS (using key) and make C++ object.
36  // Example: SELECT A_KEY FROM CMS_XXX.XXX_RUN_SETTINGS_KEYS_CURRENT
37  l1t::OMDSReader::QueryResults objectKeyResults =
38  m_omdsReader.basicQuery("GMT_RUN_SETTINGS_FK", "CMS_GMT", "GMT_RUN_SETTINGS_KEY_CURRENT");
39 
40  std::string objectKey;
41 
42  // check if query was successful
43  if (objectKeyResults.queryFailed()) {
44  edm::LogError("L1-O2O") << "Problem with key for record L1MuGMTChannelMaskRcd: query failed ";
45  } else if (objectKeyResults.numberRows() != 1) {
46  edm::LogError("L1-O2O") << "Problem with key for record L1MuGMTChannelMaskRcd: "
47  << (objectKeyResults.numberRows()) << " rows were returned";
48  } else {
49  objectKeyResults.fillVariable(objectKey);
50  }
51 
52  pL1TriggerKey->add("L1MuGMTChannelMaskRcd", "L1MuGMTChannelMask", objectKey);
53  }
54 }
55 
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1MuGMTRSKeysOnlineProd::fillObjectKeys
void fillObjectKeys(FillType pL1TriggerKey) override
Definition: L1MuGMTRSKeysOnlineProd.cc:33
electrons_cff.bool
bool
Definition: electrons_cff.py:393
MessageLogger.h
L1ObjectKeysOnlineProdBase::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBase.h:54
L1MuGMTRSKeysOnlineProd::L1MuGMTRSKeysOnlineProd
L1MuGMTRSKeysOnlineProd(const edm::ParameterSet &iConfig)
Definition: L1MuGMTRSKeysOnlineProd.cc:29
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1ObjectKeysOnlineProdBase
Definition: L1ObjectKeysOnlineProdBase.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
L1MuGMTRSKeysOnlineProd::m_enableL1MuGMTChannelMask
bool m_enableL1MuGMTChannelMask
Definition: L1MuGMTRSKeysOnlineProd.cc:26
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
l1t::OMDSReader::basicQuery
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
L1MuGMTRSKeysOnlineProd::~L1MuGMTRSKeysOnlineProd
~L1MuGMTRSKeysOnlineProd() override
Definition: L1MuGMTRSKeysOnlineProd.cc:21
L1MuGMTRSKeysOnlineProd
Definition: L1MuGMTRSKeysOnlineProd.cc:18
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
L1ObjectKeysOnlineProdBase.h
L1ObjectKeysOnlineProdBase::FillType
std::unique_ptr< L1TriggerKey >::pointer FillType
Definition: L1ObjectKeysOnlineProdBase.h:45