CMS 3D CMS Logo

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