CMS 3D CMS Logo

L1TMuonOverlapParamsOnlineProd.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <stdexcept>
4 
9 
11  : public L1ConfigOnlineProdBaseExt<L1TMuonOverlapParamsO2ORcd, L1TMuonOverlapParams> {
12 private:
14 
15 public:
16  std::unique_ptr<const L1TMuonOverlapParams> newObject(const std::string& objectKey,
17  const L1TMuonOverlapParamsO2ORcd& record) override;
18 
21 };
22 
25  wrappedSetWhatProduced(iConfig);
26  transactionSafe = iConfig.getParameter<bool>("transactionSafe");
27 }
28 
29 std::unique_ptr<const L1TMuonOverlapParams> L1TMuonOverlapParamsOnlineProd::newObject(
30  const std::string& objectKey, const L1TMuonOverlapParamsO2ORcd& record) {
31  edm::LogError("L1-O2O") << "L1TMuonOverlapParams object with key " << objectKey << " not in ORCON!";
32 
33  if (transactionSafe)
34  throw std::runtime_error(
35  "SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running!");
36 
37  auto retval = std::make_unique<const L1TMuonOverlapParams>();
38 
39  edm::LogError("L1-O2O: L1TMuonOverlapParamsOnlineProd")
40  << "SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running; "
41  "returning empty L1TMuonOverlapParams";
42  return retval;
43 }
44 
45 //define this as a plug-in
L1TMuonOverlapParamsOnlineProd::L1TMuonOverlapParamsOnlineProd
L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet &)
Definition: L1TMuonOverlapParamsOnlineProd.cc:23
L1TMuonOverlapParamsOnlineProd::~L1TMuonOverlapParamsOnlineProd
~L1TMuonOverlapParamsOnlineProd(void) override
Definition: L1TMuonOverlapParamsOnlineProd.cc:20
L1TMuonOverlapParamsO2ORcd
Definition: L1TMuonOverlapParamsO2ORcd.h:25
L1TMuonOverlapParamsOnlineProd
Definition: L1TMuonOverlapParamsOnlineProd.cc:10
L1ConfigOnlineProdBaseExt.h
L1ConfigOnlineProdBaseExt
Definition: L1ConfigOnlineProdBaseExt.h:32
L1TMuonOverlapParams
Definition: L1TMuonOverlapParams.h:14
L1TMuonOverlapParams.h
L1TMuonOverlapParamsO2ORcd.h
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHarvesting_cff.record
record
Definition: AlCaHarvesting_cff.py:42
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TMuonOverlapParamsOnlineProd::transactionSafe
bool transactionSafe
Definition: L1TMuonOverlapParamsOnlineProd.cc:13
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1TMuonOverlapParamsOnlineProd::newObject
std::unique_ptr< const L1TMuonOverlapParams > newObject(const std::string &objectKey, const L1TMuonOverlapParamsO2ORcd &record) override
Definition: L1TMuonOverlapParamsOnlineProd.cc:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TMuonOverlapParamsRcd.h
L1ConfigOnlineProdBaseExt< L1TMuonOverlapParamsO2ORcd, L1TMuonOverlapParams >::wrappedSetWhatProduced
edm::ESConsumesCollectorT< L1TMuonOverlapParamsO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
Definition: L1ConfigOnlineProdBaseExt.h:93