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 // system include files
20 #include <memory>
21 
22 // user include files
25 
27 
30 
31 //
32 // class decleration
33 //
34 
36 public:
38  ~RPCTriggerHsbConfig() override;
39 
40  typedef std::unique_ptr<L1RPCHsbConfig> ReturnType;
41 
43 
44 private:
45  std::vector<int> m_hsb0;
46  std::vector<int> m_hsb1;
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_hsb0 = iConfig.getParameter<std::vector<int> >("hsb0Mask");
66  m_hsb1 = iConfig.getParameter<std::vector<int> >("hsb1Mask");
67 
68  if (m_hsb0.size() != 8 || m_hsb1.size() != 8)
69  throw cms::Exception("BadConfig") << " hsbMask needs to be 8 digits long \n";
70 
71  // contents of the vector wont be checked here - there are also different sources of this cfg
72 }
73 
75 
76 //
77 // member functions
78 //
79 
80 // ------------ method called to produce the data ------------
82  auto pRPCTriggerHsbConfig = std::make_unique<L1RPCHsbConfig>();
83 
84  pRPCTriggerHsbConfig->setHsbMask(0, m_hsb0);
85  pRPCTriggerHsbConfig->setHsbMask(1, m_hsb1);
86 
87  return pRPCTriggerHsbConfig;
88 }
89 
90 //define this as a plug-in
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
ReturnType produce(const L1RPCHsbConfigRcd &)
RPCTriggerHsbConfig(const edm::ParameterSet &)
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