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.7 2012/10/29 07:32:07 mansj 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  edm::LogInfo("HCAL") << "Using default HCAL topology" ;
71  iRecord.get( topology ) ;
72 
73  assert( 0 == m_loader ) ;
75 #ifdef DebugLog
76  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
77 #endif
78  ReturnType pC ( m_loader->load(*topology) ) ;
79 
80  return pC ;
81 }
82 
85  //now do what ever other initialization is needed
86  assert( 0 != m_cpv ) ;
87 
88  edm::LogInfo("HCAL") << "Using default HCAL topology" ;
90  iRecord.get( topology ) ;
91 
92  if( 0 == m_loader ) m_loader = new HcalDDDGeometryLoader(*m_cpv);
93 #ifdef DebugLog
94  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
95 #endif
96 
97  ReturnType pC ( m_loader->load(*topology) ) ;
98 
99  return pC ;
100 }
101 
102 void
105  iRecord.get( pDD );
106  m_cpv = &(*pDD) ;
107 }
108 
109 
#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 produceAligned(const HcalGeometryRecord &)
void get(HolderT &iHolder) const
HcalDDDGeometryLoader * m_loader
ReturnType produceIdeal(const IdealGeometryRecord &)
ReturnType load(const HcalTopology &topo, DetId::Detector, int)
HcalDDDGeometryEP(const edm::ParameterSet &)