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 
std::unique_ptr< L1TriggerKey >::pointer FillType
Log< level::Error, false > LogError
L1GctRSObjectKeysOnlineProd(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:61
void fillObjectKeys(FillType pL1TriggerKey) override