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 // $Id: L1RCT_RSKeysOnlineProd.cc,v 1.1 2009/03/11 10:15:45 jleonard Exp $
17 //
18 //
19 
20 
21 // system include files
22 
23 // user include files
25 #include <sstream>
26 #include "CoralBase/TimeStamp.h"
27 #include <math.h>
28 
30 
31 //
32 // class declaration
33 //
34 
36 public:
39 
40  virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ;
41  private:
42  // ----------member data ---------------------------
44 
45 };
46 
47 //
48 // constants, enums and typedefs
49 //
50 
51 //
52 // static data member definitions
53 //
54 
55 //
56 // constructors and destructor
57 //
59  : L1ObjectKeysOnlineProdBase( iConfig ),
60  m_enableL1RCTChannelMask ( iConfig.getParameter< bool >( "enableL1RCTChannelMask" ) )
61 {}
62 
63 
64 
65 //
66 // member functions
67 //
68 
69 // ------------ method called to produce the data ------------
70 void
72 {
73 
75  {
76 
77  l1t::OMDSReader::QueryResults objectKeyResults =
79  "CMS_RCT",
80  "RCT_RUN_SETTINGS_KEY_CURRENT");
81 
82  std::string objectKey;
83 
84 
85  if( objectKeyResults.queryFailed())
86 
87  {
88  edm::LogError( "L1-O2O" ) << "Problem with jey for record L1RCTCHannelMaskRcd: query failed." ;
89  }
90  else if(objectKeyResults.numberRows() != 1){
91  edm::LogError("L1-O2O")
92  << "Problem with key for record L1RCTChannelMaskRcd: "
93  << (objectKeyResults.numberRows()) << " rows were returned";
94  }
95  else
96  {
97 
98  objectKeyResults.fillVariable( objectKey ) ;
99 
100  }
101  pL1TriggerKey->add( "L1RCTChannelMaskRcd",
102  "L1RCTChannelMask",
103  objectKey ) ;
104  }
105 }
106 
107 //define this as a plug-in
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
boost::shared_ptr< L1TriggerKey > ReturnType
virtual void fillObjectKeys(ReturnType pL1TriggerKey)
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
L1RCT_RSKeysOnlineProd(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56