CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Geometry/EcalMapping/plugins/EcalElectronicsMappingBuilder.h

Go to the documentation of this file.
00001 
00002 #ifndef Geometry_EcalMapping_EcalElectronicsMappingBuilder
00003 #define Geometry_EcalMapping_EcalElectronicsMappingBuilder
00004 
00005 // system include files
00006 #include <memory>
00007 #include "boost/shared_ptr.hpp"
00008 
00009 // user include files
00010 #include "FWCore/Framework/interface/ModuleFactory.h"
00011 #include "FWCore/Framework/interface/ESProducer.h"
00012 
00013 
00014 // class EcalMappingRcd;
00015 
00016 
00017 // #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
00018 
00019 #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00021 // #include "Geometry/Records/interface/IdealGeometryRecord.h"
00022 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
00023 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
00024 #include "CondFormats/DataRecord/interface/EcalMappingElectronicsRcd.h"
00025 #include "CondFormats/EcalObjects/interface/EcalMappingElectronics.h"
00026 
00027 #include <vector>
00028 
00029 //
00030 // class decleration
00031 //
00032 
00033 // class EcalElectronicsMappingBuilder : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
00034 class EcalElectronicsMappingBuilder : public edm::ESProducer 
00035 {
00036  public:
00037   EcalElectronicsMappingBuilder(const edm::ParameterSet&);
00038   ~EcalElectronicsMappingBuilder();
00039   
00040   typedef std::auto_ptr<EcalElectronicsMapping> ReturnType;
00041   
00042   // ReturnType produce(const IdealGeometryRecord&);
00043   ReturnType produce(const EcalMappingRcd&);
00044   
00045   void DBCallback (const EcalMappingElectronicsRcd& fRecord);
00046   
00047  private:
00048   void FillFromDatabase(const std::vector<EcalMappingElement>& ee,
00049                         EcalElectronicsMapping& theMap);
00050   
00051   
00052   const EcalMappingElectronics* Mapping_ ;
00053   // void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & );
00054   // ----------member data ---------------------------
00055 };
00056 
00057 #endif