CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1TMuonEndCapForestOnlineProd.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <stdexcept>
4 
9 
10 class L1TMuonEndCapForestOnlineProd : public L1ConfigOnlineProdBaseExt<L1TMuonEndCapForestO2ORcd, L1TMuonEndCapForest> {
11 private:
13 
14 public:
15  std::unique_ptr<const L1TMuonEndCapForest> newObject(const std::string& objectKey,
16  const L1TMuonEndCapForestO2ORcd& record) override;
17 
20 };
21 
24  wrappedSetWhatProduced(iConfig);
25  transactionSafe = iConfig.getParameter<bool>("transactionSafe");
26 }
27 
28 std::unique_ptr<const L1TMuonEndCapForest> L1TMuonEndCapForestOnlineProd::newObject(
29  const std::string& objectKey, const L1TMuonEndCapForestO2ORcd& record) {
30  edm::LogError("L1-O2O") << "L1TMuonEndCapForest object with key " << objectKey << " not in ORCON!";
31 
32  if (transactionSafe)
33  throw std::runtime_error(
34  "SummaryForFunctionManager: EMTF | Faulty | You are never supposed to get Forests online producer running!");
35 
36  auto retval = std::make_unique<const L1TMuonEndCapForest>();
37 
38  edm::LogError("L1-O2O: L1TMuonEndCapForestOnlineProd")
39  << "SummaryForFunctionManager: EMTF | Faulty | You are never supposed to get Forests online producer running; "
40  "returning empty L1TMuonEndCapForest";
41  return retval;
42 }
43 
44 //define this as a plug-in
Log< level::Error, false > LogError
edm::ESConsumesCollectorT< L1TMuonEndCapForestO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
std::unique_ptr< const L1TMuonEndCapForest > newObject(const std::string &objectKey, const L1TMuonEndCapForestO2ORcd &record) override
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1TMuonEndCapForestOnlineProd(const edm::ParameterSet &)