CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Geometry/EcalTestBeam/plugins/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.4 2010/03/26 19:51:48 sunanda 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 
00059    edm::ESTransientHandle<DDCompactView> cpv;
00060    iRecord.get( cpv );
00061    
00062    std::cout << "[EcalTBHodoscopeGeometryEP]::Constructing EcalTBHodoscopeGeometry" <<  std::endl;
00063    std::auto_ptr<CaloSubdetectorGeometry> pCaloSubdetectorGeometry(loader_->load(&(*cpv))) ;
00064    return pCaloSubdetectorGeometry ;
00065 }
00066 
00067