CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/CondTools/Geometry/plugins/PCaloGeometryBuilder.cc

Go to the documentation of this file.
00001 #include "CondTools/Geometry/plugins/PCaloGeometryBuilder.h"
00002 
00003 #include "FWCore/Framework/interface/ESHandle.h"
00004 
00005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00006 
00007 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00008 #include "Geometry/Records/interface/CaloGeometryRecord.h"
00009 #include "Geometry/EcalAlgo/interface/EcalBarrelGeometry.h"
00010 #include "Geometry/EcalAlgo/interface/EcalEndcapGeometry.h"
00011 #include "Geometry/EcalAlgo/interface/EcalPreshowerGeometry.h"
00012 #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
00013 #include "Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h"
00014 #include "Geometry/ForwardGeometry/interface/ZdcGeometry.h"
00015 #include "Geometry/ForwardGeometry/interface/CastorGeometry.h"
00016 
00017 PCaloGeometryBuilder::PCaloGeometryBuilder( const edm::ParameterSet& iConfig )
00018 {
00019 }
00020 
00021 
00022 PCaloGeometryBuilder::~PCaloGeometryBuilder()
00023 {
00024 }
00025 
00026 void
00027 PCaloGeometryBuilder::beginRun( const edm::Run&, edm::EventSetup const& es )
00028 {
00029    const std::string toDB ( "_toDB" ) ;
00030 
00031    std::cout<<"Writing out "<<EcalBarrelGeometry::producerTag()<<std::endl ;
00032    edm::ESHandle<CaloSubdetectorGeometry>       pGeb   ;
00033    es.get<EcalBarrelGeometry::AlignedRecord>().get(
00034       EcalBarrelGeometry::producerTag() + toDB, pGeb ) ;
00035 
00036    std::cout<<"Writing out "<<EcalEndcapGeometry::producerTag()<<std::endl ;
00037    edm::ESHandle<CaloSubdetectorGeometry>       pGee   ;
00038    es.get<EcalEndcapGeometry::AlignedRecord>().get(
00039       EcalEndcapGeometry::producerTag() + toDB, pGee ) ;
00040 
00041    std::cout<<"Writing out "<<EcalPreshowerGeometry::producerTag()<<std::endl ;
00042    edm::ESHandle<CaloSubdetectorGeometry>          pGes   ;
00043    es.get<EcalPreshowerGeometry::AlignedRecord>().get(
00044       EcalPreshowerGeometry::producerTag() + toDB, pGes ) ; 
00045 
00046    std::cout<<"Writing out "<<HcalGeometry::producerTag()<<std::endl ;
00047    edm::ESHandle<CaloSubdetectorGeometry> pGhcal   ;
00048    es.get<HcalGeometry::AlignedRecord>().get(
00049       HcalGeometry::producerTag() + toDB, pGhcal ) ;
00050 
00051    std::cout<<"Writing out "<<CaloTowerGeometry::producerTag()<<std::endl ;
00052    edm::ESHandle<CaloSubdetectorGeometry> pGct   ;
00053    es.get<CaloTowerGeometry::AlignedRecord>().get(
00054       CaloTowerGeometry::producerTag() + toDB, pGct ) ;
00055 
00056    std::cout<<"Writing out "<<ZdcGeometry::producerTag()<<std::endl ;
00057    edm::ESHandle<CaloSubdetectorGeometry> pGzdc   ;
00058    es.get<ZdcGeometry::AlignedRecord>().get(
00059       ZdcGeometry::producerTag() + toDB,  pGzdc ) ;
00060 
00061    std::cout<<"Writing out "<<CastorGeometry::producerTag()<<std::endl ;
00062    edm::ESHandle<CaloSubdetectorGeometry>   pGcast   ;
00063    es.get<CastorGeometry::AlignedRecord>().get(
00064       CastorGeometry::producerTag() + toDB, pGcast ) ;
00065 }