CMS 3D CMS Logo

RPCTriggerHsbConfig.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RPCTriggerHsbConfig
4 // Class: RPCTriggerHsbConfig
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  ~RPCTriggerHsbConfig() override;
42 
43  typedef std::unique_ptr<L1RPCHsbConfig> ReturnType;
44 
45  ReturnType produce(const L1RPCHsbConfigRcd&);
46  private:
47  std::vector<int> m_hsb0;
48  std::vector<int> m_hsb1;
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_hsb0 = iConfig.getParameter< std::vector<int > >("hsb0Mask");
70  m_hsb1 = iConfig.getParameter< std::vector<int > >("hsb1Mask");
71 
72 
73  if ( m_hsb0.size() !=8 || m_hsb1.size() != 8 )
74  throw cms::Exception("BadConfig") << " hsbMask needs to be 8 digits long \n";
75 
76 
77  // contents of the vector wont be checked here - there are also different sources of this cfg
78 
79 }
80 
81 
83 {
84 
85 
86 }
87 
88 
89 //
90 // member functions
91 //
92 
93 // ------------ method called to produce the data ------------
96 {
97 
98  using namespace edm::es;
99  auto pRPCTriggerHsbConfig = std::make_unique<L1RPCHsbConfig>();
100 
101  pRPCTriggerHsbConfig->setHsbMask(0, m_hsb0);
102  pRPCTriggerHsbConfig->setHsbMask(1, m_hsb1);
103 
104  return pRPCTriggerHsbConfig ;
105 }
106 
107 //define this as a plug-in
T getParameter(std::string const &) const
ReturnType produce(const L1RPCHsbConfigRcd &)
RPCTriggerHsbConfig(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< int > m_hsb1
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::vector< int > m_hsb0
std::unique_ptr< L1RPCHsbConfig > ReturnType