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  // Get L1TriggerKeyExt with label "SubsystemKeysOnly". Re-throw exception if
38  // not present.
39  edm::ESHandle< L1TriggerKeyExt > subsystemKeys ;
40  try
41  {
42  iRecord.get( "SubsystemKeysOnly", subsystemKeys ) ;
43  }
45  {
46  throw ex ;
47  }
48 
49  // Copy L1TriggerKeyExt to new object.
50  auto pL1TriggerKey = std::make_unique< L1TriggerKeyExt >( *subsystemKeys ) ;
51 
52  // Get object keys.
53  fillObjectKeys( pL1TriggerKey.get() ) ;
54 
55  return pL1TriggerKey ;
56 }
57 
58 //define this as a plug-in
59 //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