CMS 3D CMS Logo

XMLConfigReader.h
Go to the documentation of this file.
1 #ifndef OMTF_XMLConfigReader_H
2 #define OMTF_XMLConfigReader_H
3 
4 #include <string>
5 #include <vector>
6 #include <ostream>
7 #include <memory>
8 
9 #include "xercesc/util/XercesDefs.hpp"
10 #include "xercesc/dom/DOM.hpp"
11 
14 
15 class GoldenPattern;
16 class OMTFConfiguration;
18 
19 namespace XERCES_CPP_NAMESPACE {
20 
21  class DOMElement;
22  class XercesDOMParser;
23 
24 } // namespace XERCES_CPP_NAMESPACE
25 
27 public:
30 
31  void readConfig(const std::string fName);
32 
34 
36 
38 
39  std::vector<std::shared_ptr<GoldenPattern>> readPatterns(const L1TMuonOverlapParams &aConfig);
40 
41  void readLUTs(std::vector<l1t::LUT *> luts,
42  const L1TMuonOverlapParams &aConfig,
43  const std::vector<std::string> &types);
44 
45  void readConfig(L1TMuonOverlapParams *aConfig) const;
46 
47  unsigned int getPatternsVersion() const;
48 
49  std::vector<std::vector<int>> readEvent(unsigned int iEvent = 0, unsigned int iProcessor = 0, bool readEta = false);
50 
51 private:
52  std::string configFile; //XML file with general configuration
53  std::string patternsFile; //XML file with GoldenPatterns
54  std::string eventsFile; //XML file with events
55 
56  std::unique_ptr<GoldenPattern> buildGP(xercesc::DOMElement *aGPElement,
57  const L1TMuonOverlapParams &aConfig,
58  unsigned int index = 0,
59  unsigned int aGPNumber = 999);
60 
61  // xercesc::XercesDOMParser *parser;
62  // xercesc::DOMDocument* doc;
63 
65  std::vector<std::shared_ptr<GoldenPattern>> aGPs;
66 };
67 
68 #endif
XMLConfigReader::~XMLConfigReader
~XMLConfigReader()
Definition: XMLConfigReader.cc:53
LUT.h
OMTFConfiguration
Definition: OMTFConfiguration.h:44
MainPageGenerator.fName
fName
Definition: MainPageGenerator.py:301
OMTFConfiguration.h
XMLConfigReader::configFile
std::string configFile
Definition: XMLConfigReader.h:52
XMLConfigReader::readEvent
std::vector< std::vector< int > > readEvent(unsigned int iEvent=0, unsigned int iProcessor=0, bool readEta=false)
Definition: XMLConfigReader.cc:335
XMLConfigReader::readPatterns
std::vector< std::shared_ptr< GoldenPattern > > readPatterns(const L1TMuonOverlapParams &aConfig)
Definition: XMLConfigReader.cc:163
L1TMuonOverlapParams
Definition: L1TMuonOverlapParams.h:14
XERCES_CPP_NAMESPACE
Definition: XmlConfigParser.h:12
XMLConfigReader::setPatternsFile
void setPatternsFile(const std::string &fName)
Definition: XMLConfigReader.h:35
XMLConfigReader::XMLConfigReader
XMLConfigReader()
Definition: XMLConfigReader.cc:42
XMLConfigReader
Definition: XMLConfigReader.h:26
iEvent
int iEvent
Definition: GenABIO.cc:224
XMLConfigReader::readLUTs
void readLUTs(std::vector< l1t::LUT * > luts, const L1TMuonOverlapParams &aConfig, const std::vector< std::string > &types)
Definition: XMLConfigReader.cc:59
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
XMLConfigReader::readConfig
void readConfig(const std::string fName)
XMLConfigReader::setConfigFile
void setConfigFile(const std::string &fName)
Definition: XMLConfigReader.h:33
XMLConfigReader::patternsFile
std::string patternsFile
Definition: XMLConfigReader.h:53
types
types
Definition: AlignPCLThresholds_PayloadInspector.cc:30
GoldenPattern
Definition: GoldenPattern.h:44
XMLConfigReader::getPatternsVersion
unsigned int getPatternsVersion() const
Definition: XMLConfigReader.cc:132
XMLConfigReader::setEventsFile
void setEventsFile(const std::string &fName)
Definition: XMLConfigReader.h:37
XMLConfigReader::buildGP
std::unique_ptr< GoldenPattern > buildGP(xercesc::DOMElement *aGPElement, const L1TMuonOverlapParams &aConfig, unsigned int index=0, unsigned int aGPNumber=999)
Definition: XMLConfigReader.cc:231
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
XMLConfigReader::aGPs
std::vector< std::shared_ptr< GoldenPattern > > aGPs
Cache with GPs read.
Definition: XMLConfigReader.h:65
XMLConfigReader::eventsFile
std::string eventsFile
Definition: XMLConfigReader.h:54