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 // $Id: RPCTriggerHsbConfig.cc,v 1.3 2010/03/02 14:02:57 fruboes Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
28 
30 
33 
34 
35 
36 //
37 // class decleration
38 //
39 
41  public:
44 
45  typedef std::auto_ptr<L1RPCHsbConfig> ReturnType;
46 
48  private:
49  std::vector<int> m_hsb0;
50  std::vector<int> m_hsb1;
51 
52 };
53 
54 //
55 // constants, enums and typedefs
56 //
57 
58 //
59 // static data member definitions
60 //
61 
62 //
63 // constructors and destructor
64 //
66 {
67  //the following line is needed to tell the framework what
68  // data is being produced
69  setWhatProduced(this);
70 
71  m_hsb0 = iConfig.getParameter< std::vector<int > >("hsb0Mask");
72  m_hsb1 = iConfig.getParameter< std::vector<int > >("hsb1Mask");
73 
74 
75  if ( m_hsb0.size() !=8 || m_hsb1.size() != 8 )
76  throw cms::Exception("BadConfig") << " hsbMask needs to be 8 digits long \n";
77 
78 
79  // contents of the vector wont be checked here - there are also different sources of this cfg
80 
81 }
82 
83 
85 {
86 
87 
88 }
89 
90 
91 //
92 // member functions
93 //
94 
95 // ------------ method called to produce the data ------------
98 {
99 
100  using namespace edm::es;
101  std::auto_ptr<L1RPCHsbConfig> pRPCTriggerHsbConfig = std::auto_ptr<L1RPCHsbConfig>( new L1RPCHsbConfig() );
102 
103  pRPCTriggerHsbConfig->setHsbMask(0, m_hsb0);
104  pRPCTriggerHsbConfig->setHsbMask(1, m_hsb1);
105 
106  return pRPCTriggerHsbConfig ;
107 }
108 
109 //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:56
std::vector< int > m_hsb0