Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:15:06

0001 #ifndef ConfigurationDatabaseStandardXMLParser_hh_included
0002 #define ConfigurationDatabaseStandardXMLParser_hh_included 1
0003 
0004 #include "xercesc/sax2/SAX2XMLReader.hpp"
0005 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseException.hh"
0006 #include <string>
0007 #include <vector>
0008 #include <map>
0009 #include <list>
0010 
0011 /** \brief SAX-based XML parser for "CFGBRICK"-style configuration information.
0012  */
0013 
0014 class ConfigurationDatabaseStandardXMLParser {
0015 public:
0016   ConfigurationDatabaseStandardXMLParser();
0017   void parse(const std::string& xmlDocument,
0018              std::map<std::string, std::string>& parameters,
0019              std::vector<std::string>& items,
0020              std::string& encoding) noexcept(false);
0021   struct Item {
0022     std::map<std::string, std::string> parameters;
0023     std::vector<std::string> items;
0024     std::string encoding;
0025     std::vector<unsigned int> convert() const;
0026   };
0027   void parseMultiple(const std::string& xmlDocument, std::list<Item>& items) noexcept(false);
0028 
0029 private:
0030   xercesc::SAX2XMLReader* m_parser;
0031 };
0032 
0033 #endif  // ConfigurationDatabaseStandardXMLParser_hh_included