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
unsigned int getPatternsVersion() const
void readLUTs(std::vector< l1t::LUT *> luts, const L1TMuonOverlapParams &aConfig, const std::vector< std::string > &types)
std::vector< std::vector< int > > readEvent(unsigned int iEvent=0, unsigned int iProcessor=0, bool readEta=false)
std::string patternsFile
int iEvent
Definition: GenABIO.cc:224
std::vector< std::shared_ptr< GoldenPattern > > readPatterns(const L1TMuonOverlapParams &aConfig)
void readConfig(const std::string fName)
std::unique_ptr< GoldenPattern > buildGP(xercesc::DOMElement *aGPElement, const L1TMuonOverlapParams &aConfig, unsigned int index=0, unsigned int aGPNumber=999)
std::vector< std::shared_ptr< GoldenPattern > > aGPs
Cache with GPs read.
std::string eventsFile
void setPatternsFile(const std::string &fName)
void setConfigFile(const std::string &fName)
void setEventsFile(const std::string &fName)
std::string configFile