#include <TrackerGeometricDetESModule.h>
Public Member Functions | |
std::auto_ptr< GeometricDet > | produce (const IdealGeometryRecord &) |
TrackerGeometricDetESModule (const edm::ParameterSet &p) | |
virtual | ~TrackerGeometricDetESModule () |
Private Attributes | |
bool | fromDDD_ |
Definition at line 10 of file TrackerGeometricDetESModule.h.
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.
{}
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 )) ); } }
bool TrackerGeometricDetESModule::fromDDD_ [private] |
Definition at line 19 of file TrackerGeometricDetESModule.h.
Referenced by produce().