CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1ObjectKeysOnlineProdBaseExt.cc
Go to the documentation of this file.
2 
4 
6 
8  // The subsystemLabel is used by L1TriggerKeyOnlineProdExt to identify the
9  // L1TriggerKeysExt to concatenate.
10  : L1TriggerKeyExt_token(setWhatProduced(this, iConfig.getParameter<std::string>("subsystemLabel"))
11  .consumes(edm::ESInputTag{"", "SubsystemKeysOnly"})),
12  m_omdsReader(iConfig.getParameter<std::string>("onlineDB"),
13  iConfig.getParameter<std::string>("onlineAuthentication")) {}
14 
16  // do anything here that needs to be done at desctruction time
17  // (e.g. close files, deallocate resources etc.)
18 }
19 
20 // ------------ method called to produce the data ------------
22  // Get L1TriggerKeyExt with label "SubsystemKeysOnly". Re-throw exception if
23  // not present.
24  L1TriggerKeyExt subsystemKeys;
25  try {
26  subsystemKeys = iRecord.get(L1TriggerKeyExt_token);
27  } catch (l1t::DataAlreadyPresentException& ex) {
28  throw ex;
29  }
30 
31  // Copy L1TriggerKeyExt to new object.
32  auto pL1TriggerKey = std::make_unique<L1TriggerKeyExt>(subsystemKeys);
33 
34  // Get object keys.
35  fillObjectKeys(pL1TriggerKey.get());
36 
37  return pL1TriggerKey;
38 }
39 
40 //define this as a plug-in
41 //DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBaseExt);
ReturnType produce(const L1TriggerKeyExtRcd &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< L1TriggerKeyExt > ReturnType
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
const edm::ESGetToken< L1TriggerKeyExt, L1TriggerKeyExtRcd > L1TriggerKeyExt_token
virtual void fillObjectKeys(L1TriggerKeyExt *pL1TriggerKey)=0