CMS 3D CMS Logo

L1GctTSCObjectKeysOnlineProd.cc
Go to the documentation of this file.
3 
5 public:
8 
9  void fillObjectKeys(FillType pL1TriggerKey) override;
10 
11 private:
12 };
13 
15  // kMYSUBSYSTEM = kCSCTF, kDTTF, kRPC, kGMT, kRCT, kGCT, kGT, or kTSP0
16  // subsystemKey = TRIGGERSUP_CONF.{CSCTF_KEY, DTTF_KEY, RPC_KEY, GMT_KEY, RCT_KEY, GCT_KEY, GT_KEY}
17  std::string subsystemKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kGCT);
18 
19  if (!subsystemKey.empty()) {
20  // Execute SQL queries to get data from OMDS (using key) and make C++ object.
21  // Example: SELECT A_PARAMETER FROM CMS_XXX.XXX_CONF WHERE XXX_CONF.XXX_KEY = subsystemKey
22 
23  // get main crate key
24  l1t::OMDSReader::QueryResults mainCrateKeyResults =
25  m_omdsReader.basicQuery("GCT_MAIN_CRATE_KEY",
26  "CMS_GCT",
27  "GCT_CONFIG",
28  "GCT_CONFIG.CONFIG_KEY",
29  m_omdsReader.singleAttribute(subsystemKey));
30 
31  // get phys params key
33  "GCT_PHYS_PARAMS_KEY", "CMS_GCT", "GCT_MAIN_CRATE", "GCT_MAIN_CRATE.CONFIG_KEY", mainCrateKeyResults);
34 
35  std::string physParamsKey;
36 
37  if (physParamsKeyResults.queryFailed()) {
38  edm::LogError("L1-O2O") << "Problem with key for record L1GctJetFinderParamsRcd: query failed ";
39  } else if (physParamsKeyResults.numberRows() != 1) {
40  edm::LogError("L1-O2O") << "Problem with key for record L1GctJetFinderParamsRcd: "
41  << (physParamsKeyResults.numberRows()) << " rows were returned";
42  } else {
43  physParamsKeyResults.fillVariable(physParamsKey);
44  }
45 
46  pL1TriggerKey->add("L1GctJetFinderParamsRcd", "L1GctJetFinderParams", physParamsKey);
47  pL1TriggerKey->add("L1JetEtScaleRcd", "L1CaloEtScale", physParamsKey);
48  pL1TriggerKey->add("L1HtMissScaleRcd", "L1CaloEtScale", physParamsKey);
49  pL1TriggerKey->add("L1HfRingEtScaleRcd", "L1CaloEtScale", physParamsKey);
50  }
51 }
52 
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
MessageLogger.h
L1ObjectKeysOnlineProdBase::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBase.h:54
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1GctTSCObjectKeysOnlineProd::~L1GctTSCObjectKeysOnlineProd
~L1GctTSCObjectKeysOnlineProd() override
Definition: L1GctTSCObjectKeysOnlineProd.cc:7
L1GctTSCObjectKeysOnlineProd::L1GctTSCObjectKeysOnlineProd
L1GctTSCObjectKeysOnlineProd(const edm::ParameterSet &iConfig)
Definition: L1GctTSCObjectKeysOnlineProd.cc:6
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:36
edm::LogError
Definition: MessageLogger.h:183
L1GctTSCObjectKeysOnlineProd
Definition: L1GctTSCObjectKeysOnlineProd.cc:4
L1TriggerKey::kGCT
Definition: L1TriggerKey.h:27
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
L1GctTSCObjectKeysOnlineProd::fillObjectKeys
void fillObjectKeys(FillType pL1TriggerKey) override
Definition: L1GctTSCObjectKeysOnlineProd.cc:14
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