Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
XMLFixCollTypes.h
1 #ifndef XMLFixCollTypes_h
2 #define XMLFixCollTypes_h 1
3 
4 
5 #include <fstream>
6 #include <string>
7 #include <iostream>
8 
9 class TiXmlNode ;
10 class TiXmlDocument ;
11 
12 namespace marlin{
13 
14 
15 
26 
27 
28  public:
29 
30 
31 
32  XMLFixCollTypes( const std::string& fileName ) ;
33  virtual ~XMLFixCollTypes() ;
34 
35 
37  void parse(const std::string& filename ) ;
38 
39  protected:
40 
41 
43  const char* getAttribute( TiXmlNode* node , const std::string& name ) ;
44 
45 
47  TiXmlNode* findElement( TiXmlNode* node , const std::string& type,
48  const std::string& attribute, const std::string& value ) ;
49 
50 
51  TiXmlDocument* _doc ;
52 
53  std::string _fileName ;
54 
55  private:
56  XMLFixCollTypes() = delete;
58  XMLFixCollTypes& operator=(const marlin::XMLFixCollTypes&) = delete;
59  };
60 
61 } // end namespace marlin
62 #endif
63 
TiXmlNode * findElement(TiXmlNode *node, const std::string &type, const std::string &attribute, const std::string &value)
Helper method - finds child element of node with given type and attribute value.
Definition: XMLFixCollTypes.cc:241
Always the top level node.
Definition: tinyxml.h:1366
void parse(const std::string &filename)
Parse the input file and write the fixed outputfile to filename.
Definition: XMLFixCollTypes.cc:22
The parent class for everything in the Document Object Model.
Definition: tinyxml.h:425
const char * getAttribute(TiXmlNode *node, const std::string &name)
Return named attribute - throws ParseException if attribute doesn&#39;t exist.
Definition: XMLFixCollTypes.cc:219
Internal helper class that creates a new xml steering file with the parameter attributes lcioInType a...
Definition: XMLFixCollTypes.h:25