CMS 3D CMS Logo

L1GctRSObjectKeysOnlineProd.cc
Go to the documentation of this file.
3 
5 public:
8 
9  void fillObjectKeys(FillType pL1TriggerKey) override;
10 
11 private:
13 };
14 
16  : L1ObjectKeysOnlineProdBase(iConfig),
17  m_enableL1GctChannelMask(iConfig.getParameter<bool>("enableL1GctChannelMask")) {}
18 
21  // Execute SQL queries to get data from OMDS (using key) and make C++ object.
22  // Example: SELECT A_KEY FROM CMS_XXX.XXX_RUN_SETTINGS_KEYS_CURRENT
23 
24  l1t::OMDSReader::QueryResults objectKeyResults =
25  m_omdsReader.basicQuery("GCT_MASKS_KEY", "CMS_GCT", "GCT_MASKS_CURRENT");
26 
27  std::string maskKey;
28 
29  // check if query was successful
30  if (objectKeyResults.queryFailed()) {
31  edm::LogError("L1-O2O") << "Problem with key for record L1GctChannelMaskRcd: query failed ";
32  } else if (objectKeyResults.numberRows() != 1) {
33  edm::LogError("L1-O2O") << "Problem with key for record L1GctChannelMaskRcd: " << (objectKeyResults.numberRows())
34  << " rows were returned";
35  } else {
36  objectKeyResults.fillVariable(maskKey);
37  }
38 
39  pL1TriggerKey->add("L1GctChannelMaskRcd", "L1GctChannelMask", maskKey);
40  }
41 }
42 
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
electrons_cff.bool
bool
Definition: electrons_cff.py:366
MessageLogger.h
L1ObjectKeysOnlineProdBase::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBase.h:54
L1GctRSObjectKeysOnlineProd
Definition: L1GctRSObjectKeysOnlineProd.cc:4
L1GctRSObjectKeysOnlineProd::L1GctRSObjectKeysOnlineProd
L1GctRSObjectKeysOnlineProd(const edm::ParameterSet &iConfig)
Definition: L1GctRSObjectKeysOnlineProd.cc:15
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
L1GctRSObjectKeysOnlineProd::m_enableL1GctChannelMask
bool m_enableL1GctChannelMask
Definition: L1GctRSObjectKeysOnlineProd.cc:12
L1GctRSObjectKeysOnlineProd::fillObjectKeys
void fillObjectKeys(FillType pL1TriggerKey) override
Definition: L1GctRSObjectKeysOnlineProd.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1ObjectKeysOnlineProdBase
Definition: L1ObjectKeysOnlineProdBase.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
L1GctRSObjectKeysOnlineProd::~L1GctRSObjectKeysOnlineProd
~L1GctRSObjectKeysOnlineProd() override
Definition: L1GctRSObjectKeysOnlineProd.cc:7
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
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