EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TGeoToGdml.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TGeoToGdml.C
1 // assuming the file contains our PHGeometry
2 void TGeoToGdml(const char *infile="genfitGeom_AllSi_v3.root", const char *tgeoobj="FAIRGeom")
3 {
4  TFile *f = TFile::Open(infile);
5  TGeoManager *geomanager = ( TGeoManager *) f->Get(tgeoobj);
6  char outfilename[200];
7  sprintf(outfilename,"%s.gdml",tgeoobj);
8  geomanager->Export(outfilename);
9  gSystem->Exit(0);
10 }