CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions
DDLSAX2ExpressionHandler Class Reference

DDLSAX2ExpressionHandler is the first pass SAX2 Handler for XML files found in the configuration file. More...

#include <DDLSAX2ExpressionHandler.h>

Inheritance diagram for DDLSAX2ExpressionHandler:
DDLSAX2FileHandler DDLSAX2Handler

Public Member Functions

 DDLSAX2ExpressionHandler (DDCompactView &cpv, DDLElementRegistry &)
 
void endElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
 
void startElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
 
 ~DDLSAX2ExpressionHandler () override
 
- Public Member Functions inherited from DDLSAX2FileHandler
void characters (const XMLCh *chars, XMLSize_t length) override
 
void comment (const XMLCh *chars, XMLSize_t length) override
 
void createDDConstants () const
 creates all DDConstant from the evaluator which has been already 'filled' in the first scan of the documents More...
 
 DDLSAX2FileHandler (DDCompactView &cpv, DDLElementRegistry &)
 
void endElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
 
void init ()
 
void startElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
 
 ~DDLSAX2FileHandler () override
 
- Public Member Functions inherited from DDLSAX2Handler
void characters (const XMLCh *chars, XMLSize_t length) override
 
void comment (const XMLCh *chars, XMLSize_t length) override
 
 DDLSAX2Handler ()
 
virtual void dumpStats (const std::string &fname)
 
void endElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname) override
 
void error (const SAXParseException &exception) override
 
void fatalError (const SAXParseException &exception) override
 
unsigned int getAttrCount () const
 Get the count of attributes processed so far. More...
 
unsigned int getCharacterCount () const
 Get the count of characters processed so far. More...
 
unsigned int getElementCount () const
 Get the count of elements processed so far. More...
 
bool getSawErrors () const
 Did the XML parser see any errors? More...
 
unsigned int getSpaceCount () const
 Get the count of spaces processed so far. More...
 
void ignorableWhitespace (const XMLCh *chars, XMLSize_t length) override
 
void resetDocument () override
 
virtual void setNameSpace (const std::string &nms)
 
virtual void setUserNS (bool userns)
 
void startElement (const XMLCh *uri, const XMLCh *localname, const XMLCh *qname, const Attributes &attrs) override
 
void warning (const SAXParseException &exception) override
 
 ~DDLSAX2Handler () override
 

Additional Inherited Members

- Public Types inherited from DDLSAX2Handler
using Attributes = XERCES_CPP_NAMESPACE::Attributes
 
using SAXParseException = XERCES_CPP_NAMESPACE::SAXParseException
 
- Protected Member Functions inherited from DDLSAX2FileHandler
DDLElementRegistryregistry ()
 
- Protected Attributes inherited from DDLSAX2Handler
XMLSize_t attrCount_
 
XMLSize_t characterCount_
 
XMLSize_t elementCount_
 
std::string nmspace_
 
bool sawErrors_
 
XMLSize_t spaceCount_
 
bool userNS_
 

Detailed Description

DDLSAX2ExpressionHandler is the first pass SAX2 Handler for XML files found in the configuration file.

Author
Michael Case

DDLSAX2ExpressionHandler.h - description

begin: Mon Feb 25, 2002

This processes only ConstantsSection/Parameter elements so there is no need to make it as elaborate as the second pass parser.

Definition at line 25 of file DDLSAX2ExpressionHandler.h.

Constructor & Destructor Documentation

◆ DDLSAX2ExpressionHandler()

DDLSAX2ExpressionHandler::DDLSAX2ExpressionHandler ( DDCompactView cpv,
DDLElementRegistry reg 
)

Definition at line 13 of file DDLSAX2ExpressionHandler.cc.

DDLSAX2FileHandler(DDCompactView &cpv, DDLElementRegistry &)

◆ ~DDLSAX2ExpressionHandler()

DDLSAX2ExpressionHandler::~DDLSAX2ExpressionHandler ( void  )
override

Definition at line 16 of file DDLSAX2ExpressionHandler.cc.

16 {}

Member Function Documentation

◆ endElement()

void DDLSAX2ExpressionHandler::endElement ( const XMLCh *  uri,
const XMLCh *  localname,
const XMLCh *  qname 
)
override

Definition at line 33 of file DDLSAX2ExpressionHandler.cc.

35  {}

◆ startElement()

void DDLSAX2ExpressionHandler::startElement ( const XMLCh *  uri,
const XMLCh *  localname,
const XMLCh *  qname,
const Attributes attrs 
)
override

Definition at line 21 of file DDLSAX2ExpressionHandler.cc.

References equals(), makeMEIFBenchmarkPlots::ev, DDLElementRegistry::evaluator(), DDLSAX2Handler::nmspace_, DDLSAX2FileHandler::registry(), AlCaHLTBitMon_QueryRunRegistry::string, toolbox::toString(), and cms::xerces::uStr().

24  {
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 }
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)