test
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  boost::shared_ptr<L1TriggerKeyExt> pL1TriggerKey ;
53  pL1TriggerKey = boost::shared_ptr< L1TriggerKeyExt >(
54  new L1TriggerKeyExt( *subsystemKeys ) ) ;
55 
56  // Get object keys.
57  fillObjectKeys( pL1TriggerKey ) ;
58 
59  return pL1TriggerKey ;
60 }
61 
62 //define this as a plug-in
63 //DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBaseExt);
T getParameter(std::string const &) const
ReturnType produce(const L1TriggerKeyExtRcd &)
virtual void fillObjectKeys(ReturnType pL1TriggerKey)=0
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
boost::shared_ptr< L1TriggerKeyExt > ReturnType