CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
XMLIdealGeometryESSource Class Reference

#include <XMLIdealGeometryESSource.h>

Inheritance diagram for XMLIdealGeometryESSource:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< DDCompactViewproduce ()
 
std::unique_ptr< DDCompactViewproduceGeom (const IdealGeometryRecord &)
 
std::unique_ptr< DDCompactViewproduceMagField (const IdealMagneticFieldRecord &)
 
 XMLIdealGeometryESSource (const edm::ParameterSet &p)
 
 ~XMLIdealGeometryESSource () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

const XMLIdealGeometryESSourceoperator= (const XMLIdealGeometryESSource &)=delete
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
 XMLIdealGeometryESSource (const XMLIdealGeometryESSource &)=delete
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Attributes

GeometryConfiguration geoConfig_
 
std::string rootNodeName_
 
bool userNS_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 16 of file XMLIdealGeometryESSource.h.

Constructor & Destructor Documentation

XMLIdealGeometryESSource::XMLIdealGeometryESSource ( const edm::ParameterSet p)

Definition at line 22 of file XMLIdealGeometryESSource.cc.

References Exception, edm::ParameterSet::getParameter(), produceGeom(), produceMagField(), rootNodeName_, edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

22  : rootNodeName_(p.getParameter<std::string>("rootNodeName")),
23  userNS_(p.getUntrackedParameter<bool>("userControlledNamespace", false)),
24  geoConfig_(p)
25 {
26  if ( rootNodeName_ == "" || rootNodeName_ == "\\" ) {
27  throw cms::Exception("DDException") << "XMLIdealGeometryESSource must have a root node name.";
28  }
29 
30  if ( rootNodeName_ == "MagneticFieldVolumes:MAGF" || rootNodeName_ == "cmsMagneticField:MAGF") {
32  edm::es::Label(p.getParameter<std::string>("@module_label")));
33  findingRecord<IdealMagneticFieldRecord>();
34  } else {
36  edm::es::Label(p.getParameter<std::string>("@module_label")));
37  findingRecord<IdealGeometryRecord>();
38  }
39 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
GeometryConfiguration geoConfig_
std::unique_ptr< DDCompactView > produceGeom(const IdealGeometryRecord &)
std::unique_ptr< DDCompactView > produceMagField(const IdealMagneticFieldRecord &)
XMLIdealGeometryESSource::~XMLIdealGeometryESSource ( )
override

Definition at line 41 of file XMLIdealGeometryESSource.cc.

41 { }
XMLIdealGeometryESSource::XMLIdealGeometryESSource ( const XMLIdealGeometryESSource )
protecteddelete

Member Function Documentation

const XMLIdealGeometryESSource& XMLIdealGeometryESSource::operator= ( const XMLIdealGeometryESSource )
protecteddelete
std::unique_ptr< DDCompactView > XMLIdealGeometryESSource::produce ( )

Definition at line 57 of file XMLIdealGeometryESSource.cc.

References Exception, geoConfig_, DDLParser::getDDLSAX2FileHandler(), DDI::Singleton< I >::instance(), DDBase< N, C >::isValid(), DDLParser::parse(), createfilelist::parser, rootNodeName_, DDLSAX2Handler::setUserNS(), and userNS_.

Referenced by produceGeom(), and produceMagField().

57  {
58 
59  DDName ddName(rootNodeName_);
60  DDLogicalPart rootNode(ddName);
61  DDRootDef::instance().set(rootNode);
62  std::unique_ptr<DDCompactView> returnValue(new DDCompactView(rootNode));
63  DDLParser parser(*returnValue); //* parser = DDLParser::instance();
64  parser.getDDLSAX2FileHandler()->setUserNS(userNS_);
65  int result2 = parser.parse(geoConfig_);
66  if (result2 != 0) throw cms::Exception("DDException") << "DDD-Parser: parsing failed!";
67 
68  // after parsing the root node should be valid!
69 
70  if( !rootNode.isValid() ){
71  throw cms::Exception("Geometry")<<"There is no valid node named \""
72  <<rootNodeName_<<"\"";
73  }
74  returnValue->lockdown();
75  return returnValue;
76 }
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
type of data representation of DDCompactView
Definition: DDCompactView.h:90
static value_type & instance()
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
GeometryConfiguration geoConfig_
DDLParser is the main class of Detector Description Language Parser.
Definition: DDLParser.h:62
std::unique_ptr< DDCompactView > XMLIdealGeometryESSource::produceGeom ( const IdealGeometryRecord )

Definition at line 44 of file XMLIdealGeometryESSource.cc.

References produce().

Referenced by XMLIdealGeometryESSource().

45 {
46  return produce();
47 }
std::unique_ptr< DDCompactView > produce()
std::unique_ptr< DDCompactView > XMLIdealGeometryESSource::produceMagField ( const IdealMagneticFieldRecord )

Definition at line 50 of file XMLIdealGeometryESSource.cc.

References produce().

Referenced by XMLIdealGeometryESSource().

51 {
52  return produce();
53 }
std::unique_ptr< DDCompactView > produce()
void XMLIdealGeometryESSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 78 of file XMLIdealGeometryESSource.cc.

References edm::IOVSyncValue::beginOfTime(), DEFINE_FWK_EVENTSETUP_SOURCE, edm::IOVSyncValue::endOfTime(), and infinity.

81 {
83  oValidity = infinity;
84 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
static const IOVSyncValue & beginOfTime()
const double infinity

Member Data Documentation

GeometryConfiguration XMLIdealGeometryESSource::geoConfig_
private

Definition at line 34 of file XMLIdealGeometryESSource.h.

Referenced by produce().

std::string XMLIdealGeometryESSource::rootNodeName_
private

Definition at line 32 of file XMLIdealGeometryESSource.h.

Referenced by produce(), and XMLIdealGeometryESSource().

bool XMLIdealGeometryESSource::userNS_
private

Definition at line 33 of file XMLIdealGeometryESSource.h.

Referenced by produce().