CMS 3D CMS Logo

L1TUtmTriggerMenuObjectKeysOnlineProd.cc
Go to the documentation of this file.
1 #include <iostream>
4 
6 private:
7 public:
8  void fillObjectKeys(L1TriggerKeyExt* pL1TriggerKey) override;
9 
12 };
13 
15  : L1ObjectKeysOnlineProdBaseExt(iConfig) {}
16 
19 
20  uGTKey = uGTKey.substr(0, uGTKey.find(':'));
21 
22  std::string stage2Schema = "CMS_TRG_L1_CONF";
23 
24  std::string l1_menu_key;
25  std::vector<std::string> queryStrings;
26  queryStrings.push_back("L1_MENU");
27 
28  std::string l1_menu_name, ugt_key;
29 
30  // select L1_MENU from CMS_TRG_L1_CONF.UGT_KEYS where ID = objectKey ;
32  queryStrings, stage2Schema, "UGT_KEYS", "UGT_KEYS.ID", m_omdsReader.singleAttribute(uGTKey));
33 
34  if (queryResult.queryFailed() || queryResult.numberRows() != 1) {
35  edm::LogError("L1-O2O") << "Cannot get UGT_KEYS.L1_MENU for ID = " << uGTKey << " expect a crash later ";
36  return;
37  }
38 
39  if (!queryResult.fillVariable("L1_MENU", l1_menu_key))
40  l1_menu_key = "";
41 
42  pL1TriggerKey->add("L1TUtmTriggerMenuO2ORcd", "L1TUtmTriggerMenu", l1_menu_key);
43 }
44 
45 //define this as a plug-in
const std::string & subsystemKey(L1Subsystems subsystem) const
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
void add(const std::string &record, const std::string &type, const std::string &key)
Log< level::Error, false > LogError
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(L1TriggerKeyExt *pL1TriggerKey) override