Skip to content

Commit 6439904

Browse files
simoncblythplexoos
authored andcommitted
rename qudarap/QEvent.hh to qudarap/QEvt.hh to avoid name clash when using Geant4 with Qt viz driver that Nicola reports caused some vtable related crash
1 parent 051b22d commit 6439904

46 files changed

Lines changed: 1108 additions & 1105 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CSGOptiX/CSGOptiX.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ HMM: looking like getting qudarap/qsim.h to work with OptiX < 7 is more effort t
7676
#include "QU.hh"
7777
#include "QSim.hh"
7878
#include "qsim.h"
79-
#include "QEvent.hh"
79+
#include "QEvt.hh"
8080

8181
// CSGOptiX
8282
#include "Frame.h"
@@ -250,7 +250,7 @@ CSGOptiX::InitSim
250250
-------------------
251251
252252
Invoked from CSGOptiX::Create
253-
Instanciation of QSim/QEvent requires an SEvt instance
253+
Instanciation of QSim/QEvt requires an SEvt instance
254254
255255
**/
256256

@@ -422,7 +422,7 @@ CSGOptiX::CSGOptiX(const CSGFoundry* foundry_)
422422
kernel_dt(0.),
423423
sctx(nullptr),
424424
sim(QSim::Get()),
425-
event(sim == nullptr ? nullptr : sim->event)
425+
qev(sim == nullptr ? nullptr : sim->qev)
426426
{
427427
init();
428428
}
@@ -436,7 +436,7 @@ void CSGOptiX::init()
436436
<< " raygenmode " << raygenmode
437437
<< " SRG::Name(raygenmode) " << SRG::Name(raygenmode)
438438
<< " sim " << sim
439-
<< " event " << event
439+
<< " qev " << qev
440440
;
441441

