CMS 3D CMS Logo

L1ObjectKeysOnlineProdBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1ObjectKeysOnlineProdBase
4 // Class: L1ObjectKeysOnlineProdBase
5 //
13 //
14 // Original Author: Werner Man-Li Sun
15 // Created: Fri Aug 22 19:51:36 CEST 2008
16 // $Id: L1ObjectKeysOnlineProdBase.cc,v 1.1 2008/09/19 19:22:59 wsun Exp $
17 //
18 //
19 
20 // system include files
21 
22 // user include files
24 
26 
29 
31 
32 //
33 // class declaration
34 //
35 
36 //
37 // constants, enums and typedefs
38 //
39 
40 //
41 // static data member definitions
42 //
43 
44 //
45 // constructors and destructor
46 //
48  : m_omdsReader(iConfig.getParameter<std::string>("onlineDB"),
49  iConfig.getParameter<std::string>("onlineAuthentication")) {
50  //the following line is needed to tell the framework what
51  // data is being produced
52 
53  // The subsystemLabel is used by L1TriggerKeyOnlineProd to identify the
54  // L1TriggerKeys to concatenate.
55  setWhatProduced(this, iConfig.getParameter<std::string>("subsystemLabel"));
56 
57  //now do what ever other initialization is needed
58 }
59 
61  // do anything here that needs to be done at desctruction time
62  // (e.g. close files, deallocate resources etc.)
63 }
64 
65 //
66 // member functions
67 //
68 
69 // ------------ method called to produce the data ------------
71  // Get L1TriggerKey with label "SubsystemKeysOnly". Re-throw exception if
72  // not present.
73  edm::ESHandle<L1TriggerKey> subsystemKeys;
74  try {
75  iRecord.get("SubsystemKeysOnly", subsystemKeys);
76  } catch (l1t::DataAlreadyPresentException& ex) {
77  throw ex;
78  }
79 
80  // Copy L1TriggerKey to new object.
81  std::unique_ptr<L1TriggerKey> pL1TriggerKey = std::make_unique<L1TriggerKey>(*subsystemKeys);
82 
83  // Get object keys.
84  fillObjectKeys(pL1TriggerKey.get());
85 
86  return pL1TriggerKey;
87 }
88 
89 //define this as a plug-in
90 //DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBase);
Exception.h
L1ObjectKeysOnlineProdBase::ReturnType
std::unique_ptr< L1TriggerKey > ReturnType
Definition: L1ObjectKeysOnlineProdBase.h:44
L1TriggerKeyRcd
Definition: L1TriggerKeyRcd.h:30
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
l1t::DataAlreadyPresentException
Definition: Exception.h:32
L1ObjectKeysOnlineProdBase::produce
ReturnType produce(const L1TriggerKeyRcd &)
Definition: L1ObjectKeysOnlineProdBase.cc:70
L1ObjectKeysOnlineProdBase::L1ObjectKeysOnlineProdBase
L1ObjectKeysOnlineProdBase(const edm::ParameterSet &)
Definition: L1ObjectKeysOnlineProdBase.cc:47
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
L1ObjectKeysOnlineProdBase::~L1ObjectKeysOnlineProdBase
~L1ObjectKeysOnlineProdBase() override
Definition: L1ObjectKeysOnlineProdBase.cc:60
L1TriggerKeyList.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
std
Definition: JetResolutionObject.h:76
L1ObjectKeysOnlineProdBase::fillObjectKeys
virtual void fillObjectKeys(FillType)=0
EventSetup.h
L1ObjectKeysOnlineProdBase.h
L1TriggerKeyListRcd.h