00001 #ifndef GeometryReaders_XMLIdealGeometryESSource_XMLIdealGeometryESSource_H 00002 #define GeometryReaders_XMLIdealGeometryESSource_XMLIdealGeometryESSource_H 00003 00004 #include "FWCore/Framework/interface/ESProducer.h" 00005 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 00008 #include "DetectorDescription/Core/interface/DDCompactView.h" 00009 #include "GeometryReaders/XMLIdealGeometryESSource/interface/GeometryConfiguration.h" 00010 #include "Geometry/Records/interface/IdealGeometryRecord.h" 00011 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 00012 00013 #include <memory> 00014 #include <string> 00015 00016 class XMLIdealGeometryESSource : public edm::ESProducer, 00017 public edm::EventSetupRecordIntervalFinder 00018 { 00019 public: 00020 XMLIdealGeometryESSource(const edm::ParameterSet & p); 00021 virtual ~XMLIdealGeometryESSource(); 00022 std::auto_ptr<DDCompactView> produceGeom(const IdealGeometryRecord &); 00023 std::auto_ptr<DDCompactView> produceMagField(const IdealMagneticFieldRecord &); 00024 std::auto_ptr<DDCompactView> produce(); 00025 protected: 00026 virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, 00027 const edm::IOVSyncValue &,edm::ValidityInterval &); 00028 private: 00029 XMLIdealGeometryESSource(const XMLIdealGeometryESSource &); 00030 const XMLIdealGeometryESSource & operator=(const XMLIdealGeometryESSource &); 00031 std::string rootNodeName_; 00032 bool userNS_; 00033 GeometryConfiguration geoConfig_; 00034 00035 }; 00036 00037 00038 #endif