442442
assert( outdir && "expecting OUTDIR envvar " );
@@ -550,7 +550,7 @@ Check (QSim)sim instance for non-render modes
550550
void CSGOptiX::initCheckSim()
551551
{
552552
if(SEventConfig::IsRGModeRender()) return ;
553-
LOG(LEVEL) << " sim " << sim << " event " << event ;
553+
LOG(LEVEL) << " sim " << sim << " qev " << qev ;
554554
LOG_IF(fatal, sim == nullptr) << "simtrace/simulate modes require instanciation of QSim before CSGOptiX " ;
555555
assert(sim);
556556
}
@@ -609,7 +609,7 @@ Q: where are sim and evt uploaded ?
609609
A: QSim::QSim and QSim::init_sim are where sim and evt are populated and uploaded
610610
611611
612-
HMM: get d_sim (qsim.h) now holds d_evt (qevent.h) but this is getting evt again rom QEvent ?
612+
HMM: get d_sim (qsim.h) now holds d_evt (sevent.h) but this is getting evt again rom QEvt ?
613613
TODO: eliminate params->evt to make more use of the qsim.h encapsulation
614614
615615
**/
@@ -618,7 +618,7 @@ void CSGOptiX::initSimulate()
618618
{
619619
LOG(LEVEL) ;
620620
params->sim = sim ? sim->getDevicePtr() : nullptr ; // qsim<float>*
621-
params->evt = event ? event->getDevicePtr() : nullptr ; // qevent*
621+
params->evt = qev ? qev->getDevicePtr() : nullptr ; // sevent*
622622

623623
params->tmin0 = SEventConfig::PropagateEpsilon0() ; // epsilon used after step points with flags in below mask
624624
params->PropagateEpsilon0Mask = SEventConfig::PropagateEpsilon0Mask(); // eg from CK|SI|TO|SC|RE
@@ -1002,7 +1002,7 @@ CSGOptiX::prepareParamSimulate
10021002
10031003
Per-event simulate setup invoked just prior to optix launch
10041004
1005-
QSim::get_photon_slot_offset/QEvent::get_photon_slot_offset returns
1005+
QSim::get_photon_slot_offset/QEvt::get_photon_slot_offset returns
10061006
10071007
**/
10081008

@@ -1072,22 +1072,22 @@ double CSGOptiX::launch()
10721072
bool DEBUG_SKIP_LAUNCH = ssys::getenvbool("CSGOptiX__launch_DEBUG_SKIP_LAUNCH") ;
10731073

10741074
prepareParam();
1075-
if(raygenmode != SRG_RENDER) assert(event) ;
1075+
if(raygenmode != SRG_RENDER) assert(qev) ;
10761076

10771077
unsigned width = 0 ;
10781078
unsigned height = 0 ;
10791079
unsigned depth = 0 ;
10801080
switch(raygenmode)
10811081
{
10821082
case SRG_RENDER: { width = params->width ; height = params->height ; depth = params->depth ; } ; break ;
1083-
case SRG_SIMTRACE: { width = event->getNumSimtrace() ; height = 1 ; depth = 1 ; } ; break ;
1084-
case SRG_SIMULATE: { width = event->getNumPhoton() ; height = 1 ; depth = 1 ; } ; break ;
1083+
case SRG_SIMTRACE: { width = qev->getNumSimtrace() ; height = 1 ; depth = 1 ; } ; break ;
1084+
case SRG_SIMULATE: { width = qev->getNumPhoton() ; height = 1 ; depth = 1 ; } ; break ;
10851085
}
10861086

10871087
bool expect = width > 0 ;
10881088
LOG_IF(fatal, !expect)
1089-
<< " event.getNumSimtrace " << ( event ? event->getNumSimtrace() : -1 )
1090-
<< " event.getNumPhoton " << ( event ? event->getNumPhoton() : -1 )
1089+
<< " qev.getNumSimtrace " << ( qev ? qev->getNumSimtrace() : -1 )
1090+
<< " qev.getNumPhoton " << ( qev ? qev->getNumPhoton() : -1 )
10911091
<< " width " << width
10921092
<< " height " << height
10931093
<< " depth " << depth

CSGOptiX/CSGOptiX.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct CSGView ;
3535

3636
template <typename T> struct Tran ;
3737
struct QSim ;
38-
struct QEvent ;
38+
struct QEvt ;
3939

4040
struct Params ;
4141
class Opticks ;
@@ -105,7 +105,7 @@ struct CSGOPTIX_API CSGOptiX : public SCSGOptiX
105105

106106
scontext* sctx ;
107107
QSim* sim ;
108-
QEvent* event ;
108+
QEvt* qev ;
109109

110110
const char* desc() const ;
111111

CSGOptiX/Frame.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Instanciated by:
3636
Accepting device buffer pointer arguments was done to allow this
3737
class to be used with OptiX 6 workflow optix::Buffer
3838
39-
HMM: could use QEvent to hold the pixel, isect, photon ?
39+
HMM: could use QEvt to hold the pixel, isect, photon ?
4040
**/
4141

4242

CSGOptiX/cxs_min.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ fi
621621
logging(){
622622
export CSGFoundry=INFO
623623
export CSGOptiX=INFO
624-
export QEvent=INFO
624+
export QEvt=INFO
625625
export QSim=INFO
626626
#export SEvt__LIFECYCLE=1
627627
export SEvt__GATHER=1

CSGOptiX/cxs_raindrop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ loglevels()
7676
{
7777
export Dummy=INFO
7878
#export SEvt=INFO
79-
#export QEvent=INFO
79+
#export QEvt=INFO
8080
#export QSim=INFO
8181
}
8282
loglevels

CSGOptiX/cxt_min.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export CEHIGH_1=-16:16:0:0:4:8:2000:4
207207
logging(){
208208
type $FUNCNAME
209209
export CSGOptiX=INFO
210-
export QEvent=INFO
210+
export QEvt=INFO
211211
#export QSim=INFO
212212
#export SFrameGenstep=INFO
213213
#export CSGTarget=INFO

CSGOptiX/cxt_precision.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export OPTICKS_INTEGRATION_MODE=1
8181
logging(){
8282
type $FUNCNAME
8383
#export CSGOptiX=INFO
84-
#export QEvent=INFO
84+
#export QEvt=INFO
8585
#export QSim=INFO
8686
#export SFrameGenstep=INFO
8787
#export CSGTarget=INFO

CSGOptiX/tests/CSGOptiXSimtraceTest.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ is to be able to see the exact same geometry that the simulation is using.
3737
#include "SEvt.hh"
3838
#include "SFrameGenstep.hh"
3939
#include "SEventConfig.hh"
40-
#include "QEvent.hh"
4140

4241
#include "OPTICKS_LOG.hh"
4342
#include "CSGFoundry.h"

CSGOptiX/tests/CXRaindropTest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char** argv)
4242

4343
float4 ce = make_float4( 0.f, 0.f, 0.f, 100.f ); // TODO: this should come from the geometry
4444

45-
SEventConfig::SetMaxExtentDomain( ce.w ); // must do this config before QEvent::init which happens with CSGOptiX instanciation
45+
SEventConfig::SetMaxExtentDomain( ce.w ); // must do this config before QEvt::init which happens with CSGOptiX instanciation
4646
SEventConfig::SetMaxTimeDomain( 10.f );
4747

4848
CSGOptiX* cx = CSGOptiX::Create(fdl); // encumbent SSim used for QSim setup in here

g4cx/gxr.sh

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/bash -l
1+
#!/bin/bash
22
usage(){ cat << EOU
3-
gxr.sh : G4CXRenderTest
3+
gxr.sh : G4CXRenderTest
44
=============================================================================================================
55
66
::
77
88
cd ~/opticks/g4cx # gx
9-
./gxr.sh
9+
./gxr.sh
1010
./gxr.sh run
1111
./gxr.sh dbg
1212
./gxr.sh grab
@@ -17,14 +17,14 @@ gxr.sh : G4CXRenderTest
1717
analog delta times more than 2% of total
1818
--------------------------------------------------
1919
20-
See bin/log.py for logfile analysis with time filtering
20+
See bin/log.py for logfile analysis with time filtering
2121
2222
EOU
2323
}
2424

2525
msg="=== $BASH_SOURCE :"
2626

27-
case $(uname) in
27+
case $(uname) in
2828
Linux) defarg="run" ;;
2929
Darwin) defarg="ls" ;;
3030
esac
@@ -43,19 +43,19 @@ bin=G4CXRenderTest
4343
log=$bin.log
4444
gxrdir=$(dirname $BASH_SOURCE)
4545

46-
source $gxrdir/../bin/COMMON.sh
46+
source $gxrdir/../bin/COMMON.sh
4747

4848
## bin/COMMON sources bin/GEOM_.sh and bin/OPTICKS_INPUT_PHOTON.sh
4949
## BUT the content of those is very user specific so have moved
50-
## geometry to $HOME/.opticks/GEOM/GEOM.sh
51-
## THIS KINDA THING IS IN USERLAND BUT COULD SUGGEST
50+
## geometry to $HOME/.opticks/GEOM/GEOM.sh
51+
## THIS KINDA THING IS IN USERLAND BUT COULD SUGGEST
5252
## INPUT PHOTONS ALSO CONFIGURED IN THE SAME GEOM.sh FILE
53-
## OR FILES THAT THAT FILE SOURCES
53+
## OR FILES THAT THAT FILE SOURCES
5454

5555

5656
eye=-0.4,0,0
5757
moi=-1
58-
export EYE=${EYE:-$eye}
58+
export EYE=${EYE:-$eye}
5959
export MOI=${MOI:-$moi}
6060

6161

@@ -75,9 +75,9 @@ loglevels()
7575
export SSim=INFO
7676
export SBT=INFO
7777
export IAS_Builder=INFO
78-
#export QEvent=INFO
78+
#export QEvt=INFO
7979
export CSGOptiX=INFO
80-
export G4CXOpticks=INFO
80+
export G4CXOpticks=INFO
8181
export CSGFoundry=INFO
8282
#export GInstancer=INFO
8383
#export X4PhysicalVolume=INFO
@@ -88,64 +88,64 @@ loglevels
8888

8989

9090

91-
if [ "run" == "$arg" ]; then
92-
echo $msg run $bin log $log
93-
if [ -f "$log" ]; then
94-
rm $log
95-
fi
91+
if [ "run" == "$arg" ]; then
92+
echo $msg run $bin log $log
93+
if [ -f "$log" ]; then
94+
rm $log
95+
fi
9696

9797
$bin
98-
[ $? -ne 0 ] && echo $BASH_SOURCE run error && exit 1
99-
fi
98+
[ $? -ne 0 ] && echo $BASH_SOURCE run error && exit 1
99+
fi
100100

101-
if [ "dbg" == "$arg" ]; then
101+
if [ "dbg" == "$arg" ]; then
102102
case $(uname) in
103103
Linux) gdb $bin -ex r ;;
104-
Darwin) lldb__ $bin ;;
104+
Darwin) lldb__ $bin ;;
105105
esac
106-
[ $? -ne 0 ] && echo $BASH_SOURCE dbg error && exit 2
106+
[ $? -ne 0 ] && echo $BASH_SOURCE dbg error && exit 2
107107
fi
108108

