#include <XMLIdealGeometryESSource.h>
Public Member Functions | |
std::auto_ptr< DDCompactView > | produce () |
std::auto_ptr< DDCompactView > | produceGeom (const IdealGeometryRecord &) |
std::auto_ptr< DDCompactView > | produceMagField (const IdealMagneticFieldRecord &) |
XMLIdealGeometryESSource (const edm::ParameterSet &p) | |
virtual | ~XMLIdealGeometryESSource () |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Member Functions | |
const XMLIdealGeometryESSource & | operator= (const XMLIdealGeometryESSource &) |
XMLIdealGeometryESSource (const XMLIdealGeometryESSource &) | |
Private Attributes | |
GeometryConfiguration | geoConfig_ |
std::string | rootNodeName_ |
bool | userNS_ |
Definition at line 16 of file XMLIdealGeometryESSource.h.
XMLIdealGeometryESSource::XMLIdealGeometryESSource | ( | const edm::ParameterSet & | p | ) |
Definition at line 23 of file XMLIdealGeometryESSource.cc.
References Exception, edm::ParameterSet::getParameter(), produceGeom(), produceMagField(), rootNodeName_, and edm::ESProducer::setWhatProduced().
: rootNodeName_(p.getParameter<std::string>("rootNodeName")), userNS_(p.getUntrackedParameter<bool>("userControlledNamespace", false)), geoConfig_(p) { if ( rootNodeName_ == "" || rootNodeName_ == "\\" ) { throw cms::Exception("DDException") << "XMLIdealGeometryESSource must have a root node name."; } if ( rootNodeName_ == "MagneticFieldVolumes:MAGF" || rootNodeName_ == "cmsMagneticField:MAGF") { setWhatProduced(this, &XMLIdealGeometryESSource::produceMagField, edm::es::Label(p.getParameter<std::string>("@module_label"))); findingRecord<IdealMagneticFieldRecord>(); } else { setWhatProduced(this, &XMLIdealGeometryESSource::produceGeom, edm::es::Label(p.getParameter<std::string>("@module_label"))); findingRecord<IdealGeometryRecord>(); } }
XMLIdealGeometryESSource::~XMLIdealGeometryESSource | ( | ) | [virtual] |
Definition at line 42 of file XMLIdealGeometryESSource.cc.
{ }
XMLIdealGeometryESSource::XMLIdealGeometryESSource | ( | const XMLIdealGeometryESSource & | ) | [private] |
const XMLIdealGeometryESSource& XMLIdealGeometryESSource::operator= | ( | const XMLIdealGeometryESSource & | ) | [private] |
std::auto_ptr< DDCompactView > XMLIdealGeometryESSource::produce | ( | ) |
Definition at line 58 of file XMLIdealGeometryESSource.cc.
References Exception, geoConfig_, DDLParser::getDDLSAX2FileHandler(), instance, DDBase< N, C >::isValid(), DDLParser::parse(), geometryXMLtoCSV::parser, rootNodeName_, DDLSAX2Handler::setUserNS(), and userNS_.
Referenced by produceGeom(), and produceMagField().
{ DDName ddName(rootNodeName_); DDLogicalPart rootNode(ddName); DDRootDef::instance().set(rootNode); std::auto_ptr<DDCompactView> returnValue(new DDCompactView(rootNode)); DDLParser parser(*returnValue); //* parser = DDLParser::instance(); parser.getDDLSAX2FileHandler()->setUserNS(userNS_); int result2 = parser.parse(geoConfig_); if (result2 != 0) throw cms::Exception("DDException") << "DDD-Parser: parsing failed!"; // after parsing the root node should be valid! if( !rootNode.isValid() ){ throw cms::Exception("Geometry")<<"There is no valid node named \"" <<rootNodeName_<<"\""; } returnValue->lockdown(); return returnValue; }
std::auto_ptr< DDCompactView > XMLIdealGeometryESSource::produceGeom | ( | const IdealGeometryRecord & | ) |
Definition at line 45 of file XMLIdealGeometryESSource.cc.
References produce().
Referenced by XMLIdealGeometryESSource().
{ return produce(); }
std::auto_ptr< DDCompactView > XMLIdealGeometryESSource::produceMagField | ( | const IdealMagneticFieldRecord & | ) |
Definition at line 51 of file XMLIdealGeometryESSource.cc.
References produce().
Referenced by XMLIdealGeometryESSource().
{ return produce(); }
void XMLIdealGeometryESSource::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | iosv, | ||
edm::ValidityInterval & | oValidity | ||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 79 of file XMLIdealGeometryESSource.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
{ edm::ValidityInterval infinity(iosv.beginOfTime(), iosv.endOfTime()); oValidity = infinity; }
Definition at line 33 of file XMLIdealGeometryESSource.h.
Referenced by produce().
std::string XMLIdealGeometryESSource::rootNodeName_ [private] |
Definition at line 31 of file XMLIdealGeometryESSource.h.
Referenced by produce(), and XMLIdealGeometryESSource().
bool XMLIdealGeometryESSource::userNS_ [private] |
Definition at line 32 of file XMLIdealGeometryESSource.h.
Referenced by produce().