Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:50:27

0001 #include "spath.h"
0002 
0003 #include "OPTICKS_LOG.hh"
0004 #include "U4GDML.h"
0005 #include "U4Material.hh"
0006 #include "NPFold.h"
0007 
0008 int main(int argc, char** argv)
0009 {
0010     OPTICKS_LOG(argc, argv); 
0011 
0012     const char* _origin = spath::Resolve("$HOME/.opticks/GEOM/$GEOM/origin.gdml"); 
0013     const char* srcpath = argc > 1 ? argv[1] : spath::Resolve(_origin) ; 
0014 
0015     const G4VPhysicalVolume* world = U4GDML::Read(srcpath) ;  
0016 
0017     NPFold* mats = U4Material::MakePropertyFold() ; 
0018 
0019     LOG(info) 
0020         << " argv[0] " << argv[0] << std::endl 
0021         << " srcpath " << srcpath << std::endl 
0022         << " world " << world << std::endl  
0023         ;
0024 
0025     const char* base = "$TMP/U4Material_MakePropertyFold" ; 
0026     const char* name = "U4Material" ; 
0027     const char* fold = spath::Resolve(base, name) ; 
0028 
0029     LOG(info) << std::endl << mats->desc_subfold(name) << std::endl ; 
0030 
0031     mats->save(fold); 
0032 
0033     LOG(info) << " fold [" << fold << "]" ; 
0034     return 0 ; 
0035 }