CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Log< level::Error, false > LogError
std::unique_ptr< const L1TMuonOverlapParams > newObject(const std::string &objectKey, const L1TMuonOverlapParamsO2ORcd &record) override
edm::ESConsumesCollectorT< L1TMuonOverlapParamsO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet &)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60