CMS 3D CMS Logo

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