CMS 3D CMS Logo

RPCPatternsParser.h
Go to the documentation of this file.
1 #ifndef L1Trigger_RPCPatternsParser_h
2 #define L1Trigger_RPCPatternsParser_h
3 /*******************************************************************************
4 * *
5 * Karol Bunkowski *
6 * Warsaw University 2005 *
7 * *
8 *******************************************************************************/
9 
10 #include <string>
11 #include <iostream>
12 
13 #include <xercesc/sax2/Attributes.hpp>
14 #include <xercesc/sax2/DefaultHandler.hpp>
15 
18 //#include "L1Trigger/RPCTrigger/interface/RPCException.h"
19 
20 class RPCPatternsParser : public XERCES_CPP_NAMESPACE::DefaultHandler {
21 public:
22  //class SAX2PatHandler : public DefaultHandler {
23  //public:
24  // SAX2PatHandler();
25  // ~SAX2PatHandler();
26 
27  // void startElement(const XMLCh* const uri, const XMLCh* const localname,
28  // const XMLCh* const qname, const Attributes& attrs);
29 
30  // void endElement (const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname);
31  //};
32 
34  ~RPCPatternsParser() override;
35 
36  void startElement(const XMLCh* const uri,
37  const XMLCh* const localname,
38  const XMLCh* const qname,
39  const XERCES_CPP_NAMESPACE::Attributes& attrs) override;
40 
41  void endElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname) override;
42 
44 
46 
47  const RPCPattern::RPCPatVec& getPatternsVec(const int tower, const int sc, const int sg) const;
48 
49  const RPCPattern::TQualityVec& getQualityVec() const { //XXX - clean me!
50  return m_QualityVec;
51  };
52 
53 private:
54  //virtual void startElement(const XMLCh* const name, xercesc::AttributeList& attributes);
55 
56  //virtual void endElement(const XMLCh* const name);
57 
58  static int m_InstanceCount;
59 
61 
63 
64  typedef std::map<RPCConst::l1RpcConeCrdnts, RPCPattern::RPCPatVec> TPatternsVecsMap;
65 
66  TPatternsVecsMap m_PatternsVecsMap;
67 
68  TPatternsVecsMap::iterator m_CurPacIt;
69 
71 };
72 
73 #endif
The coordinates of Logic Cone: m_Tower, m_LogSector, m_LogSegment.
Definition: RPCConst.h:118
TPatternsVecsMap::iterator m_CurPacIt
RPCPattern::TQualityVec m_QualityVec
std::vector< RPCPattern > RPCPatVec
Definition: RPCPattern.h:36
TPatternsVecsMap m_PatternsVecsMap
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
const RPCPattern::RPCPatVec & getPatternsVec(const RPCConst::l1RpcConeCrdnts &coneCrds) const
std::string m_CurrElement
static int m_InstanceCount
std::vector< TQuality > TQualityVec
Definition: RPCPattern.h:49
std::map< RPCConst::l1RpcConeCrdnts, RPCPattern::RPCPatVec > TPatternsVecsMap
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES_CPP_NAMESPACE::Attributes &attrs) override
const RPCPattern::TQualityVec & getQualityVec() const
~RPCPatternsParser() override
void parse(std::string fileName)