CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCTriggerBxOrConfig.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RPCTriggerBxOrConfig
4 // Class: RPCTriggerBxOrConfig
5 //
13 //
14 // Original Author: Tomasz Maciej Frueboes
15 // Created: Wed Apr 9 13:57:29 CEST 2008
16 // $Id: RPCTriggerBxOrConfig.cc,v 1.1 2010/02/26 15:50:55 fruboes Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
28 
30 
33 
34 
35 
36 //
37 // class decleration
38 //
39 
41  public:
44 
45  typedef std::auto_ptr<L1RPCBxOrConfig> ReturnType;
46 
48  private:
49  int m_firstBX;
50  int m_lastBX;
51 
52 };
53 
54 //
55 // constants, enums and typedefs
56 //
57 
58 //
59 // static data member definitions
60 //
61 
62 //
63 // constructors and destructor
64 //
66 {
67  //the following line is needed to tell the framework what
68  // data is being produced
69  setWhatProduced(this);
70 
71  m_firstBX = iConfig.getParameter<int>("firstBX");
72  m_lastBX = iConfig.getParameter<int>("lastBX");
73 
74 
75 }
76 
77 
79 {
80 
81 
82 }
83 
84 
85 //
86 // member functions
87 //
88 
89 // ------------ method called to produce the data ------------
92 {
93  using namespace edm::es;
94  std::auto_ptr<L1RPCBxOrConfig> pRPCTriggerBxOrConfig = std::auto_ptr<L1RPCBxOrConfig>( new L1RPCBxOrConfig() );
95 
96  if (m_firstBX > m_lastBX )
97  throw cms::Exception("BadConfig") << " firstBX < m_lastBX " << "\n";
98 
99  pRPCTriggerBxOrConfig->setFirstBX(m_firstBX);
100  pRPCTriggerBxOrConfig->setLastBX(m_lastBX);
101 
102  return pRPCTriggerBxOrConfig ;
103 }
104 
105 //define this as a plug-in
T getParameter(std::string const &) const
std::auto_ptr< L1RPCBxOrConfig > ReturnType
RPCTriggerBxOrConfig(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnType produce(const L1RPCBxOrConfigRcd &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56