CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonNumberingInitialization.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: MuonNumberingInitialization
4 // Class: MuonNumberingInitialization
5 //
13 //
14 // Original Author: Michael Case
15 // Created: Thu Sep 28 16:40:29 PDT 2006
16 // $Id: MuonNumberingInitialization.cc,v 1.3 2010/03/25 22:08:44 case Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <boost/shared_ptr.hpp>
24 
25 // user include files
29 //#include <FWCore/MessageLogger/interface/MessageLogger.h>
30 
36 
37 
39  public:
42 
43  typedef std::auto_ptr<MuonDDDConstants> ReturnType;
44 
46 
48 
49  private:
50  std::string label_;
52 };
53 
55 {
56  // std::cout <<"constructing MuonNumberingInitialization" << std::endl;
58 }
59 
60 
62 { }
63 
64 
65 // ------------ method called to produce the data ------------
68 {
69  // std::cout << "in MuonNumberingInitialization::produce" << std::endl;
70  using namespace edm::es;
71  if ( muonDDDConst_ == 0 ) {
72  std::cerr << "MuonNumberingInitialization::produceMuonDDDConstants has NOT been initialized!" << std::endl;
73  throw;
74  }
75  return std::auto_ptr<MuonDDDConstants> (muonDDDConst_) ;
76 }
77 
79 
81  igr.get(label_, pDD );
82  // std::cout << "in MuonNumberingInitialization::initializeMuonDDDConstants" << std::endl;
83  if ( muonDDDConst_ != 0 ) {
84  delete muonDDDConst_;
85  }
86  // std::cout << "about to make my new muonDDDConst_" << std::endl;
87  muonDDDConst_ = new MuonDDDConstants( *pDD );
88 }
89 
90 //define this as a plug-in
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
MuonNumberingInitialization(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< MuonDDDConstants > ReturnType
void get(HolderT &iHolder) const
void initializeMuonDDDConstants(const IdealGeometryRecord &igr)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56
ReturnType produce(const MuonNumberingRecord &)