CMS 3D CMS Logo

DDLSAX2ExpressionHandler.cc
Go to the documentation of this file.
5 
6 #include <map>
7 #include <string>
8 
9 using namespace cms::xerces;
10 
11 class DDCompactView;
12 
15 
17 
18 // This does most of the work, it sets and determines whether it is
19 // in a ConstantsSection element, and if so, to process all the
20 // constants accordingly.
21 void DDLSAX2ExpressionHandler::startElement(const XMLCh* const uri,
22  const XMLCh* const localname,
23  const XMLCh* const qname,
24  const Attributes& attrs) {
25  if (XMLString::equals(qname, uStr("Constant").ptr())) {
26  std::string varName = toString(attrs.getValue(uStr("name").ptr()));
27  std::string varValue = toString(attrs.getValue(uStr("value").ptr()));
29  ev.set(nmspace_, varName, varValue);
30  }
31 }
32 
33 void DDLSAX2ExpressionHandler::endElement(const XMLCh* const uri,
34  const XMLCh* const localname,
35  const XMLCh* const qname) {}
XercesStrUtils.h
DDLSAX2ExpressionHandler::DDLSAX2ExpressionHandler
DDLSAX2ExpressionHandler(DDCompactView &cpv, DDLElementRegistry &)
Definition: DDLSAX2ExpressionHandler.cc:13
ClhepEvaluator.h
DDLSAX2ExpressionHandler::~DDLSAX2ExpressionHandler
~DDLSAX2ExpressionHandler() override
Definition: DDLSAX2ExpressionHandler.cc:16
cms::xerces
Definition: XercesStrUtils.h:14
DDLElementRegistry
The main class for processing parsed elements.
Definition: DDLElementRegistry.h:23
ClhepEvaluator
Definition: ClhepEvaluator.h:8
DDLSAX2FileHandler::registry
DDLElementRegistry & registry()
Definition: DDLSAX2FileHandler.h:55
DDLSAX2ExpressionHandler::endElement
void endElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
Definition: DDLSAX2ExpressionHandler.cc:33
DDLSAX2FileHandler
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
Definition: DDLSAX2FileHandler.h:35
DDLElementRegistry::evaluator
ClhepEvaluator & evaluator()
Definition: DDLElementRegistry.h:42
toolbox::toString
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
DDLSAX2ExpressionHandler::startElement
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
Definition: DDLSAX2ExpressionHandler.cc:21
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
equals
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
Definition: DeepCMVATagInfoProducer.cc:56
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLSAX2ExpressionHandler.h
DDLSAX2Handler::nmspace_
std::string nmspace_
Definition: DDLSAX2Handler.h:86
cms::xerces::uStr
ZStr< XMLCh > uStr(char const *str)
Definition: XercesStrUtils.h:30
DDLElementRegistry.h
DDLSAX2Handler::Attributes
XERCES_CPP_NAMESPACE::Attributes Attributes
Definition: DDLSAX2Handler.h:29
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95