CMS 3D CMS Logo

Public Member Functions

GlobalTrackingGeometryESProducer Class Reference

#include <GlobalTrackingGeometryESProducer.h>

Inheritance diagram for GlobalTrackingGeometryESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 GlobalTrackingGeometryESProducer (const edm::ParameterSet &p)
 Constructor.
boost::shared_ptr
< GlobalTrackingGeometry
produce (const GlobalTrackingGeometryRecord &record)
 Produce GlobalTrackingGeometry.
virtual ~GlobalTrackingGeometryESProducer ()
 Destructor.

Detailed Description

Definition at line 22 of file GlobalTrackingGeometryESProducer.h.


Constructor & Destructor Documentation

GlobalTrackingGeometryESProducer::GlobalTrackingGeometryESProducer ( const edm::ParameterSet p)

Constructor.

Definition at line 24 of file GlobalTrackingGeometryESProducer.cc.

                                                                                           {
  setWhatProduced(this);
}
GlobalTrackingGeometryESProducer::~GlobalTrackingGeometryESProducer ( ) [virtual]

Destructor.

Definition at line 28 of file GlobalTrackingGeometryESProducer.cc.

{}

Member Function Documentation

boost::shared_ptr< GlobalTrackingGeometry > GlobalTrackingGeometryESProducer::produce ( const GlobalTrackingGeometryRecord record)

Produce GlobalTrackingGeometry.

Definition at line 31 of file GlobalTrackingGeometryESProducer.cc.

References GlobalTrackingGeometryBuilder::build(), dt, and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord().

                                                                                    {

  edm::ESHandle<TrackerGeometry> tk;
  edm::ESHandle<DTGeometry> dt;
  edm::ESHandle<CSCGeometry> csc;
  edm::ESHandle<RPCGeometry> rpc;
      
  try {
    record.getRecord<TrackerDigiGeometryRecord>().get(tk);
  } catch (edm::eventsetup::NoProxyException<TrackerGeometry>& e) {
    // No Tk geo available
    LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No Tracker geometry is available.";
  } catch (edm::eventsetup::NoRecordException<TrackerDigiGeometryRecord>& e){
    LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No TrackerDigiGeometryRecord is available.";    
  }


  try {
    try {  
      record.getRecord<MuonGeometryRecord>().get(dt);
    } catch (edm::eventsetup::NoProxyException<DTGeometry>& e) {
      // No DT geo available
      LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No DT geometry is available.";
    } 

    try {
      record.getRecord<MuonGeometryRecord>().get(csc);
    } catch (edm::eventsetup::NoProxyException<CSCGeometry>& e) {
      // No CSC geo available
      LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No CSC geometry is available.";
    }    
    
    try {
      record.getRecord<MuonGeometryRecord>().get(rpc);      
    } catch (edm::eventsetup::NoProxyException<RPCGeometry>& e) {
      // No RPC geo available
      LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No RPC geometry is available.";
    }
  } catch (edm::eventsetup::NoRecordException<MuonGeometryRecord>& e){
    LogWarning("GeometryGlobalTrackingGeometryBuilder") << "No MuonGeometryRecord is available.";    
  }
  

  GlobalTrackingGeometryBuilder builder;
  return boost::shared_ptr<GlobalTrackingGeometry>(builder.build(&(*tk), &(*dt), &(*csc), &(*rpc)));
}