Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:52

0001 #include "OPTICKS_LOG.hh"
0002 #include "SSim.hh"
0003 #include "CSGFoundry.h"
0004 
0005 const char* FOLD = getenv("FOLD") ; 
0006 
0007 
0008 int main(int argc, char** argv)
0009 {
0010     OPTICKS_LOG(argc, argv); 
0011 
0012     SSim::Create(); 
0013     const CSGFoundry* fd = CSGFoundry::Load();
0014     std::cout << " fd.brief " << fd->brief() << std::endl ;
0015     std::cout << " fd.desc  " << fd->desc() << std::endl ;
0016 
0017     int num_mn = fd->getNumMeshName() ; 
0018     std::cout << " num_mn " << num_mn << std::endl ;
0019 
0020     for(int i=0 ; i < num_mn ; i++)
0021     {
0022         const char* mn = fd->getMeshName(i) ; 
0023         int fmi_midx = fd->findMeshIndex(mn);
0024         int gmi0_midx = fd->getMeshIndexWithName(mn, false);  
0025         int gmi1_midx = fd->getMeshIndexWithName(mn, true );  
0026 
0027         std::cout 
0028             << " i " << std::setw(4) << i 
0029             << " fmi " << std::setw(4) << fmi_midx
0030             <<  ( fmi_midx == i ? ' ' : 'x' )
0031             << " gmi0 " << std::setw(4) << gmi0_midx
0032             <<  ( gmi0_midx == i ? ' ' : 'x' )
0033             << " gmi1 "  << std::setw(4) << gmi1_midx
0034             <<  ( gmi1_midx == i ? ' ' : 'x' )
0035             << " mn " << ( mn ? mn : "-" )
0036             << std::endl
0037             ; 
0038     }
0039 
0040     return 0 ; 
0041 }
0042