CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctRSObjectKeysOnlineProd.cc
Go to the documentation of this file.
3 
5  public:
8 
9  virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
10  private:
12 };
13 
15  : L1ObjectKeysOnlineProdBase( iConfig ),
16  m_enableL1GctChannelMask( iConfig.getParameter< bool >( "enableL1GctChannelMask" ) )
17 {
18 }
19 
20 void
22 {
24  {
25  // Execute SQL queries to get data from OMDS (using key) and make C++ object.
26  // Example: SELECT A_KEY FROM CMS_XXX.XXX_RUN_SETTINGS_KEYS_CURRENT
27 
28  l1t::OMDSReader::QueryResults objectKeyResults =
30  "GCT_MASKS_KEY",
31  "CMS_GCT",
32  "GCT_MASKS_CURRENT" );
33 
34  std::string maskKey ;
35 
36  // check if query was successful
37  if( objectKeyResults.queryFailed() )
38  {
39  edm::LogError("L1-O2O")
40  << "Problem with key for record L1GctChannelMaskRcd: query failed ";
41  }
42  else if( objectKeyResults.numberRows() != 1 )
43  {
44  edm::LogError("L1-O2O")
45  << "Problem with key for record L1GctChannelMaskRcd: "
46  << (objectKeyResults.numberRows()) << " rows were returned";
47  }
48  else
49  {
50  objectKeyResults.fillVariable( maskKey ) ;
51  }
52 
53  pL1TriggerKey->add( "L1GctChannelMaskRcd", "L1GctChannelMask", maskKey ) ;
54  }
55 }
56 
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
boost::shared_ptr< L1TriggerKey > ReturnType
L1GctRSObjectKeysOnlineProd(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="") const
Definition: OMDSReader.cc:87
virtual void fillObjectKeys(ReturnType pL1TriggerKey) override
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60