CMS 3D CMS Logo

L1TUtmTriggerMenuObjectKeysOnlineProd.cc
Go to the documentation of this file.
1 #include <iostream>
4 
6 private:
7 
8 public:
9  virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
10 
13 };
14 
16  : L1ObjectKeysOnlineProdBaseExt( iConfig ){
17 }
18 
19 
21 
22  std::string uGTKey = pL1TriggerKey->subsystemKey( L1TriggerKeyExt::kuGT ) ;
23 
24  uGTKey = uGTKey.substr( 0, uGTKey.find(":") );
25 
26  std::string stage2Schema = "CMS_TRG_L1_CONF" ;
27 
28  std::string l1_menu_key;
29  std::vector< std::string > queryStrings ;
30  queryStrings.push_back( "L1_MENU" ) ;
31 
32  std::string l1_menu_name, ugt_key;
33 
34  // select L1_MENU from CMS_TRG_L1_CONF.UGT_KEYS where ID = objectKey ;
35  l1t::OMDSReader::QueryResults queryResult =
36  m_omdsReader.basicQuery( queryStrings,
37  stage2Schema,
38  "UGT_KEYS",
39  "UGT_KEYS.ID",
41  ) ;
42 
43  if( queryResult.queryFailed() || queryResult.numberRows() != 1 ){
44  edm::LogError( "L1-O2O" ) << "Cannot get UGT_KEYS.L1_MENU for ID = " << uGTKey << " expect a crash later " ;
45  return ;
46  }
47 
48  if( !queryResult.fillVariable( "L1_MENU", l1_menu_key) ) l1_menu_key = "";
49 
50  pL1TriggerKey->add( "L1TUtmTriggerMenuO2ORcd",
51  "L1TUtmTriggerMenu",
52  l1_menu_key) ;
53 }
54 
55 
56 //define this as a plug-in
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:295
std::shared_ptr< L1TriggerKeyExt > ReturnType
virtual void fillObjectKeys(ReturnType pL1TriggerKey) override
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:86
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
return(e1-e2)*(e1-e2)+dp *dp