#include <EcalElectronicsMappingBuilder.h>
Public Types | |
typedef std::auto_ptr < EcalElectronicsMapping > | ReturnType |
Public Member Functions | |
void | DBCallback (const EcalMappingElectronicsRcd &fRecord) |
EcalElectronicsMappingBuilder (const edm::ParameterSet &) | |
ReturnType | produce (const EcalMappingRcd &) |
~EcalElectronicsMappingBuilder () | |
Private Member Functions | |
void | FillFromDatabase (const std::vector< EcalMappingElement > &ee, EcalElectronicsMapping &theMap) |
Private Attributes | |
const EcalMappingElectronics * | Mapping_ |
Definition at line 34 of file EcalElectronicsMappingBuilder.h.
typedef std::auto_ptr<EcalElectronicsMapping> EcalElectronicsMappingBuilder::ReturnType |
Definition at line 40 of file EcalElectronicsMappingBuilder.h.
EcalElectronicsMappingBuilder::EcalElectronicsMappingBuilder | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 27 of file EcalElectronicsMappingBuilder.cc.
References DBCallback(), edm::eventsetup::dependsOn(), and edm::ESProducer::setWhatProduced().
: Mapping_ ( 0 ) { //the following line is needed to tell the framework what // data is being produced // setWhatProduced(this); setWhatProduced(this, (dependsOn (&EcalElectronicsMappingBuilder::DBCallback)) ); //now do what ever other initialization is needed }
EcalElectronicsMappingBuilder::~EcalElectronicsMappingBuilder | ( | ) |
Definition at line 38 of file EcalElectronicsMappingBuilder.cc.
{ }
void EcalElectronicsMappingBuilder::DBCallback | ( | const EcalMappingElectronicsRcd & | fRecord | ) |
Definition at line 46 of file EcalElectronicsMappingBuilder.cc.
References edm::eventsetup::EventSetupRecord::get(), Mapping_, and edm::ESHandle< T >::product().
Referenced by EcalElectronicsMappingBuilder().
{ edm::ESHandle <EcalMappingElectronics> item; fRecord.get (item); Mapping_ = item.product () ; }
void EcalElectronicsMappingBuilder::FillFromDatabase | ( | const std::vector< EcalMappingElement > & | ee, |
EcalElectronicsMapping & | theMap | ||
) | [private] |
Definition at line 68 of file EcalElectronicsMappingBuilder.cc.
References EcalElectronicsMapping::assign(), i, and EEDetId::unhashIndex().
Referenced by produce().
EcalElectronicsMappingBuilder::ReturnType EcalElectronicsMappingBuilder::produce | ( | const EcalMappingRcd & | iRecord | ) |
Definition at line 58 of file EcalElectronicsMappingBuilder.cc.
References FillFromDatabase(), Mapping_, and CrabTask::prod.
{ using namespace edm::es; std::auto_ptr<EcalElectronicsMapping> prod(new EcalElectronicsMapping()); const std::vector<EcalMappingElement>& ee = Mapping_ -> endcapItems(); FillFromDatabase(ee,*prod); return prod; }
const EcalMappingElectronics* EcalElectronicsMappingBuilder::Mapping_ [private] |
Definition at line 52 of file EcalElectronicsMappingBuilder.h.
Referenced by DBCallback(), and produce().