CMS 3D CMS Logo

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 
23 // user include files
26 
28 
31 
32 
33 
34 //
35 // class decleration
36 //
37 
39  public:
41  ~RPCTriggerBxOrConfig() override;
42 
43  typedef std::unique_ptr<L1RPCBxOrConfig> ReturnType;
44 
45  ReturnType produce(const L1RPCBxOrConfigRcd&);
46  private:
47  int m_firstBX;
48  int m_lastBX;
49 
50 };
51 
52 //
53 // constants, enums and typedefs
54 //
55 
56 //
57 // static data member definitions
58 //
59 
60 //
61 // constructors and destructor
62 //
64 {
65  //the following line is needed to tell the framework what
66  // data is being produced
67  setWhatProduced(this);
68 
69  m_firstBX = iConfig.getParameter<int>("firstBX");
70  m_lastBX = iConfig.getParameter<int>("lastBX");
71 
72 
73 }
74 
75 
77 {
78 
79 
80 }
81 
82 
83 //
84 // member functions
85 //
86 
87 // ------------ method called to produce the data ------------
90 {
91  using namespace edm::es;
92  auto pRPCTriggerBxOrConfig = std::make_unique<L1RPCBxOrConfig>();
93 
94  if (m_firstBX > m_lastBX )
95  throw cms::Exception("BadConfig") << " firstBX < m_lastBX " << "\n";
96 
97  pRPCTriggerBxOrConfig->setFirstBX(m_firstBX);
98  pRPCTriggerBxOrConfig->setLastBX(m_lastBX);
99 
100  return pRPCTriggerBxOrConfig ;
101 }
102 
103 //define this as a plug-in
T getParameter(std::string const &) const
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
std::unique_ptr< L1RPCBxOrConfig > ReturnType