00001 #include "CalibTracker/SiStripESProducers/plugins/geom/SiStripConnectivity.h" 00002 //#include "FWCore/Framework/interface/EventSetup.h" 00003 #include "FWCore/Framework/interface/ESHandle.h" 00004 #include <memory> 00005 00006 SiStripConnectivity::SiStripConnectivity(const edm::ParameterSet& p) { 00007 //the following lines are needed to tell the framework what data is being produced 00008 setWhatProduced(this, &SiStripConnectivity::produceFecCabling); 00009 setWhatProduced(this, &SiStripConnectivity::produceDetCabling); 00010 } 00011 00012 SiStripConnectivity::~SiStripConnectivity() { 00013 // do anything here that needs to be done at desctruction time 00014 // (e.g. close files, deallocate resources etc.) 00015 } 00016 00017 // ------------ methods called to produce the data ------------ 00018 00019 std::auto_ptr<SiStripFecCabling> SiStripConnectivity::produceFecCabling( const SiStripFecCablingRcd& iRecord ){ 00020 edm::ESHandle<SiStripFedCabling> pDD; 00021 iRecord.getRecord<SiStripFedCablingRcd>().get(pDD ); 00022 //here build an object of type SiStripFecCabling using **ONLY** the information from class SiStripFedCabling, 00023 SiStripFecCabling * FecConnections = new SiStripFecCabling( *(pDD.product())); 00024 return std::auto_ptr<SiStripFecCabling>( FecConnections ); 00025 } 00026 00027 std::auto_ptr<SiStripDetCabling> SiStripConnectivity::produceDetCabling( const SiStripDetCablingRcd& iRecord ){ 00028 edm::ESHandle<SiStripFedCabling> pDD; 00029 iRecord.getRecord<SiStripFedCablingRcd>().get(pDD ); 00030 //here build an object of type SiStripDetCabling using **ONLY** the information from class SiStripFedCabling, 00031 SiStripDetCabling * DetConnections = new SiStripDetCabling( *(pDD.product())); 00032 return std::auto_ptr<SiStripDetCabling>( DetConnections ); 00033 } 00034 00035 //define this as a plug-in 00036 // DEFINE_FWK_EVENTSETUP_MODULE(SiStripConnectivity);