CMS 3D CMS Logo

Public Member Functions | Private Attributes

TrackerGeometricDetESModule Class Reference

#include <TrackerGeometricDetESModule.h>

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

List of all members.

Public Member Functions

std::auto_ptr< GeometricDetproduce (const IdealGeometryRecord &)
 TrackerGeometricDetESModule (const edm::ParameterSet &p)
virtual ~TrackerGeometricDetESModule ()

Private Attributes

bool fromDDD_

Detailed Description

Definition at line 10 of file TrackerGeometricDetESModule.h.


Constructor & Destructor Documentation

TrackerGeometricDetESModule::TrackerGeometricDetESModule ( const edm::ParameterSet p)

Definition at line 24 of file TrackerGeometricDetESModule.cc.

References edm::ESProducer::setWhatProduced().

  : fromDDD_(p.getParameter<bool>("fromDDD")) 
{
  setWhatProduced(this);
}
TrackerGeometricDetESModule::~TrackerGeometricDetESModule ( ) [virtual]

Definition at line 30 of file TrackerGeometricDetESModule.cc.

{}

Member Function Documentation

std::auto_ptr< GeometricDet > TrackerGeometricDetESModule::produce ( const IdealGeometryRecord iRecord)

Definition at line 33 of file TrackerGeometricDetESModule.cc.

References CondDBCmsTrackerConstruction::construct(), DDDCmsTrackerContruction::construct(), fromDDD_, and edm::eventsetup::EventSetupRecord::get().

                                                                       { 
  if(fromDDD_){

    edm::ESTransientHandle<DDCompactView> cpv;
    iRecord.get( cpv );
    
    DDDCmsTrackerContruction theDDDCmsTrackerContruction;
    return std::auto_ptr<GeometricDet> (const_cast<GeometricDet*>(theDDDCmsTrackerContruction.construct(&(*cpv))));

  }else{

    edm::ESHandle<PGeometricDet> pgd;
    iRecord.get( pgd );
    
    CondDBCmsTrackerConstruction cdbtc;
    return std::auto_ptr<GeometricDet> ( const_cast<GeometricDet*>(cdbtc.construct( *pgd )) );
  }
}

Member Data Documentation

Definition at line 19 of file TrackerGeometricDetESModule.h.

Referenced by produce().