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 
70  std::string objectKey;
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
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
electrons_cff.bool
bool
Definition: electrons_cff.py:366
MessageLogger.h
L1RCT_RSKeysOnlineProd::~L1RCT_RSKeysOnlineProd
~L1RCT_RSKeysOnlineProd() override
Definition: L1RCT_RSKeysOnlineProd.cc:36
L1RCT_RSKeysOnlineProd::m_enableL1RCTChannelMask
bool m_enableL1RCTChannelMask
Definition: L1RCT_RSKeysOnlineProd.cc:42
L1ObjectKeysOnlineProdBase::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBase.h:54
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1ObjectKeysOnlineProdBase
Definition: L1ObjectKeysOnlineProdBase.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
L1RCT_RSKeysOnlineProd::L1RCT_RSKeysOnlineProd
L1RCT_RSKeysOnlineProd(const edm::ParameterSet &iConfig)
Definition: L1RCT_RSKeysOnlineProd.cc:56
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
l1t::OMDSReader::basicQuery
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
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
L1RCT_RSKeysOnlineProd
Definition: L1RCT_RSKeysOnlineProd.cc:33
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
L1ObjectKeysOnlineProdBase.h
L1RCT_RSKeysOnlineProd::fillObjectKeys
void fillObjectKeys(FillType pL1TriggerKey) override
Definition: L1RCT_RSKeysOnlineProd.cc:65
L1ObjectKeysOnlineProdBase::FillType
std::unique_ptr< L1TriggerKey >::pointer FillType
Definition: L1ObjectKeysOnlineProdBase.h:45