CMS 3D CMS Logo

L1MuGMTRSKeysOnlineProd.cc
Go to the documentation of this file.
1 
18 
20  public:
23 
24  void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
25  private:
27 };
28 
30  : L1ObjectKeysOnlineProdBase( iConfig ),
31  m_enableL1MuGMTChannelMask( iConfig.getParameter< bool >( "enableL1MuGMTChannelMask" ) )
32 {
33 }
34 
35 void
37 {
39  {
40  // Execute SQL queries to get data from OMDS (using key) and make C++ object.
41  // Example: SELECT A_KEY FROM CMS_XXX.XXX_RUN_SETTINGS_KEYS_CURRENT
42  l1t::OMDSReader::QueryResults objectKeyResults =
44  "GMT_RUN_SETTINGS_FK",
45  "CMS_GMT",
46  "GMT_RUN_SETTINGS_KEY_CURRENT" );
47 
48  std::string objectKey ;
49 
50  // check if query was successful
51  if( objectKeyResults.queryFailed() )
52  {
53  edm::LogError("L1-O2O")
54  << "Problem with key for record L1MuGMTChannelMaskRcd: query failed ";
55  }
56  else if( objectKeyResults.numberRows() != 1 )
57  {
58  edm::LogError("L1-O2O")
59  << "Problem with key for record L1MuGMTChannelMaskRcd: "
60  << (objectKeyResults.numberRows()) << " rows were returned";
61  }
62  else
63  {
64  objectKeyResults.fillVariable( objectKey ) ;
65  }
66 
67  pL1TriggerKey->add( "L1MuGMTChannelMaskRcd", "L1MuGMTChannelMask", objectKey ) ;
68  }
69 }
70 
void fillObjectKeys(ReturnType pL1TriggerKey) override
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
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:86
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::shared_ptr< L1TriggerKey > ReturnType