File indexing completed on 2026-04-10 07:50:27
0001
0002
0003
0004
0005
0006
0007 #include "spath.h"
0008 #include "OPTICKS_LOG.hh"
0009 #include "U4GDML.h"
0010
0011 int main(int argc, char** argv)
0012 {
0013 OPTICKS_LOG(argc, argv);
0014
0015 const char* srcpath = argc > 1 ? argv[1] : nullptr ;
0016 if(srcpath == nullptr) return 0 ;
0017
0018 const char* dstpath = spath::Resolve("$TMP/U4GDMLTest/out.gdml") ;
0019 sdirectory::MakeDirsForFile(dstpath);
0020
0021 const G4VPhysicalVolume* world = U4GDML::Read(srcpath) ;
0022
0023 U4GDML::Write(world, dstpath );
0024
0025 LOG(info)
0026 << " argv[0] " << argv[0] << std::endl
0027 << " srcpath " << ( srcpath ? srcpath : "-" ) << std::endl
0028 << " dstpath " << ( dstpath ? dstpath : "-" ) << std::endl
0029 << " world " << ( world ? "Y" : "N" ) << std::endl
0030 ;
0031
0032 return 0 ;
0033 }
0034