Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:06

0001 /**
0002 QOpticalTest.cc
0003 ===================
0004 
0005 TODO: combine optical with bnd as they are so closely related it 
0006 makes no sense to treat them separately 
0007 
0008 **/
0009 #include <cuda_runtime.h>
0010 #include "spath.h"
0011 #include "scuda.h"
0012 #include "NP.hh"
0013 
0014 #include "QOptical.hh"
0015 
0016 int main(int argc, char** argv)
0017 {
0018     //const char* BASE = "$HOME/.opticks/GEOM/$GEOM/CSGFoundry/SSim/stree/standard" ; 
0019     //NP* optical = NP::Load(BASE, "optical.npy") ; 
0020 
0021     const char* path = spath::Resolve("$CFBaseFromGEOM/CSGFoundry/SSim/stree/standard/optical.npy"); 
0022     NP* optical = NP::Load(path) ; 
0023 
0024     if( optical == nullptr ) return 1 ; 
0025    
0026     std::cout 
0027         << " optical " << ( optical ? optical->sstr() : "-" )
0028         << std::endl 
0029         ;
0030 
0031     QOptical q_optical(optical) ; 
0032     std::cout << q_optical.desc() << std::endl ; 
0033 
0034     q_optical.check(); 
0035 
0036     cudaDeviceSynchronize(); 
0037 
0038     return 0 ; 
0039 }