CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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) {}
bool ev
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDLSAX2ExpressionHandler(DDCompactView &cpv, DDLElementRegistry &)
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
void endElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
ClhepEvaluator & evaluator()
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
DDLElementRegistry & registry()
std::string nmspace_
ZStr< XMLCh > uStr(char const *str)
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
void startElement(const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
XERCES_CPP_NAMESPACE::Attributes Attributes
void set(const std::string &ns, const std::string &name, const std::string &exprValue)
The main class for processing parsed elements.