CMS 3D CMS Logo

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 // system include files
20 
21 // user include files
23 #include <sstream>
24 #include "CoralBase/TimeStamp.h"
25 #include <cmath>
26 
28 
29 //
30 // class declaration
31 //
32 
34 public:
37 
38  void fillObjectKeys(FillType pL1TriggerKey) override;
39 
40 private:
41  // ----------member data ---------------------------
43 };
44 
45 //
46 // constants, enums and typedefs
47 //
48 
49 //
50 // static data member definitions
51 //
52 
53 //
54 // constructors and destructor
55 //
57  : L1ObjectKeysOnlineProdBase(iConfig),
58  m_enableL1RCTChannelMask(iConfig.getParameter<bool>("enableL1RCTChannelMask")) {}
59 
60 //
61 // member functions
62 //
63 
64 // ------------ method called to produce the data ------------
67  l1t::OMDSReader::QueryResults objectKeyResults =
68  m_omdsReader.basicQuery("ID", "CMS_RCT", "RCT_RUN_SETTINGS_KEY_CURRENT");
69 
71 
72  if (objectKeyResults.queryFailed())
73 
74  {
75  edm::LogError("L1-O2O") << "Problem with jey for record L1RCTCHannelMaskRcd: query failed.";
76  } else if (objectKeyResults.numberRows() != 1) {
77  edm::LogError("L1-O2O") << "Problem with key for record L1RCTChannelMaskRcd: " << (objectKeyResults.numberRows())
78  << " rows were returned";
79  } else {
80  objectKeyResults.fillVariable(objectKey);
81  }
82  pL1TriggerKey->add("L1RCTChannelMaskRcd", "L1RCTChannelMask", objectKey);
83  }
84 }
85 
86 //define this as a plug-in
std::unique_ptr< L1TriggerKey >::pointer FillType
Log< level::Error, false > LogError
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:75
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
L1RCT_RSKeysOnlineProd(const edm::ParameterSet &iConfig)
void fillObjectKeys(FillType pL1TriggerKey) override