test
CMS 3D CMS Logo

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

DDLSAX2ConfigHandler is the handler for the configuration file. More...

#include <DDLSAX2ConfigHandler.h>

Inheritance diagram for DDLSAX2ConfigHandler:
DDLSAX2Handler

Public Member Functions

 DDLSAX2ConfigHandler (DDCompactView &cpv)
 
const bool doValidation () const
 
const std::vector< std::string > & getFileNames () const
 
const std::string getSchemaLocation () const
 
const std::vector< std::string > & getURLs () const
 
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 
 ~DDLSAX2ConfigHandler ()
 
- Public Member Functions inherited from DDLSAX2Handler
virtual void characters (const XMLCh *const chars, const XMLSize_t length) override
 
virtual void comment (const XMLCh *const chars, const XMLSize_t length) override
 
 DDLSAX2Handler ()
 
virtual void dumpStats (const std::string &fname)
 
virtual void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
 
virtual void error (const SAXParseException &exception) override
 
virtual 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...
 
virtual void ignorableWhitespace (const XMLCh *const chars, const XMLSize_t length) override
 
virtual void resetDocument () override
 
virtual void setNameSpace (const std::string &nms)
 
virtual void setUserNS (bool userns)
 
virtual void warning (const SAXParseException &exception) override
 
 ~DDLSAX2Handler ()
 

Private Attributes

DDCompactViewcpv_
 
bool doValidation_
 
std::vector< std::string > files_
 
std::string schemaLocation_
 
std::vector< std::string > urls_
 

Additional Inherited Members

- Public Types inherited from DDLSAX2Handler
typedef
XERCES_CPP_NAMESPACE::Attributes 
Attributes
 
typedef
XERCES_CPP_NAMESPACE::SAXParseException 
SAXParseException
 
- 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

DDLSAX2ConfigHandler is the handler for the configuration file.

Author
Michael Case

DDLSAX2ConfigHandler.h - description

begin: Mon Oct 22 2001 email: case@.nosp@m.ucdh.nosp@m.ep.uc.nosp@m.davi.nosp@m.s.edu

This handler is used by the DDLParser to process configuration files.

Definition at line 30 of file DDLSAX2ConfigHandler.h.

Constructor & Destructor Documentation

DDLSAX2ConfigHandler::DDLSAX2ConfigHandler ( DDCompactView cpv)

Definition at line 14 of file DDLSAX2ConfigHandler.cc.

15  : doValidation_(false),
16  files_(),
17  urls_(),
19  cpv_(cpv)
20 {}
std::vector< std::string > files_
std::vector< std::string > urls_
DDLSAX2ConfigHandler::~DDLSAX2ConfigHandler ( void  )

Definition at line 22 of file DDLSAX2ConfigHandler.cc.

23 {}

Member Function Documentation

const bool DDLSAX2ConfigHandler::doValidation ( void  ) const

Definition at line 87 of file DDLSAX2ConfigHandler.cc.

References doValidation_.

Referenced by FIPConfiguration::doValidation().

88 {
89  return doValidation_;
90 }
const std::vector< std::string > & DDLSAX2ConfigHandler::getFileNames ( void  ) const

Definition at line 69 of file DDLSAX2ConfigHandler.cc.

References files_.

Referenced by FIPConfiguration::readConfig().

70 {
71  return files_;
72 }
std::vector< std::string > files_
const std::string DDLSAX2ConfigHandler::getSchemaLocation ( void  ) const

Definition at line 81 of file DDLSAX2ConfigHandler.cc.

References schemaLocation_.

Referenced by FIPConfiguration::getSchemaLocation().

82 {
83  return schemaLocation_;
84 }
const std::vector< std::string > & DDLSAX2ConfigHandler::getURLs ( void  ) const

Definition at line 75 of file DDLSAX2ConfigHandler.cc.

References urls_.

Referenced by FIPConfiguration::readConfig().

76 {
77  return urls_;
78 }
std::vector< std::string > urls_
void DDLSAX2ConfigHandler::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const Attributes attrs 
)
virtual

Reimplemented from DDLSAX2Handler.

Definition at line 38 of file DDLSAX2ConfigHandler.cc.

References cpv_, doValidation_, MillePedeFileConverter_cfg::fileName, files_, DDI::Singleton< I >::instance(), mergeVDriftHistosByStation::name, pyrootRender::root, schemaLocation_, DDCompactView::setRoot(), AlCaHLTBitMon_QueryRunRegistry::string, toolbox::toString(), relmon_authenticated_wget::url, urls_, and cms::xerces::uStr().

42 {
43  if( XMLString::equals( qname, uStr("File").ptr()))
44  {
45  std::string name = toString(attrs.getValue(uStr("name").ptr()));
46  std::string url = toString(attrs.getValue(uStr("url").ptr()));
47 
48  files_.push_back(name);
49  urls_.push_back(url);
50  }
51  else if( XMLString::equals( qname, uStr("Root").ptr()))
52  {
53  std::string fileName = toString(attrs.getValue(uStr("fileName").ptr()));
54  std::string logicalPartName = toString(attrs.getValue(uStr("logicalPartName").ptr()));
55 
56  fileName = fileName.substr(0, fileName.find("."));
57  DDLogicalPart root(DDName(logicalPartName,fileName));
59  cpv_.setRoot(root);
60  }
61  else if( XMLString::equals( qname, uStr("Schema").ptr()))
62  {
63  schemaLocation_ = toString(attrs.getValue(uStr("schemaLocation").ptr()));
64  doValidation_ = (XMLString::equals(attrs.getValue(uStr("validation").ptr()), uStr("true").ptr()) ? true : false);
65  }
66 }
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:16
std::vector< std::string > files_
void setRoot(const DDLogicalPart &root)
don&#39;t use : interface not stable ....
static value_type & instance()
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
ZStr< XMLCh > uStr(char const *str)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
std::vector< std::string > urls_

Member Data Documentation

DDCompactView& DDLSAX2ConfigHandler::cpv_
private

Definition at line 57 of file DDLSAX2ConfigHandler.h.

Referenced by startElement().

bool DDLSAX2ConfigHandler::doValidation_
private

Definition at line 53 of file DDLSAX2ConfigHandler.h.

Referenced by doValidation(), and startElement().

std::vector<std::string> DDLSAX2ConfigHandler::files_
private

Definition at line 54 of file DDLSAX2ConfigHandler.h.

Referenced by getFileNames(), and startElement().

std::string DDLSAX2ConfigHandler::schemaLocation_
private

Definition at line 56 of file DDLSAX2ConfigHandler.h.

Referenced by getSchemaLocation(), and startElement().

std::vector<std::string> DDLSAX2ConfigHandler::urls_
private

Definition at line 55 of file DDLSAX2ConfigHandler.h.

Referenced by getURLs(), and startElement().