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 // system include files
20 #include <memory>
21 
22 // user include files
25 
27 
30 
31 //
32 // class decleration
33 //
34 
36 public:
38  ~RPCTriggerBxOrConfig() override;
39 
40  typedef std::unique_ptr<L1RPCBxOrConfig> ReturnType;
41 
43 
44 private:
45  int m_firstBX;
46  int m_lastBX;
47 };
48 
49 //
50 // constants, enums and typedefs
51 //
52 
53 //
54 // static data member definitions
55 //
56 
57 //
58 // constructors and destructor
59 //
61  //the following line is needed to tell the framework what
62  // data is being produced
63  setWhatProduced(this);
64 
65  m_firstBX = iConfig.getParameter<int>("firstBX");
66  m_lastBX = iConfig.getParameter<int>("lastBX");
67 }
68 
70 
71 //
72 // member functions
73 //
74 
75 // ------------ method called to produce the data ------------
77  auto pRPCTriggerBxOrConfig = std::make_unique<L1RPCBxOrConfig>();
78 
79  if (m_firstBX > m_lastBX)
80  throw cms::Exception("BadConfig") << " firstBX < m_lastBX "
81  << "\n";
82 
83  pRPCTriggerBxOrConfig->setFirstBX(m_firstBX);
84  pRPCTriggerBxOrConfig->setLastBX(m_lastBX);
85 
86  return pRPCTriggerBxOrConfig;
87 }
88 
89 //define this as a plug-in
L1RPCBxOrConfig.h
ESHandle.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ESProducer.h
RPCTriggerBxOrConfig::RPCTriggerBxOrConfig
RPCTriggerBxOrConfig(const edm::ParameterSet &)
Definition: RPCTriggerBxOrConfig.cc:60
RPCTriggerBxOrConfig
Definition: RPCTriggerBxOrConfig.cc:35
L1RPCBxOrConfigRcd.h
RPCTriggerBxOrConfig::~RPCTriggerBxOrConfig
~RPCTriggerBxOrConfig() override
Definition: RPCTriggerBxOrConfig.cc:69
edm::ParameterSet
Definition: ParameterSet.h:36
L1RPCBxOrConfigRcd
Definition: L1RPCBxOrConfigRcd.h:23
RPCTriggerBxOrConfig::m_lastBX
int m_lastBX
Definition: RPCTriggerBxOrConfig.cc:46
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
RPCTriggerBxOrConfig::produce
ReturnType produce(const L1RPCBxOrConfigRcd &)
Definition: RPCTriggerBxOrConfig.cc:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
Exception
Definition: hltDiff.cc:246
edm::ESProducer
Definition: ESProducer.h:101
RPCTriggerBxOrConfig::ReturnType
std::unique_ptr< L1RPCBxOrConfig > ReturnType
Definition: RPCTriggerBxOrConfig.cc:40
RPCTriggerBxOrConfig::m_firstBX
int m_firstBX
Definition: RPCTriggerBxOrConfig.cc:45