109109

110110
if [ "grablog" == "$arg" ]; then
111111
scp P:opticks/g4cx/$log .
112-
fi
112+
fi
113113

114-
if [ "analog" == "$arg" ]; then
115-
echo $msg analog log $log
116-
if [ -f "$log" ]; then
117-
LOG=$log $gxrdir/../bin/log.sh
118-
fi
119-
fi
114+
if [ "analog" == "$arg" ]; then
115+
echo $msg analog log $log
116+
if [ -f "$log" ]; then
117+
LOG=$log $gxrdir/../bin/log.sh
118+
fi
119+
fi
120120

121121

122-
# FOLD is not an input to C++ running, but it is used by the below : ls ana grab jpg
122+
# FOLD is not an input to C++ running, but it is used by the below : ls ana grab jpg
123123
export FOLD=/tmp/$USER/opticks/$GEOM/$bin
124124
name=cx$MOI.jpg
125125
path=$FOLD/$name
126126

127-
if [ "ls" == "$arg" ]; then
128-
echo $msg FOLD $FOLD
127+
if [ "ls" == "$arg" ]; then
128+
echo $msg FOLD $FOLD
129129
echo $msg date $(date)
130130
ls -alst $FOLD
131-
fi
131+
fi
132132

133-
if [ "ana" == "$arg" ]; then
133+
if [ "ana" == "$arg" ]; then
134134
export CFBASE=$FOLD
135-
${IPYTHON:-ipython} --pdb -i tests/$bin.py
136-
[ $? -ne 0 ] && echo $BASH_SOURCE ana error && exit 3
137-
fi
135+
${IPYTHON:-ipython} --pdb -i tests/$bin.py
136+
[ $? -ne 0 ] && echo $BASH_SOURCE ana error && exit 3
137+
fi
138138

139-
if [ "grab" == "$arg" ]; then
139+
if [ "grab" == "$arg" ]; then
140140
source ../bin/rsync.sh $FOLD
141-
open $path
142-
fi
141+
open $path
142+
fi
143143

144-
if [ "jpg" == "$arg" ]; then
144+
if [ "jpg" == "$arg" ]; then
145145
mkdir -p $(dirname $path)
146-
scp P:$path $path
147-
open $path
148-
fi
146+
scp P:$path $path
147+
open $path
148+
fi
149149

150-
exit 0
150+
exit 0
151151

0 commit comments

Comments
 (0)