1212
1313#include " FWCore/MessageLogger/interface/MessageLogger.h"
1414
15+ #include " Utilities/Xerces/interface/Xerces.h"
16+
1517#include " xercesc/framework/StdOutFormatTarget.hpp"
1618#include " xercesc/framework/LocalFileFormatTarget.hpp"
1719#include " xercesc/parsers/XercesDOMParser.hpp"
@@ -39,20 +41,11 @@ inline XMLCh *_toDOMS(std::string temp) {
3941}
4042// //////////////////////////////////
4143// //////////////////////////////////
42- XMLConfigReader::XMLConfigReader () {
43- // XMLPlatformUtils::Initialize();
44-
45- // /Initialise XML parser
46- // parser = new XercesDOMParser();
47- // parser->setValidationScheme(XercesDOMParser::Val_Auto);
48- // parser->setDoNamespaces(false);
49-
50- // doc = 0;
51- }
44+ XMLConfigReader::XMLConfigReader () { cms::concurrency::xercesInitialize (); }
5245
5346XMLConfigReader::~XMLConfigReader () {
5447 // delete parser;
55- // XMLPlatformUtils::Terminate ();
48+ cms::concurrency::xercesTerminate ();
5649}
5750// ////////////////////////////////////////////////
5851// ////////////////////////////////////////////////
@@ -134,7 +127,6 @@ unsigned int XMLConfigReader::getPatternsVersion() const {
134127 return 0 ;
135128
136129 unsigned int version = 0 ;
137- XMLPlatformUtils::Initialize ();
138130 {
139131 XercesDOMParser parser;
140132 parser.setValidationScheme (XercesDOMParser::Val_Auto);
@@ -154,7 +146,6 @@ unsigned int XMLConfigReader::getPatternsVersion() const {
154146 XMLString::release (&xmlVersion);
155147 parser.resetDocumentPool ();
156148 }
157- XMLPlatformUtils::Terminate ();
158149
159150 return version;
160151}
@@ -163,8 +154,6 @@ unsigned int XMLConfigReader::getPatternsVersion() const {
163154std::vector<std::shared_ptr<GoldenPattern>> XMLConfigReader::readPatterns (const L1TMuonOverlapParams &aConfig) {
164155 aGPs.clear ();
165156
166- XMLPlatformUtils::Initialize ();
167-
168157 XMLCh *xmlGP = _toDOMS (" GP" );
169158 std::array<XMLCh *, 4 > xmliPt = {{_toDOMS (" iPt1" ), _toDOMS (" iPt2" ), _toDOMS (" iPt3" ), _toDOMS (" iPt4" )}};
170159
@@ -222,8 +211,6 @@ std::vector<std::shared_ptr<GoldenPattern>> XMLConfigReader::readPatterns(const
222211 XMLString::release (&xmliPt[2 ]);
223212 XMLString::release (&xmliPt[3 ]);
224213
225- XMLPlatformUtils::Terminate ();
226-
227214 return aGPs;
228215}
229216// ////////////////////////////////////////////////
@@ -338,7 +325,6 @@ std::vector<std::vector<int>> XMLConfigReader::readEvent(unsigned int iEvent, un
338325// ////////////////////////////////////////////////
339326// ////////////////////////////////////////////////
340327void XMLConfigReader::readConfig (L1TMuonOverlapParams *aConfig) const {
341- XMLPlatformUtils::Initialize ();
342328 {
343329 XercesDOMParser parser;
344330 parser.setValidationScheme (XercesDOMParser::Val_Auto);
@@ -632,7 +618,6 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const {
632618 XMLString::release (&xmlnGoldenPatterns);
633619 XMLString::release (&xmlConnectionMap);
634620 }
635- XMLPlatformUtils::Terminate ();
636621}
637622// ////////////////////////////////////////////////
638623// ////////////////////////////////////////////////
0 commit comments