CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1RCT_RSKeysOnlineProd.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1TriggerConfig
4 // Class: RCTObjectKeysOnlineProd
5 //
13 //
14 // Original Author: Werner Man-Li Sun
15 // Created: Fri Aug 22 19:51:36 CEST 2008
16 //
17 //
18 
19 
20 // system include files
21 
22 // user include files
24 #include <sstream>
25 #include "CoralBase/TimeStamp.h"
26 #include <math.h>
27 
29 
30 //
31 // class declaration
32 //
33 
35 public:
38 
39  virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
40  private:
41  // ----------member data ---------------------------
43 
44 };
45 
46 //
47 // constants, enums and typedefs
48 //
49 
50 //
51 // static data member definitions
52 //
53 
54 //
55 // constructors and destructor
56 //
58  : L1ObjectKeysOnlineProdBase( iConfig ),
59  m_enableL1RCTChannelMask ( iConfig.getParameter< bool >( "enableL1RCTChannelMask" ) )
60 {}
61 
62 
63 
64 //
65 // member functions
66 //
67 
68 // ------------ method called to produce the data ------------
69 void
71 {
72 
74  {
75 
76  l1t::OMDSReader::QueryResults objectKeyResults =
78  "CMS_RCT",
79  "RCT_RUN_SETTINGS_KEY_CURRENT");
80 
81  std::string objectKey;
82 
83 
84  if( objectKeyResults.queryFailed())
85 
86  {
87  edm::LogError( "L1-O2O" ) << "Problem with jey for record L1RCTCHannelMaskRcd: query failed." ;
88  }
89  else if(objectKeyResults.numberRows() != 1){
90  edm::LogError("L1-O2O")
91  << "Problem with key for record L1RCTChannelMaskRcd: "
92  << (objectKeyResults.numberRows()) << " rows were returned";
93  }
94  else
95  {
96 
97  objectKeyResults.fillVariable( objectKey ) ;
98 
99  }
100  pL1TriggerKey->add( "L1RCTChannelMaskRcd",
101  "L1RCTChannelMask",
102  objectKey ) ;
103  }
104 }
105 
106 //define this as a plug-in
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:312
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="")
Definition: OMDSReader.cc:86
L1RCT_RSKeysOnlineProd(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
virtual void fillObjectKeys(ReturnType pL1TriggerKey) override