Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /**
0002 G4CXRenderTest.cc
0003 ===================
0004 
0005 TODO: investigate if SEvt could be used in render mode too
0006 (eg to save the frame and image files) in order
0007 to make environment more similar in all modes
0008 
0009 The SEventConfig::Initialize is needed to SetDevice
0010 otherwise CSGOptiX instanciation is skipped.
0011 
0012 **/
0013 #include <cuda_runtime.h>
0014 #include "SEventConfig.hh"
0015 #include "OPTICKS_LOG.hh"
0016 #include "G4CXOpticks.hh"
0017 
0018 int main(int argc, char** argv)
0019 {
0020     OPTICKS_LOG(argc, argv);
0021 
0022     LOG(info) << "[ cu first " ;
0023     cudaDeviceSynchronize();
0024     LOG(info) << "] cu first " ;
0025 
0026     SEventConfig::SetRGModeRender();
0027     SEventConfig::Initialize();   // for simulation this auto-called from SEvt::SEvt
0028 
0029     LOG(info) << "[ SetGeometry " ;
0030     G4CXOpticks* gx = G4CXOpticks::SetGeometry() ;  // sensitive to SomGDMLPath, GEOM, CFBASE
0031     LOG(info) << "] SetGeometry " ;
0032 
0033     gx->render();       // sensitive to MOI, EYE, LOOK, UP
0034 
0035     return 0 ;
0036 }