CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  std::shared_ptr<L1TriggerKeyExt> pL1TriggerKey = std::make_shared< L1TriggerKeyExt >( *subsystemKeys ) ;
53 
54  // Get object keys.
55  fillObjectKeys( pL1TriggerKey ) ;
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
ReturnType produce(const L1TriggerKeyExtRcd &)
virtual void fillObjectKeys(ReturnType pL1TriggerKey)=0
std::shared_ptr< L1TriggerKeyExt > ReturnType
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)