Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #pragma once
0002 /**
0003 SSimulator.h : pure virtual interface used from QSim, G4CXOpticks, CSGOptiX
0004 =============================================================================
0005 
0006 Note:
0007 
0008 1. this protocol interface does not currently depend on any Opticks types,
0009    making it usable from any level of the package heirarchy
0010 
0011 2. ctor and convenience statics such as Create are not part of this interface
0012 
0013 **/
0014 
0015 
0016 struct SSimulator
0017 {
0018     virtual ~SSimulator() = default ;
0019 
0020     // low level API that enables QSim to control CSGOptiX irrespective of pkg dependency
0021     virtual double render_launch() = 0 ;
0022     virtual double simtrace_launch() = 0 ;
0023     virtual double simulate_launch() = 0 ;
0024     virtual double launch() = 0 ;
0025 
0026     // informational
0027     virtual const char* desc() const = 0 ;
0028 
0029     // high level API that G4CXOpticks uses to control for example the CSGOptiX local GPU backend
0030     virtual double simulate(int eventID, bool reset = false) = 0 ;
0031     virtual double simtrace(int eventID) = 0 ;
0032     virtual double render(const char* stem = nullptr) = 0 ;
0033     virtual void reset(int eventID) = 0 ;
0034 
0035 };
0036 
0037 
0038 
0039 
0040 
0041