CMS 3D CMS Logo

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
L1TMuonEndCapForestOnlineProd::L1TMuonEndCapForestOnlineProd
L1TMuonEndCapForestOnlineProd(const edm::ParameterSet &)
Definition: L1TMuonEndCapForestOnlineProd.cc:22
L1TMuonEndCapForestOnlineProd::~L1TMuonEndCapForestOnlineProd
~L1TMuonEndCapForestOnlineProd(void) override
Definition: L1TMuonEndCapForestOnlineProd.cc:19
L1TMuonEndCapForestOnlineProd::transactionSafe
bool transactionSafe
Definition: L1TMuonEndCapForestOnlineProd.cc:12
L1ConfigOnlineProdBaseExt.h
L1TMuonEndCapForestRcd.h
L1TMuonEndCapForestOnlineProd
Definition: L1TMuonEndCapForestOnlineProd.cc:10
L1ConfigOnlineProdBaseExt
Definition: L1ConfigOnlineProdBaseExt.h:32
L1TMuonEndCapForest.h
L1TMuonEndCapForestO2ORcd.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
L1TMuonEndCapForest
Definition: L1TMuonEndCapForest.h:15
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1TMuonEndCapForestO2ORcd
Definition: L1TMuonEndCapForestO2ORcd.h:9
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TMuonEndCapForestOnlineProd::newObject
std::unique_ptr< const L1TMuonEndCapForest > newObject(const std::string &objectKey, const L1TMuonEndCapForestO2ORcd &record) override
Definition: L1TMuonEndCapForestOnlineProd.cc:28
L1ConfigOnlineProdBaseExt< L1TMuonEndCapForestO2ORcd, L1TMuonEndCapForest >::wrappedSetWhatProduced
edm::ESConsumesCollectorT< L1TMuonEndCapForestO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
Definition: L1ConfigOnlineProdBaseExt.h:93