ATLAS Offline Software
XMLHandler.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef XMLHandler_H
6 #define XMLHandler_H
7 
8 #include <string>
9 #include <vector>
10 #include <xercesc/dom/DOM.hpp>
11 
12 class XMLHandlerStore;
13 class AGDDController;
14 
15 class XMLHandler {
16 public:
17  XMLHandler(const std::string& n, AGDDController& c);
18  virtual ~XMLHandler() {}
19  const std::string& GetName() const {return m_name;}
21  xercesc::DOMNode *t)=0;
22  virtual void Handle(AGDDController& c,
23  xercesc::DOMNode *t)
24  {
25  ElementHandle(c, t);
26  }
27  void StopLoop(bool);
28  bool IsLoopToBeStopped() const;
29 protected:
30  std::string m_name;
31  bool m_stopLoop;
32 
33  bool isAttribute(const xercesc::DOMNode* t,
34  const std::string&) const;
35 
36  std::string getAttribute(const xercesc::DOMNode* t,
37  const std::string&, bool&) const;
39  const xercesc::DOMNode* t,
40  const std::string&) const;
42  const xercesc::DOMNode* t,
43  const std::string&) const;
45  const xercesc::DOMNode* t,
46  const std::string&) const;
47  std::vector<double> getAttributeAsVector(AGDDController& c,
48  const xercesc::DOMNode* t,
49  const std::string&) const;
50  std::vector<int> getAttributeAsIntVector(AGDDController& c,
51  const xercesc::DOMNode* t,
52  const std::string&) const;
54  const xercesc::DOMNode* t,
55  const std::string&, bool&) const;
57  const xercesc::DOMNode* t,
58  const std::string&, bool&) const;
60  const xercesc::DOMNode* t,
61  const std::string&, bool&) const;
62  std::vector<double> getAttributeAsVector(AGDDController& c,
63  const xercesc::DOMNode* t,
64  const std::string&, bool&) const;
65  std::vector<int> getAttributeAsIntVector(AGDDController& c,
66  const xercesc::DOMNode* t,
67  const std::string&, bool&) const;
69  const xercesc::DOMNode* t,
70  const std::string&, const std::string&) const;
72  const xercesc::DOMNode* t,
73  const std::string&, const double) const;
75  const xercesc::DOMNode* t,
76  const std::string&, const int) const;
77  std::vector<double> getAttributeAsVector(AGDDController& c,
78  const xercesc::DOMNode* t,
79  const std::string&, const std::vector<double>&) const;
80  std::vector<int> getAttributeAsIntVector(AGDDController& c,
81  const xercesc::DOMNode* t,
82  const std::string&, const std::vector<int>&) const;
83 
84 private:
86 };
87 
88 #endif
XMLHandler::isAttribute
bool isAttribute(const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:36
XMLHandlerStore
Definition: XMLHandlerStore.h:20
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
XMLHandler::getAttributeAsDouble
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:78
AGDDController
Definition: AGDDController.h:30
XMLHandler::GetName
const std::string & GetName() const
Definition: XMLHandler.h:19
XMLHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t)=0
beamspotman.n
n
Definition: beamspotman.py:731
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:100
XMLHandler::getAttribute
std::string getAttribute(const xercesc::DOMNode *t, const std::string &, bool &) const
Definition: XMLHandler.cxx:43
XMLHandler::m_name
std::string m_name
Definition: XMLHandler.h:30
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
XMLHandler::~XMLHandler
virtual ~XMLHandler()
Definition: XMLHandler.h:18
XMLHandler::getAttributeAsIntVector
std::vector< int > getAttributeAsIntVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:116
XMLHandler::XMLHandler
XMLHandler(const std::string &n, AGDDController &c)
Definition: XMLHandler.cxx:15
XMLHandler::Handle
virtual void Handle(AGDDController &c, xercesc::DOMNode *t)
Definition: XMLHandler.h:22
XMLHandler::m_stopLoop
bool m_stopLoop
Definition: XMLHandler.h:31
XMLHandler
Definition: XMLHandler.h:15
XMLHandler::RegisterToStore
void RegisterToStore(AGDDController &c)
Definition: XMLHandler.cxx:23
XMLHandler::getAttributeAsInt
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:89
XMLHandler::IsLoopToBeStopped
bool IsLoopToBeStopped() const
Definition: XMLHandler.cxx:32
python.compressB64.c
def c
Definition: compressB64.py:93
XMLHandler::StopLoop
void StopLoop(bool)
Definition: XMLHandler.cxx:28