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 
20 namespace XERCES_CPP_NAMESPACE{
21 
22 class DOMElement;
23 class XercesDOMParser;
24 
25 }
26 
28 
29  public:
30 
32  ~XMLConfigReader();
33 
34  void readConfig(const std::string fName);
35 
36  void setConfigFile(const std::string & fName) {configFile = fName;}
37 
38  void setPatternsFile(const std::string & fName) {patternsFile = fName;}
39 
40  void setEventsFile(const std::string & fName) {eventsFile = fName;}
41 
42  std::vector<std::shared_ptr<GoldenPattern>> readPatterns(const L1TMuonOverlapParams &aConfig);
43 
44  void readLUT(l1t::LUT *lut, const L1TMuonOverlapParams & aConfig, const std::string & type);
45 
46  void readConfig(L1TMuonOverlapParams *aConfig) const;
47 
48  unsigned int getPatternsVersion() const;
49 
50  std::vector<std::vector<int> > readEvent(unsigned int iEvent=0,
51  unsigned int iProcessor=0,
52  bool readEta = false);
53 
54  private:
55 
56  std::string configFile; //XML file with general configuration
57  std::string patternsFile; //XML file with GoldenPatterns
58  std::string eventsFile; //XML file with events
59 
60  std::unique_ptr<GoldenPattern> buildGP(xercesc::DOMElement* aGPElement,
61  const L1TMuonOverlapParams & aConfig,
62  unsigned int index=0,
63  unsigned int aGPNumber=999);
64 
65  // xercesc::XercesDOMParser *parser;
66  // xercesc::DOMDocument* doc;
67 
69  std::vector<std::shared_ptr<GoldenPattern>> aGPs;
70 
71 };
72 
73 #endif
type
Definition: HCALResponse.h:21
std::string patternsFile
int iEvent
Definition: GenABIO.cc:230
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)
Definition: LUT.h:29
std::shared_ptr< ParameterSet > readConfig(std::string const &config)
std::string configFile