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 
18  std::string uGTKey = pL1TriggerKey->subsystemKey(L1TriggerKeyExt::kuGT);
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
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1TUtmTriggerMenuObjectKeysOnlineProd::~L1TUtmTriggerMenuObjectKeysOnlineProd
~L1TUtmTriggerMenuObjectKeysOnlineProd(void) override
Definition: L1TUtmTriggerMenuObjectKeysOnlineProd.cc:11
L1TriggerKeyExt::add
void add(const std::string &record, const std::string &type, const std::string &key)
Definition: L1TriggerKeyExt.h:42
MessageLogger.h
L1TriggerKeyExt::subsystemKey
const std::string & subsystemKey(L1Subsystems subsystem) const
Definition: L1TriggerKeyExt.h:71
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1TUtmTriggerMenuObjectKeysOnlineProd::L1TUtmTriggerMenuObjectKeysOnlineProd
L1TUtmTriggerMenuObjectKeysOnlineProd(const edm::ParameterSet &)
Definition: L1TUtmTriggerMenuObjectKeysOnlineProd.cc:14
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
L1ObjectKeysOnlineProdBaseExt::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBaseExt.h:35
L1TriggerKeyExt
Definition: L1TriggerKeyExt.h:23
edm::ParameterSet
Definition: ParameterSet.h:47
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TUtmTriggerMenuObjectKeysOnlineProd
Definition: L1TUtmTriggerMenuObjectKeysOnlineProd.cc:5
L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys
void fillObjectKeys(L1TriggerKeyExt *pL1TriggerKey) override
Definition: L1TUtmTriggerMenuObjectKeysOnlineProd.cc:17
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1ObjectKeysOnlineProdBaseExt.h
L1ObjectKeysOnlineProdBaseExt
Definition: L1ObjectKeysOnlineProdBaseExt.h:19
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
L1TriggerKeyExt::kuGT
Definition: L1TriggerKeyExt.h:27