File indexing completed on 2024-04-06 12:15:31
0001 #ifndef GeometryReaders_XMLIdealGeometryESSource_XMLIdealGeometryESSource_H
0002 #define GeometryReaders_XMLIdealGeometryESSource_XMLIdealGeometryESSource_H
0003
0004 #include "FWCore/Framework/interface/ESProducer.h"
0005 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007
0008 #include "DetectorDescription/Core/interface/DDCompactView.h"
0009 #include "GeometryReaders/XMLIdealGeometryESSource/interface/GeometryConfiguration.h"
0010 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0011 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0012
0013 #include <memory>
0014 #include <string>
0015
0016 class XMLIdealGeometryESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0017 public:
0018 XMLIdealGeometryESSource(const edm::ParameterSet &p);
0019 XMLIdealGeometryESSource(const XMLIdealGeometryESSource &) = delete;
0020 const XMLIdealGeometryESSource &operator=(const XMLIdealGeometryESSource &) = delete;
0021 ~XMLIdealGeometryESSource() override;
0022 std::unique_ptr<DDCompactView> produceGeom(const IdealGeometryRecord &);
0023 std::unique_ptr<DDCompactView> produceMagField(const IdealMagneticFieldRecord &);
0024 std::unique_ptr<DDCompactView> produce();
0025
0026 protected:
0027 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0028 const edm::IOVSyncValue &,
0029 edm::ValidityInterval &) override;
0030
0031 private:
0032 std::string rootNodeName_;
0033 bool userNS_;
0034 GeometryConfiguration geoConfig_;
0035 };
0036
0037 #endif