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.4 2012/10/18 12:47:41 sunanda 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 #define LOCAL_DEBUG
38 
40  public:
43 
44  typedef std::auto_ptr<MuonDDDConstants> ReturnType;
45 
47 
49 
50  private:
53 };
54 
56 {
57  // std::cout <<"constructing MuonNumberingInitialization" << std::endl;
59 }
60 
61 
63 { }
64 
65 
66 // ------------ method called to produce the data ------------
69 {
70 #ifdef LOCAL_DEBUG
71  std::cout << "in MuonNumberingInitialization::produce" << std::endl;
72 #endif
73  using namespace edm::es;
74  if ( muonDDDConst_ == 0 ) {
75  std::cerr << "MuonNumberingInitialization::produceMuonDDDConstants has NOT been initialized!" << std::endl;
76  throw;
77  }
78  return std::auto_ptr<MuonDDDConstants> (muonDDDConst_) ;
79 }
80 
82 
84  igr.get(label_, pDD );
85 #ifdef LOCAL_DEBUG
86  std::cout << "in MuonNumberingInitialization::initializeMuonDDDConstants" << std::endl;
87 #endif
88  if ( muonDDDConst_ != 0 ) {
89  delete muonDDDConst_;
90  }
91 #ifdef LOCAL_DEBUG
92  std::cout << "about to make my new muonDDDConst_" << std::endl;
93 #endif
94  muonDDDConst_ = new MuonDDDConstants( *pDD );
95 }
96 
97 //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:60
ReturnType produce(const MuonNumberingRecord &)
tuple cout
Definition: gather_cfg.py:121