CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDDDGeometryEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalDDDGeometryEP
4 // Class: HcalDDDGeometryEP
5 //
13 //
14 // Original Author: Sunanda Banerjee
15 // Created: Thu Oct 20 11:35:27 CDT 2006
16 // $Id: HcalDDDGeometryEP.cc,v 1.6 2010/03/25 22:08:44 case Exp $
17 //
18 //
19 
22 
23 //#define DebugLog
24 //
25 // constants, enums and typedefs
26 //
27 
28 //
29 // static data member definitions
30 //
31 
32 //
33 // constructors and destructor
34 //
35 
37  m_loader ( 0 ) ,
38  m_cpv ( 0 ) ,
39  m_applyAlignment( ps.getUntrackedParameter<bool>("applyAlignment", false) ){
40 
41  //the following line is needed to tell the framework what
42  // data is being produced
43  setWhatProduced( this,
46  "HCAL");
47 
48 // diable
49 // setWhatProduced( this,
50 // &HcalDDDGeometryEP::produceIdeal,
51 // edm::es::Label( "HCAL" ) );
52 }
53 
54 
56  delete m_loader ;
57 }
58 
59 
60 //
61 // member functions
62 //
63 
64 // ------------ method called to produce the data ------------
67  idealRecordCallBack( iRecord ) ;
68 
69  assert( 0 == m_loader ) ;
71 #ifdef DebugLog
72  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
73 #endif
74  ReturnType pC ( m_loader->load() ) ;
75 
76  return pC ;
77 }
78 
81  //now do what ever other initialization is needed
82  assert( 0 != m_cpv ) ;
83  if( 0 == m_loader ) m_loader = new HcalDDDGeometryLoader(*m_cpv);
84 #ifdef DebugLog
85  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
86 #endif
87 
88  ReturnType pC ( m_loader->load() ) ;
89 
90  return pC ;
91 }
92 
93 void
96  iRecord.get( pDD );
97  m_cpv = &(*pDD) ;
98 }
99 
100 
#define LogDebug(id)
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
const DDCompactView * m_cpv
void idealRecordCallBack(const IdealGeometryRecord &)
boost::shared_ptr< CaloSubdetectorGeometry > ReturnType
ReturnType load(DetId::Detector, int)
ReturnType produceAligned(const HcalGeometryRecord &)
void get(HolderT &iHolder) const
HcalDDDGeometryLoader * m_loader
ReturnType produceIdeal(const IdealGeometryRecord &)
HcalDDDGeometryEP(const edm::ParameterSet &)