CMS 3D CMS Logo

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 ( DDCompactView cpv,
DDLElementRegistry reg 
)

Definition at line 13 of file DDLSAX2ExpressionHandler.cc.

15 {}
DDLSAX2FileHandler(DDCompactView &cpv, DDLElementRegistry &)
DDLSAX2ExpressionHandler::~DDLSAX2ExpressionHandler ( void  )
override

Definition at line 17 of file DDLSAX2ExpressionHandler.cc.

18 {}

Member Function Documentation

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

Definition at line 39 of file DDLSAX2ExpressionHandler.cc.

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

Definition at line 24 of file DDLSAX2ExpressionHandler.cc.

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

28 {
29  if( XMLString::equals( qname, uStr("Constant").ptr()))
30  {
31  std::string varName = toString( attrs.getValue( uStr( "name" ).ptr()));
32  std::string varValue = toString( attrs.getValue( uStr( "value" ).ptr()));
34  ev.set(nmspace_, varName, varValue);
35  }
36 }
bool ev
ClhepEvaluator & evaluator()
DDLElementRegistry & registry()
std::string nmspace_
ZStr< XMLCh > uStr(char const *str)
std::string toString(const std::pair< T, T > &aT)
Definition: CaloEllipse.h:72
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
void set(const std::string &ns, const std::string &name, const std::string &exprValue)