Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #include "SSim.hh"
0002 #include "CSGFoundry.h"
0003 #include "OPTICKS_LOG.hh"
0004 
0005 int main(int argc, char** argv)
0006 {
0007     OPTICKS_LOG(argc, argv); 
0008 
0009     SSim::Create(); 
0010 
0011     CSGFoundry* fd = CSGFoundry::Load(); 
0012     LOG_IF(fatal, fd==nullptr) << CSGFoundry::LoadFailNotes() ; 
0013     if(fd == nullptr) return 1 ;  
0014 
0015     LOG(info) << "foundry " << fd->desc() ; 
0016     fd->summary(); 
0017 
0018     unsigned numPrim = fd->getNumPrim() ; 
0019     assert( fd->prim.size() == numPrim ); 
0020 
0021     for(unsigned primIdx=0 ; primIdx < std::min(10000u, numPrim) ; primIdx++)
0022     {
0023         const CSGPrim* pr = fd->getPrim(primIdx); 
0024 
0025         std::cout << std::endl ; 
0026         //std::cout << pr->desc() << std::endl ; 
0027 
0028         for(int nodeIdx=pr->nodeOffset() ; nodeIdx < pr->nodeOffset() + pr->numNode() ; nodeIdx++)
0029         {
0030             const CSGNode* nd = fd->getNode(nodeIdx); 
0031             std::cout << nd->desc()  ; 
0032         }
0033     }
0034     std::cout << std::endl ; 
0035 
0036     return 0 ; 
0037 }
0038