Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:49:24

0001 #include "SSys.hh"
0002 #include "SSim.hh"
0003 #include "scuda.h"
0004 #include "CSGFoundry.h"
0005 
0006 #include "OPTICKS_LOG.hh"
0007 
0008 
0009 void test_findSolidIdx(const CSGFoundry* fd, int argc, char** argv)
0010 {
0011     LOG(info) << "[" ; 
0012     std::vector<unsigned> solid_selection ; 
0013     for(int i=1 ; i < argc ; i++)
0014     {
0015         const char* sla = argv[i] ;  
0016         solid_selection.clear(); 
0017         fd->findSolidIdx(solid_selection, sla );   
0018 
0019         LOG(info) 
0020             << " SLA " << sla 
0021             << " solid_selection.size " << solid_selection.size() 
0022             << std::endl 
0023             << fd->descSolids(solid_selection) 
0024             ; 
0025 
0026 
0027          for(int j=0 ; j < int(solid_selection.size()) ; j++)
0028          {
0029              unsigned solidIdx = solid_selection[j]; 
0030              LOG(info) << fd->descPrim(solidIdx) ;  
0031              LOG(info) << fd->descNode(solidIdx) ;  
0032              LOG(info) << fd->descTran(solidIdx) ;  
0033          }
0034     }
0035     LOG(info) << "]"  ;
0036     LOG_IF(error, argc == 1) << " enter args such as r0/r1/r2/r3/... to select and dump composite solids " ; 
0037  
0038 }
0039 
0040 int main(int argc, char** argv)
0041 {
0042     OPTICKS_LOG(argc, argv); 
0043 
0044     SSim::Create(); 
0045     CSGFoundry* fd = CSGFoundry::Load(); 
0046  
0047     LOG(info) << "foundry " << fd->desc() ; 
0048     fd->summary(); 
0049 
0050     test_findSolidIdx(fd, argc, argv); 
0051 
0052     return 0 ; 
0053 }
0054 
0055 
0056 
0057