GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
testXMLCopy.cc
1 #include <gearimpl/GearMgrImpl.h>
2 //#include <gearxml/XMLHandlerMgr.h>
3 //#include <gearxml/tinyxml.h>
4 #include <gearxml/GearXML.h>
5 #include <iostream>
6 
7 using namespace gear;
8 using namespace std;
9 
14 int main(int argc,char* argv[])
15 {
16 
17  if (argc != 3)
18  {
19  cout << "usage: " << argv[0] << " gearfile_IN.xml gearfile_OUT.xml " << endl;
20  return 1;
21  }
22 
23  GearXML *xmlmgr = new GearXML( argv[1] );
24 
25  GearMgr *mgr = xmlmgr->createGearMgr();
26 
27  xmlmgr->createXMLFile ( mgr, argv[2] ) ;
28 
29 
30  //-----
31 
32  delete xmlmgr ;
33  delete mgr ;
34 }
GearMgr * createGearMgr()
Creates an instance of GearMgr from the data given in the XML file.
Definition: GearXML.cc:473
Implementation of GEAR using XML.
Definition: GearXML.h:18
static void createXMLFile(GearMgr *mgr, const std::string &fileName)
Write an XML file to disk from the given GearMgr object.
Definition: GearXML.cc:50
Abstract interface for a manager class that returns the Gear classes for the relevant subdetectors...
Definition: GearMgr.h:36