test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21 // system include files
22 
23 // user include files
25 
27 
30 
32 
33 //
34 // class declaration
35 //
36 
37 //
38 // constants, enums and typedefs
39 //
40 
41 //
42 // static data member definitions
43 //
44 
45 //
46 // constructors and destructor
47 //
49  : m_omdsReader(
50  iConfig.getParameter< std::string >( "onlineDB" ),
51  iConfig.getParameter< std::string >( "onlineAuthentication" ) )
52 {
53  //the following line is needed to tell the framework what
54  // data is being produced
55 
56  // The subsystemLabel is used by L1TriggerKeyOnlineProd to identify the
57  // L1TriggerKeys to concatenate.
58  setWhatProduced(this,
59  iConfig.getParameter< std::string >( "subsystemLabel" )
60  );
61 
62  //now do what ever other initialization is needed
63 }
64 
65 
67 {
68 
69  // do anything here that needs to be done at desctruction time
70  // (e.g. close files, deallocate resources etc.)
71 
72 }
73 
74 
75 //
76 // member functions
77 //
78 
79 // ------------ method called to produce the data ------------
82 {
83  using namespace edm::es;
84 
85  // Get L1TriggerKey with label "SubsystemKeysOnly". Re-throw exception if
86  // not present.
87  edm::ESHandle< L1TriggerKey > subsystemKeys ;
88  try
89  {
90  iRecord.get( "SubsystemKeysOnly", subsystemKeys ) ;
91  }
93  {
94  throw ex ;
95  }
96 
97  // Copy L1TriggerKey to new object.
98  boost::shared_ptr<L1TriggerKey> pL1TriggerKey ;
99  pL1TriggerKey = boost::shared_ptr< L1TriggerKey >(
100  new L1TriggerKey( *subsystemKeys ) ) ;
101 
102  // Get object keys.
103  fillObjectKeys( pL1TriggerKey ) ;
104 
105  return pL1TriggerKey ;
106 }
107 
108 //define this as a plug-in
109 //DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBase);
T getParameter(std::string const &) const
ReturnType produce(const L1TriggerKeyRcd &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
boost::shared_ptr< L1TriggerKey > ReturnType
void get(HolderT &iHolder) const
virtual void fillObjectKeys(ReturnType pL1TriggerKey)=0
L1ObjectKeysOnlineProdBase(const edm::ParameterSet &)