#include <Geometry/TrackerNumberingBuilder/plugins/TrackerGeometricDetESModule.h>
Public Member Functions | |
std::auto_ptr< GeometricDet > | produceFromDDDXML (const IdealGeometryRecord &) |
std::auto_ptr< GeometricDet > | produceFromPGeometricDet (const PGeometricDetRcd &) |
TrackerGeometricDetESModule (const edm::ParameterSet &p) | |
virtual | ~TrackerGeometricDetESModule () |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
bool | fromDDD_ |
Definition at line 11 of file TrackerGeometricDetESModule.h.
TrackerGeometricDetESModule::TrackerGeometricDetESModule | ( | const edm::ParameterSet & | p | ) |
Definition at line 18 of file TrackerGeometricDetESModule.cc.
References fromDDD_, produceFromDDDXML(), produceFromPGeometricDet(), and edm::ESProducer::setWhatProduced().
00019 : fromDDD_(p.getParameter<bool>("fromDDD")) 00020 { 00021 if ( fromDDD_ ) { 00022 setWhatProduced(this, &TrackerGeometricDetESModule::produceFromDDDXML); 00023 findingRecord<IdealGeometryRecord>(); 00024 } else { 00025 setWhatProduced(this, &TrackerGeometricDetESModule::produceFromPGeometricDet); 00026 findingRecord<PGeometricDetRcd>(); 00027 } 00028 }
TrackerGeometricDetESModule::~TrackerGeometricDetESModule | ( | ) | [virtual] |
std::auto_ptr< GeometricDet > TrackerGeometricDetESModule::produceFromDDDXML | ( | const IdealGeometryRecord & | iRecord | ) |
Definition at line 33 of file TrackerGeometricDetESModule.cc.
References DDDCmsTrackerContruction::construct(), and edm::eventsetup::EventSetupRecordImplementation< T >::get().
Referenced by TrackerGeometricDetESModule().
00033 { 00034 // 00035 // get the DDCompactView first 00036 // 00037 edm::ESHandle<DDCompactView> cpv; 00038 iRecord.get( cpv ); 00039 00040 DDDCmsTrackerContruction theDDDCmsTrackerContruction; 00041 return std::auto_ptr<GeometricDet> (const_cast<GeometricDet*>(theDDDCmsTrackerContruction.construct(&(*cpv)))); 00042 }
std::auto_ptr< GeometricDet > TrackerGeometricDetESModule::produceFromPGeometricDet | ( | const PGeometricDetRcd & | iRecord | ) |
Definition at line 45 of file TrackerGeometricDetESModule.cc.
References CondDBCmsTrackerConstruction::construct(), and edm::eventsetup::EventSetupRecordImplementation< T >::get().
Referenced by TrackerGeometricDetESModule().
00045 { 00046 edm::ESHandle<PGeometricDet> pgd; 00047 iRecord.get( pgd ); 00048 00049 CondDBCmsTrackerConstruction cdbtc; 00050 // std::auto_ptr<GeometricDet> tt ( 00051 return std::auto_ptr<GeometricDet> ( const_cast<GeometricDet*>(cdbtc.construct( *pgd ))); 00052 00053 // DDDCmsTrackerConstruction theDDDCmsTrackerContruction; 00054 // return std::auto_ptr<GeometricDet> (const_cast<GeometricDet*>(theDDDCmsTrackerContruction.construct(&(*cpv)))); 00055 }
void TrackerGeometricDetESModule::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , | |
const edm::IOVSyncValue & | iosv, | |||
edm::ValidityInterval & | oValidity | |||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 58 of file TrackerGeometricDetESModule.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
00061 { 00062 // TO CHECK: can we get the iov from the PoolDBESSource? if not, why not? 00063 edm::ValidityInterval infinity(iosv.beginOfTime(), iosv.endOfTime()); 00064 oValidity = infinity; 00065 }
bool TrackerGeometricDetESModule::fromDDD_ [private] |
Definition at line 26 of file TrackerGeometricDetESModule.h.
Referenced by TrackerGeometricDetESModule().