CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private 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::auto_ptr< DDCompactViewproduce ()
 
std::auto_ptr< DDCompactViewproduceGeom (const IdealGeometryRecord &)
 
std::auto_ptr< DDCompactViewproduceMagField (const IdealMagneticFieldRecord &)
 
 XMLIdealGeometryESSource (const edm::ParameterSet &p)
 
virtual ~XMLIdealGeometryESSource ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

Protected Member Functions

virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
 
- 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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 Member Functions

const XMLIdealGeometryESSourceoperator= (const XMLIdealGeometryESSource &)
 
 XMLIdealGeometryESSource (const XMLIdealGeometryESSource &)
 

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, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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 23 of file XMLIdealGeometryESSource.cc.

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

23  : rootNodeName_(p.getParameter<std::string>("rootNodeName")),
24  userNS_(p.getUntrackedParameter<bool>("userControlledNamespace", false)),
25  geoConfig_(p)
26 {
27  if ( rootNodeName_ == "" || rootNodeName_ == "\\" ) {
28  throw cms::Exception("DDException") << "XMLIdealGeometryESSource must have a root node name.";
29  }
30 
31  if ( rootNodeName_ == "MagneticFieldVolumes:MAGF" || rootNodeName_ == "cmsMagneticField:MAGF") {
33  edm::es::Label(p.getParameter<std::string>("@module_label")));
34  findingRecord<IdealMagneticFieldRecord>();
35  } else {
37  edm::es::Label(p.getParameter<std::string>("@module_label")));
38  findingRecord<IdealGeometryRecord>();
39  }
40 }
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
std::auto_ptr< DDCompactView > produceMagField(const IdealMagneticFieldRecord &)
GeometryConfiguration geoConfig_
std::auto_ptr< DDCompactView > produceGeom(const IdealGeometryRecord &)
XMLIdealGeometryESSource::~XMLIdealGeometryESSource ( )
virtual

Definition at line 42 of file XMLIdealGeometryESSource.cc.

42 { }
XMLIdealGeometryESSource::XMLIdealGeometryESSource ( const XMLIdealGeometryESSource )
private

Member Function Documentation

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(), DDI::Singleton< I >::instance(), DDBase< N, C >::isValid(), DDLParser::parse(), geometryXMLtoCSV::parser, rootNodeName_, DDLSAX2Handler::setUserNS(), and userNS_.

Referenced by produceGeom(), and produceMagField().

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

Definition at line 45 of file XMLIdealGeometryESSource.cc.

References produce().

Referenced by XMLIdealGeometryESSource().

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

Definition at line 51 of file XMLIdealGeometryESSource.cc.

References produce().

Referenced by XMLIdealGeometryESSource().

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

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 79 of file XMLIdealGeometryESSource.cc.

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

82 {
84  oValidity = infinity;
85 }
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 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().