test
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 //
17 //
18 
21 
22 //#define DebugLog
23 //
24 // constants, enums and typedefs
25 //
26 
27 //
28 // static data member definitions
29 //
30 
31 //
32 // constructors and destructor
33 //
34 
36  m_loader ( 0 ) ,
37  m_cpv ( 0 ) ,
38  m_applyAlignment( ps.getUntrackedParameter<bool>("applyAlignment", false) ){
39 
40  //the following line is needed to tell the framework what
41  // data is being produced
42  setWhatProduced( this,
45  "HCAL");
46 
47 // diable
48 // setWhatProduced( this,
49 // &HcalDDDGeometryEP::produceIdeal,
50 // edm::es::Label( "HCAL" ) );
51 }
52 
53 
55  delete m_loader ;
56 }
57 
58 
59 //
60 // member functions
61 //
62 
63 // ------------ method called to produce the data ------------
66  idealRecordCallBack( iRecord ) ;
67 
68  edm::LogInfo("HCAL") << "Using default HCAL topology" ;
70  iRecord.get( topology ) ;
71 
72  assert( 0 == m_loader ) ;
74 #ifdef DebugLog
75  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
76 #endif
77  ReturnType pC ( m_loader->load(*topology) ) ;
78 
79  return pC ;
80 }
81 
84  //now do what ever other initialization is needed
85  assert( 0 != m_cpv ) ;
86 
87  edm::LogInfo("HCAL") << "Using default HCAL topology" ;
89  iRecord.get( topology ) ;
90 
91  if( 0 == m_loader ) m_loader = new HcalDDDGeometryLoader(*m_cpv);
92 #ifdef DebugLog
93  LogDebug("HCalGeom")<<"HcalDDDGeometryEP:Initialize HcalDDDGeometryLoader";
94 #endif
95 
96  ReturnType pC ( m_loader->load(*topology) ) ;
97 
98  return pC ;
99 }
100 
101 void
104  iRecord.get( pDD );
105  m_cpv = &(*pDD) ;
106 }
107 
108 
#define LogDebug(id)
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
CaloTopology const * topology(0)
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 &)
volatile std::atomic< bool > shutdown_flag false