CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #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<L1RPCHsbConfig> ReturnType;
45 
47  private:
48  std::vector<int> m_hsb0;
49  std::vector<int> m_hsb1;
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_hsb0 = iConfig.getParameter< std::vector<int > >("hsb0Mask");
71  m_hsb1 = iConfig.getParameter< std::vector<int > >("hsb1Mask");
72 
73 
74  if ( m_hsb0.size() !=8 || m_hsb1.size() != 8 )
75  throw cms::Exception("BadConfig") << " hsbMask needs to be 8 digits long \n";
76 
77 
78  // contents of the vector wont be checked here - there are also different sources of this cfg
79 
80 }
81 
82 
84 {
85 
86 
87 }
88 
89 
90 //
91 // member functions
92 //
93 
94 // ------------ method called to produce the data ------------
97 {
98 
99  using namespace edm::es;
100  std::auto_ptr<L1RPCHsbConfig> pRPCTriggerHsbConfig = std::auto_ptr<L1RPCHsbConfig>( new L1RPCHsbConfig() );
101 
102  pRPCTriggerHsbConfig->setHsbMask(0, m_hsb0);
103  pRPCTriggerHsbConfig->setHsbMask(1, m_hsb1);
104 
105  return pRPCTriggerHsbConfig ;
106 }
107 
108 //define this as a plug-in
T getParameter(std::string const &) const
ReturnType produce(const L1RPCHsbConfigRcd &)
RPCTriggerHsbConfig(const edm::ParameterSet &)
std::auto_ptr< L1RPCHsbConfig > ReturnType
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