CMS 3D CMS Logo

EcalTBHodoscopeGeometryEP.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    EcalTBHodoscopeGeometryEP
00004 // Class:      EcalTBHodoscopeGeometryEP
00005 // 
00013 //
00014 
00015 // $Id: EcalTBHodoscopeGeometryEP.cc,v 1.2 2008/01/22 21:31:59 muzaffar Exp $
00016 //
00017 //
00018 
00019 #include "Geometry/EcalTestBeam/plugins/EcalTBHodoscopeGeometryEP.h"
00020 #include "Geometry/EcalTestBeam/plugins/EcalTBHodoscopeGeometryLoaderFromDDD.h"
00021 
00022 #include <iostream>
00023 //
00024 // constants, enums and typedefs
00025 //
00026 
00027 //
00028 // static data member definitions
00029 //
00030 
00031 //
00032 // constructors and destructor
00033 //
00034 EcalTBHodoscopeGeometryEP::EcalTBHodoscopeGeometryEP(const edm::ParameterSet& iConfig)
00035 {
00036    //the following line is needed to tell the framework what
00037    // data is being produced
00038   setWhatProduced(this,"EcalLaserPnDiode");
00039   //now do what ever other initialization is needed
00040   loader_=new EcalTBHodoscopeGeometryLoaderFromDDD(); 
00041 }
00042 
00043 
00044 EcalTBHodoscopeGeometryEP::~EcalTBHodoscopeGeometryEP()
00045 { 
00046   delete loader_;
00047 }
00048 
00049 
00050 //
00051 // member functions
00052 //
00053 
00054 // ------------ method called to produce the data  ------------
00055 EcalTBHodoscopeGeometryEP::ReturnType
00056 EcalTBHodoscopeGeometryEP::produce(const IdealGeometryRecord& iRecord)
00057 {
00058    using namespace edm::es;
00059 
00060    edm::ESHandle<DDCompactView> cpv;
00061    iRecord.get( cpv );
00062    
00063    std::cout << "[EcalTBHodoscopeGeometryEP]::Constructing EcalTBHodoscopeGeometry" <<  std::endl;
00064    std::auto_ptr<CaloSubdetectorGeometry> pCaloSubdetectorGeometry(loader_->load(&(*cpv))) ;
00065    return pCaloSubdetectorGeometry ;
00066 }
00067 
00068 

Generated on Tue Jun 9 17:37:27 2009 for CMSSW by  doxygen 1.5.4