CMS 3D CMS Logo

XMLIdealMagneticFieldGeometryESProducer.cc
Go to the documentation of this file.
3 
6 
8 
14 
19 
24 
25 #include <memory>
26 
28 public:
31 
32  typedef std::unique_ptr<DDCompactView> ReturnType;
33 
35 
36 private:
37  std::string rootDDName_; // this must be the form namespace:name
39 
45 };
46 
48  : rootDDName_(iConfig.getParameter<std::string>("rootDDName")), label_(iConfig.getParameter<std::string>("label")) {
50  setWhatProduced(this);
51 }
52 
54 
56  const IdealMagneticFieldRecord& iRecord) {
57  using namespace edm::es;
58 
60  iRecord.getRecord<MFGeometryFileRcd>().get(label_, gdd);
61 
62  DDName ddName(rootDDName_);
63  DDLogicalPart rootNode(ddName);
64  DDRootDef::instance().set(rootNode);
65  ReturnType returnValue(new DDCompactView(rootNode));
66  DDLParser parser(*returnValue);
67  parser.getDDLSAX2FileHandler()->setUserNS(true);
68  parser.clearFiles();
69 
70  std::unique_ptr<std::vector<unsigned char> > tb = (*gdd).getUncompressedBlob();
71 
72  parser.parse(*tb, tb->size());
73 
74  returnValue->lockdown();
75 
76  return returnValue;
77 }
78 
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
ESTransientHandle.h
ESHandle.h
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
DDI::Store< DDName, DDI::Material * >
XMLIdealMagneticFieldGeometryESProducer::rootDDName_
std::string rootDDName_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:37
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
XMLIdealMagneticFieldGeometryESProducer::ReturnType
std::unique_ptr< DDCompactView > ReturnType
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:32
ESProducer.h
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
DDLParser.h
Specific.h
FileBlob.h
DDCompactView.h
Solid.h
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
XMLIdealMagneticFieldGeometryESProducer::solidStore_
DDI::Store< DDName, DDI::Solid * > solidStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:41
LogicalPart.h
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::ESProducer::usesResources
void usesResources(std::vector< std::string > const &)
Definition: ESProducer.cc:117
IdealMagneticFieldRecord.h
DDSolid.h
SharedResourceNames.h
edm::ParameterSet
Definition: ParameterSet.h:47
DDI::Singleton::instance
static value_type & instance()
DDSpecifics.h
XMLIdealMagneticFieldGeometryESProducer::matStore_
DDI::Store< DDName, DDI::Material * > matStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:40
DDLParser
DDLParser is the main class of Detector Description Language Parser.
Definition: DDLParser.h:63
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDMaterial.h
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
XMLIdealMagneticFieldGeometryESProducer::specStore_
DDI::Store< DDName, DDI::Specific * > specStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:43
edm::ESSharedResourceNames::kDDGeometry
static const std::string kDDGeometry
Definition: SharedResourceNames.h:37
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DDRoot.h
XMLIdealMagneticFieldGeometryESProducer
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:27
DDRotationMatrix.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
XMLIdealMagneticFieldGeometryESProducer::produce
ReturnType produce(const IdealMagneticFieldRecord &)
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:55
edm::es
Definition: es_Label.h:33
XMLIdealMagneticFieldGeometryESProducer::lpStore_
DDI::Store< DDName, DDI::LogicalPart * > lpStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:42
XMLIdealMagneticFieldGeometryESProducer::label_
std::string label_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:38
edm::ESProducer
Definition: ESProducer.h:104
XMLIdealMagneticFieldGeometryESProducer::rotStore_
DDI::Store< DDName, DDRotationMatrix * > rotStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:44
XMLIdealMagneticFieldGeometryESProducer::~XMLIdealMagneticFieldGeometryESProducer
~XMLIdealMagneticFieldGeometryESProducer() override
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:53
XMLIdealMagneticFieldGeometryESProducer::XMLIdealMagneticFieldGeometryESProducer
XMLIdealMagneticFieldGeometryESProducer(const edm::ParameterSet &)
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:47
MFGeometryFileRcd
Definition: MFGeometryFileRcd.h:5
Material.h