CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TriggerKeyOnlineProdExt.cc
Go to the documentation of this file.
2 
4 
6 
8 
10  : m_subsystemLabels( iConfig.getParameter< std::vector< std::string > >(
11  "subsystemLabels" ) )
12 {
13  //the following line is needed to tell the framework what
14  // data is being produced
15  setWhatProduced(this);
16 
17  //now do what ever other initialization is needed
18 }
19 
20 
22 {
23 
24  // do anything here that needs to be done at desctruction time
25  // (e.g. close files, deallocate resources etc.)
26 
27 }
28 
29 
30 //
31 // member functions
32 //
33 
34 // ------------ method called to produce the data ------------
37 {
38  using namespace edm::es;
39 
40  // Start with "SubsystemKeysOnly"
41  edm::ESHandle< L1TriggerKeyExt > subsystemKeys ;
42  try
43  {
44  iRecord.get( "SubsystemKeysOnly", subsystemKeys ) ;
45  }
47  {
48  throw ex ;
49  }
50 
51  boost::shared_ptr<L1TriggerKeyExt> pL1TriggerKey ;
52  pL1TriggerKey = boost::shared_ptr< L1TriggerKeyExt >(
53  new L1TriggerKeyExt( *subsystemKeys ) ) ;
54 
55  // Collate object keys
56  std::vector< std::string >::const_iterator itr = m_subsystemLabels.begin() ;
57  std::vector< std::string >::const_iterator end = m_subsystemLabels.end() ;
58  for( ; itr != end ; ++itr )
59  {
61  try
62  {
63  iRecord.get( *itr, objectKeys ) ;
64  }
66  {
67  throw ex ;
68  }
69 
70  pL1TriggerKey->add( objectKeys->recordToKeyMap() ) ;
71  }
72 
73  return pL1TriggerKey ;
74 }
75 
76 //define this as a plug-in
77 //DEFINE_FWK_EVENTSETUP_MODULE(L1TriggerKeyOnlineProdExt);
std::vector< std::string > m_subsystemLabels
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
#define end
Definition: vmac.h:37
boost::shared_ptr< L1TriggerKeyExt > ReturnType
ReturnType produce(const L1TriggerKeyExtRcd &)
L1TriggerKeyOnlineProdExt(const edm::ParameterSet &)