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 
std::unique_ptr< L1TriggerKey >::pointer FillType
void fillObjectKeys(FillType pL1TriggerKey) override
Log< level::Error, false > LogError
L1MuGMTRSKeysOnlineProd(const edm::ParameterSet &iConfig)
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
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60