CMS 3D CMS Logo

L1ObjectKeysOnlineProdBaseExt.cc
Go to the documentation of this file.
2 
4 
6 
8  : m_omdsReader(iConfig.getParameter<std::string>("onlineDB"),
9  iConfig.getParameter<std::string>("onlineAuthentication")) {
10  //the following line is needed to tell the framework what
11  // data is being produced
12 
13  // The subsystemLabel is used by L1TriggerKeyOnlineProdExt to identify the
14  // L1TriggerKeysExt to concatenate.
15  setWhatProduced(this, iConfig.getParameter<std::string>("subsystemLabel"));
16 
17  //now do what ever other initialization is needed
18 }
19 
21  // do anything here that needs to be done at desctruction time
22  // (e.g. close files, deallocate resources etc.)
23 }
24 
25 // ------------ method called to produce the data ------------
27  // Get L1TriggerKeyExt with label "SubsystemKeysOnly". Re-throw exception if
28  // not present.
29  edm::ESHandle<L1TriggerKeyExt> subsystemKeys;
30  try {
31  iRecord.get("SubsystemKeysOnly", subsystemKeys);
32  } catch (l1t::DataAlreadyPresentException& ex) {
33  throw ex;
34  }
35 
36  // Copy L1TriggerKeyExt to new object.
37  auto pL1TriggerKey = std::make_unique<L1TriggerKeyExt>(*subsystemKeys);
38 
39  // Get object keys.
40  fillObjectKeys(pL1TriggerKey.get());
41 
42  return pL1TriggerKey;
43 }
44 
45 //define this as a plug-in
46 //DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBaseExt);
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ReturnType produce(const L1TriggerKeyExtRcd &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< L1TriggerKeyExt > ReturnType
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
virtual void fillObjectKeys(L1TriggerKeyExt *pL1TriggerKey)=0