ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4DAWNFILESceneHandler.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4DAWNFILESceneHandler.hh
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//
28
// Satoshi TANAKA
29
30
#ifndef G4DAWNFILE_SCENE_HANDLER_HH
31
#define G4DAWNFILE_SCENE_HANDLER_HH
32
33
#include "
globals.hh
"
34
35
#include "
G4VSceneHandler.hh
"
36
37
#include "
G4FRofstream.hh
"
38
#include "
G4FRConst.hh
"
39
40
41
class
G4VisAttributes
;
42
class
G4DAWNFILE
;
43
44
45
//-----
46
class
G4DAWNFILESceneHandler
:
public
G4VSceneHandler
{
47
48
friend
class
G4DAWNFILEViewer
;
49
50
public
:
51
52
//----- constructor and destructor
53
G4DAWNFILESceneHandler
(
G4DAWNFILE
&
system
,
const
G4String
&
name
=
""
);
54
virtual
~G4DAWNFILESceneHandler
();
55
56
//----- overriding base class methods
57
void
AddPrimitive
(
const
G4Polyline
& line);
58
void
AddPrimitive
(
const
G4Polyhedron
&
p
);
59
void
AddPrimitive
(
const
G4Text
&);
60
void
AddPrimitive
(
const
G4Circle
&);
61
void
AddPrimitive
(
const
G4Square
&);
62
63
//----- explicitly invoke base class methods to avoid warnings about
64
//----- hiding of base class methods.
65
void
AddPrimitive
(
const
G4Polymarker
& polymarker)
66
{
G4VSceneHandler::AddPrimitive
(polymarker); }
67
void
AddPrimitive
(
const
G4Scale
&
scale
)
68
{
G4VSceneHandler::AddPrimitive
(scale); }
69
70
virtual
void
BeginModeling
() {
G4VSceneHandler::BeginModeling
();}
71
virtual
void
EndModeling
() {
G4VSceneHandler::EndModeling
();}
72
73
virtual
void
BeginPrimitives
(
const
G4Transform3D
& objectTransformation);
74
virtual
void
EndPrimitives
();
75
76
void
AddSolid
(
const
G4Box
&
box
);
77
void
AddSolid
(
const
G4Cons
& cons );
78
void
AddSolid
(
const
G4Tubs
& tubs );
79
void
AddSolid
(
const
G4Trd
& trd );
80
void
AddSolid
(
const
G4Trap
& trap );
81
void
AddSolid
(
const
G4Sphere
& sphere );
82
void
AddSolid
(
const
G4Para
& para );
83
void
AddSolid
(
const
G4Torus
& torus );
84
void
AddSolid
(
const
G4Polycone
& polycone ) {
85
G4VSceneHandler::AddSolid
(polycone);
86
}
87
void
AddSolid
(
const
G4Polyhedra
& polyhedra ) {
88
G4VSceneHandler::AddSolid
(polyhedra);
89
}
90
void
AddSolid
(
const
G4Orb
& orb ) {
91
G4VSceneHandler::AddSolid
(orb);
92
}
93
void
AddSolid
(
const
G4Ellipsoid
& ellipsoid ) {
94
G4VSceneHandler::AddSolid
(ellipsoid);
95
}
96
void
AddSolid
(
const
G4TessellatedSolid
& tess ) {
97
G4VSceneHandler::AddSolid
(tess);
98
}
99
void
AddSolid
(
const
G4VSolid
& solid );
100
void
AddCompound
(
const
G4VTrajectory
& traj) {
101
G4VSceneHandler::AddCompound
(traj);
102
}
103
void
AddCompound
(
const
G4VHit
& hit) {
104
G4VSceneHandler::AddCompound
(hit);
105
}
106
void
AddCompound
(
const
G4VDigi
& digi) {
107
G4VSceneHandler::AddCompound
(digi);
108
}
109
void
AddCompound
(
const
G4THitsMap<G4double>
&
hits
) {
110
G4VSceneHandler::AddCompound
(hits);
111
}
112
void
AddCompound
(
const
G4THitsMap<G4StatDouble>
&
hits
) {
113
G4VSceneHandler::AddCompound
(hits);
114
}
115
116
void
ClearTransientStore
();
// Used for triggering detector re-drawing.
117
118
//----- public methods inherent to this class
119
void
FRBeginModeling
() ;
120
void
FREndModeling
() ;
121
G4bool
FRIsInModeling
() {
return
FRflag_in_modeling
; }
122
123
G4bool
IsSavingG4Prim
(
void
) {
return
flag_saving_g4_prim
; }
124
void
BeginSavingG4Prim
(
void
);
125
void
EndSavingG4Prim
(
void
) ;
126
void
SetG4PrimFileName
() ;
127
128
G4DAWNFILE
&
GetSystem
() {
return
fSystem
; }
129
void
SendBoundingBox
(
void
);
130
const
char
*
GetG4PrimFileName
() {
return
fG4PrimFileName
; }
131
132
133
private
:
134
135
//----- Utilities etc (common to DAWN and DAWNFILE drivers )
136
G4bool
SendVisAttributes
(
const
G4VisAttributes
* pAV );
137
G4bool
IsVisible
(
void
) ;
138
void
SendTransformedCoordinates
(
void
) ;
139
void
SendPhysVolName
(
void
) ;
140
void
SendNdiv
(
void
) ;
141
142
//----- public methods common to DAWN and DAWNFILE drivers
143
public
:
144
void
SendStr
(
const
char
* char_string ) ;
145
void
SendStrInt
(
const
char
* char_string ,
146
G4int
ival );
147
void
SendStrInt3
(
const
char
* char_string ,
148
G4int
ival1 ,
149
G4int
ival2 ,
150
G4int
ival3 );
151
void
SendStrInt4
(
const
char
* char_string ,
152
G4int
ival1 ,
153
G4int
ival2 ,
154
G4int
ival3 ,
155
G4int
ival4 );
156
void
SendStrDouble
(
const
char
* char_string ,
157
G4double
dval );
158
void
SendStrDouble2
(
const
char
* char_string ,
159
G4double
dval1 ,
160
G4double
dval2 );
161
void
SendStrDouble3
(
const
char
* char_string ,
162
G4double
dval1 ,
163
G4double
dval2 ,
164
G4double
dval3 );
165
166
void
SendStrDouble4
(
const
char
* char_string ,
167
G4double
dval1 ,
168
G4double
dval2 ,
169
G4double
dval3 ,
170
G4double
dval4 );
171
172
void
SendStrDouble5
(
const
char
* char_string ,
173
G4double
dval1 ,
174
G4double
dval2 ,
175
G4double
dval3 ,
176
G4double
dval4 ,
177
G4double
dval5 );
178
179
void
SendStrDouble6
(
const
char
* char_string ,
180
G4double
dval1 ,
181
G4double
dval2 ,
182
G4double
dval3 ,
183
G4double
dval4 ,
184
G4double
dval5 ,
185
G4double
dval6 );
186
187
void
SendStrDouble7
(
const
char
* char_string ,
188
G4double
dval1 ,
189
G4double
dval2 ,
190
G4double
dval3 ,
191
G4double
dval4 ,
192
G4double
dval5 ,
193
G4double
dval6 ,
194
G4double
dval7 );
195
196
void
SendStrDouble11
(
const
char
* char_string ,
197
G4double
dval1 ,
198
G4double
dval2 ,
199
G4double
dval3 ,
200
G4double
dval4 ,
201
G4double
dval5 ,
202
G4double
dval6 ,
203
G4double
dval7 ,
204
G4double
dval8 ,
205
G4double
dval9 ,
206
G4double
dval10 ,
207
G4double
dval11 ) ;
208
209
void
SendIntDouble3
(
G4int
ival ,
210
G4double
dval1 ,
211
G4double
dval2 ,
212
G4double
dval3 );
213
void
SendInt3Str
(
G4int
ival1 ,
214
G4int
ival2 ,
215
G4int
ival3 ,
216
const
char
* char_string );
217
void
SendInt4Str
(
G4int
ival1 ,
218
G4int
ival2 ,
219
G4int
ival3 ,
220
G4int
ival4 ,
221
const
char
* char_string );
222
223
void
SendStrDouble3Str
(
const
char
* char_string1 ,
224
G4double
dval1 ,
225
G4double
dval2 ,
226
G4double
dval3 ,
227
const
char
* char_string2 );
228
229
void
SendStrDouble6Str
(
const
char
* char_string1 ,
230
G4double
dval1 ,
231
G4double
dval2 ,
232
G4double
dval3 ,
233
G4double
dval4 ,
234
G4double
dval5 ,
235
G4double
dval6 ,
236
const
char
* char_string2 );
237
238
void
SendInt
(
G4int
val );
239
void
SendDouble
(
G4double
val );
240
241
private
:
242
G4DAWNFILE
&
fSystem
;
// Graphics system for this scene.
243
static
G4int
fSceneIdCount
;
244
245
G4FRofstream
fPrimDest
;
// defined here
246
G4bool
FRflag_in_modeling
;
247
// true: FR_BEGIN_MODELING has sent to DAWN, and
248
// FR_END_MODELING has not sent yet.
249
// false: otherwise
250
//
251
// FRflag_in_modeling is set to "true"
252
// in FRBeginModeling(), and to "false"
253
// in FREndModeling().
254
255
G4bool
flag_saving_g4_prim
;
256
257
const
int
COMMAND_BUF_SIZE
;
258
259
char
fG4PrimDestDir
[256] ;
260
char
fG4PrimFileName
[256] ;
261
G4int
fMaxFileNum
;
262
263
G4int
fPrec
,
fPrec2
;
264
265
};
266
267
#endif
geant4
tree
geant4-10.6-release
source
visualization
FukuiRenderer
include
G4DAWNFILESceneHandler.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:54
using
1.8.2 with
ECCE GitHub integration