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  transactionSafe = iConfig.getParameter<bool>("transactionSafe");
26 }
27 
28 std::unique_ptr<const L1TMuonOverlapParams> L1TMuonOverlapParamsOnlineProd::newObject(
29  const std::string& objectKey, const L1TMuonOverlapParamsO2ORcd& record) {
30  edm::LogError("L1-O2O") << "L1TMuonOverlapParams object with key " << objectKey << " not in ORCON!";
31 
32  if (transactionSafe)
33  throw std::runtime_error(
34  "SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running!");
35 
36  auto retval = std::make_unique<const L1TMuonOverlapParams>();
37 
38  edm::LogError("L1-O2O: L1TMuonOverlapParamsOnlineProd")
39  << "SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running; "
40  "returning empty L1TMuonOverlapParams";
41  return retval;
42 }
43 
44 //define this as a plug-in
T getParameter(std::string const &) const
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< const L1TMuonOverlapParams > newObject(const std::string &objectKey, const L1TMuonOverlapParamsO2ORcd &record) override
L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60