#include <Geometry/GlobalTrackingGeometryBuilder/src/GlobalTrackingGeometryESProducer.h>
Public Member Functions | |
GlobalTrackingGeometryESProducer (const edm::ParameterSet &p) | |
Constructor. | |
boost::shared_ptr < GlobalTrackingGeometry > | produce (const GlobalTrackingGeometryRecord &record) |
Produce GlobalTrackingGeometry. | |
virtual | ~GlobalTrackingGeometryESProducer () |
Destructor. |
Definition at line 22 of file GlobalTrackingGeometryESProducer.h.
GlobalTrackingGeometryESProducer::GlobalTrackingGeometryESProducer | ( | const edm::ParameterSet & | p | ) |
Constructor.
Definition at line 24 of file GlobalTrackingGeometryESProducer.cc.
References edm::ESProducer::setWhatProduced().
00024 { 00025 setWhatProduced(this); 00026 }
GlobalTrackingGeometryESProducer::~GlobalTrackingGeometryESProducer | ( | ) | [virtual] |
boost::shared_ptr< GlobalTrackingGeometry > GlobalTrackingGeometryESProducer::produce | ( | const GlobalTrackingGeometryRecord & | record | ) |
Produce GlobalTrackingGeometry.
Definition at line 31 of file GlobalTrackingGeometryESProducer.cc.
References GlobalTrackingGeometryBuilder::build(), e, and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord().
00031 { 00032 00033 edm::ESHandle<TrackerGeometry> tk; 00034 edm::ESHandle<DTGeometry> dt; 00035 edm::ESHandle<CSCGeometry> csc; 00036 edm::ESHandle<RPCGeometry> rpc; 00037 00038 try { 00039 record.getRecord<TrackerDigiGeometryRecord>().get(tk); 00040 } catch (edm::eventsetup::NoProxyException<TrackerGeometry>& e) { 00041 // No Tk geo available 00042 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No Tracker geometry is available."; 00043 } catch (edm::eventsetup::NoRecordException<TrackerDigiGeometryRecord>& e){ 00044 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No TrackerDigiGeometryRecord is available."; 00045 } 00046 00047 00048 try { 00049 try { 00050 record.getRecord<MuonGeometryRecord>().get(dt); 00051 } catch (edm::eventsetup::NoProxyException<DTGeometry>& e) { 00052 // No DT geo available 00053 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No DT geometry is available."; 00054 } 00055 00056 try { 00057 record.getRecord<MuonGeometryRecord>().get(csc); 00058 } catch (edm::eventsetup::NoProxyException<CSCGeometry>& e) { 00059 // No CSC geo available 00060 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No CSC geometry is available."; 00061 } 00062 00063 try { 00064 record.getRecord<MuonGeometryRecord>().get(rpc); 00065 } catch (edm::eventsetup::NoProxyException<RPCGeometry>& e) { 00066 // No RPC geo available 00067 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No RPC geometry is available."; 00068 } 00069 } catch (edm::eventsetup::NoRecordException<MuonGeometryRecord>& e){ 00070 LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No MuonGeometryRecord is available."; 00071 } 00072 00073 00074 GlobalTrackingGeometryBuilder builder; 00075 return boost::shared_ptr<GlobalTrackingGeometry>(builder.build(&(*tk), &(*dt), &(*csc), &(*rpc))); 00076 }