CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
8 #include "xercesc/util/XercesDefs.hpp"
9 #include "xercesc/dom/DOM.hpp"
10 
13 
14 class GoldenPattern;
15 class OMTFConfiguration;
17 
18 
19 namespace XERCES_CPP_NAMESPACE{
20 
21 class DOMElement;
22 class XercesDOMParser;
23 
24 }
25 
27 
28  public:
29 
30  XMLConfigReader(OMTFConfiguration * omtf_config);
31 
32  void readConfig(const std::string fName);
33 
34  void setConfigFile(const std::string & fName) {configFile = fName;}
35 
36  void setPatternsFile(const std::string & fName) {patternsFile = fName;}
37 
38  void setEventsFile(const std::string & fName) {eventsFile = fName;}
39 
40  std::vector<GoldenPattern*> readPatterns();
41 
42  void readLUT(l1t::LUT *lut, const std::string & type);
43 
44  void readConfig(OMTFConfiguration *aConfig);
45 
46  void readConfig(L1TMuonOverlapParams *aConfig);
47 
48  std::vector<std::vector<int> > readEvent(unsigned int iEvent=0,
49  unsigned int iProcessor=0,
50  bool readEta = false);
51 
52  private:
53 
54  std::string configFile; //XML file with general configuration
55  std::string patternsFile; //XML file with GoldenPatterns
56  std::string eventsFile; //XML file with events
57 
58  GoldenPattern * buildGP(xercesc::DOMElement* aGPElement,
59  unsigned int index=0);
60 
61  xercesc::XercesDOMParser *parser;
62  xercesc::DOMDocument* doc;
63 
65  std::vector<GoldenPattern*> aGPs;
66 
68 };
69 
70 
73 #endif
type
Definition: HCALResponse.h:21
GoldenPattern * buildGP(xercesc::DOMElement *aGPElement, unsigned int index=0)
xercesc::DOMDocument * doc
OMTFConfiguration * m_omtf_config
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:230
XMLConfigReader(OMTFConfiguration *omtf_config)
tuple lut
Definition: lumiPlot.py:244
void readLUT(l1t::LUT *lut, const std::string &type)
void readConfig(const std::string fName)
std::string eventsFile
void setPatternsFile(const std::string &fName)
xercesc::XercesDOMParser * parser
void setConfigFile(const std::string &fName)
void setEventsFile(const std::string &fName)
Definition: LUT.h:29
std::vector< GoldenPattern * > aGPs
Cache with GPs read.
std::vector< GoldenPattern * > readPatterns()
std::string configFile