test
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 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 #include "boost/shared_ptr.hpp"
23 
24 // user include files
27 
29 
32 
33 
34 
35 //
36 // class decleration
37 //
38 
40  public:
43 
44  typedef std::auto_ptr<L1RPCBxOrConfig> ReturnType;
45 
47  private:
48  int m_firstBX;
49  int m_lastBX;
50 
51 };
52 
53 //
54 // constants, enums and typedefs
55 //
56 
57 //
58 // static data member definitions
59 //
60 
61 //
62 // constructors and destructor
63 //
65 {
66  //the following line is needed to tell the framework what
67  // data is being produced
68  setWhatProduced(this);
69 
70  m_firstBX = iConfig.getParameter<int>("firstBX");
71  m_lastBX = iConfig.getParameter<int>("lastBX");
72 
73 
74 }
75 
76 
78 {
79 
80 
81 }
82 
83 
84 //
85 // member functions
86 //
87 
88 // ------------ method called to produce the data ------------
91 {
92  using namespace edm::es;
93  std::auto_ptr<L1RPCBxOrConfig> pRPCTriggerBxOrConfig = std::auto_ptr<L1RPCBxOrConfig>( new L1RPCBxOrConfig() );
94 
95  if (m_firstBX > m_lastBX )
96  throw cms::Exception("BadConfig") << " firstBX < m_lastBX " << "\n";
97 
98  pRPCTriggerBxOrConfig->setFirstBX(m_firstBX);
99  pRPCTriggerBxOrConfig->setLastBX(m_lastBX);
100 
101  return pRPCTriggerBxOrConfig ;
102 }
103 
104 //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:60