CMS 3D CMS Logo

XMLIdealMagneticFieldGeometryESProducer.cc
Go to the documentation of this file.
3 
6 
12 
17 
22 
23 #include <memory>
24 
26 public:
29 
30  typedef std::unique_ptr<DDCompactView> ReturnType;
31 
33 
34 private:
35  std::string rootDDName_; // this must be the form namespace:name
37 
43 };
44 
46  : rootDDName_(iConfig.getParameter<std::string>("rootDDName")), label_(iConfig.getParameter<std::string>("label")) {
47  setWhatProduced(this);
48 }
49 
51 
53  const IdealMagneticFieldRecord& iRecord) {
54  using namespace edm::es;
55 
57  iRecord.getRecord<MFGeometryFileRcd>().get(label_, gdd);
58 
59  DDName ddName(rootDDName_);
60  DDLogicalPart rootNode(ddName);
61  DDRootDef::instance().set(rootNode);
62  ReturnType returnValue(new DDCompactView(rootNode));
63  DDLParser parser(*returnValue);
64  parser.getDDLSAX2FileHandler()->setUserNS(true);
65  parser.clearFiles();
66 
67  std::unique_ptr<std::vector<unsigned char> > tb = (*gdd).getUncompressedBlob();
68 
69  parser.parse(*tb, tb->size());
70 
71  returnValue->lockdown();
72 
73  return returnValue;
74 }
75 
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:51
ESTransientHandle.h
ESHandle.h
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDI::Store< DDName, DDI::Material * >
XMLIdealMagneticFieldGeometryESProducer::rootDDName_
std::string rootDDName_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:35
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
XMLIdealMagneticFieldGeometryESProducer::ReturnType
std::unique_ptr< DDCompactView > ReturnType
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:30
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:39
LogicalPart.h
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
IdealMagneticFieldRecord.h
DDSolid.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
DDI::Singleton::instance
static value_type & instance()
DDSpecifics.h
XMLIdealMagneticFieldGeometryESProducer::matStore_
DDI::Store< DDName, DDI::Material * > matStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:38
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
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
XMLIdealMagneticFieldGeometryESProducer::specStore_
DDI::Store< DDName, DDI::Specific * > specStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:41
ModuleFactory.h
std
Definition: JetResolutionObject.h:76
DDRoot.h
XMLIdealMagneticFieldGeometryESProducer
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:25
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
XMLIdealMagneticFieldGeometryESProducer::produce
ReturnType produce(const IdealMagneticFieldRecord &)
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:52
edm::es
Definition: es_Label.h:33
XMLIdealMagneticFieldGeometryESProducer::lpStore_
DDI::Store< DDName, DDI::LogicalPart * > lpStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:40
XMLIdealMagneticFieldGeometryESProducer::label_
std::string label_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:36
edm::ESProducer
Definition: ESProducer.h:101
XMLIdealMagneticFieldGeometryESProducer::rotStore_
DDI::Store< DDName, DDRotationMatrix * > rotStore_
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:42
XMLIdealMagneticFieldGeometryESProducer::~XMLIdealMagneticFieldGeometryESProducer
~XMLIdealMagneticFieldGeometryESProducer() override
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:50
XMLIdealMagneticFieldGeometryESProducer::XMLIdealMagneticFieldGeometryESProducer
XMLIdealMagneticFieldGeometryESProducer(const edm::ParameterSet &)
Definition: XMLIdealMagneticFieldGeometryESProducer.cc:45
MFGeometryFileRcd
Definition: MFGeometryFileRcd.h:5
Material.h
DDRotationMatrix.h