76 if (newTypeDepth > 49)
106 inType[newTypeDepth] =
true;
108 fout <<
"<heprep:type version=\"null\" name=\"" << name <<
"\">"
114 #ifdef G4HEPREPFILEDEBUG
115 G4cout <<
"G4HepRepFileXMLWriter:addType No file is currently open." <<
G4endl;
131 #ifdef G4HEPREPFILEDEBUG
132 G4cout <<
"G4HepRepFileXMLWriter:addInstance No HepRep Type is currently open" <<
G4endl;
136 #ifdef G4HEPREPFILEDEBUG
137 G4cout <<
"G4HepRepFileXMLWriter:addInstance No file is currently open" <<
G4endl;
153 #ifdef G4HEPREPFILEDEBUG
154 G4cout <<
"G4HepRepFileXMLWriter:addPrimitive No HepRep Instance is currently open" <<
G4endl;
158 #ifdef G4HEPREPFILEDEBUG
159 G4cout <<
"G4HepRepFileXMLWriter:addPrimitive No file is currently open" <<
G4endl;
178 G4double xNew = scale * ( x - center.
x());
179 G4double yNew = scale * ( y - center.
y());
180 G4double zNew = scale * ( z - center.
z());
182 fout <<
"<heprep:point x=\"" << xNew <<
"\" y=\"" << yNew <<
"\" z=\"" << zNew <<
"\">" <<
G4endl;
184 #ifdef G4HEPREPFILEDEBUG
185 G4cout <<
"G4HepRepFileXMLWriter:addPoint No HepRep Primitive is currently open" <<
G4endl;
189 #ifdef G4HEPREPFILEDEBUG
190 G4cout <<
"G4HepRepFileXMLWriter:addPoint No file is currently open" <<
G4endl;
203 fout <<
" <heprep:attdef extra=\"" << extra <<
"\" name=\"" << name <<
"\" type=\"" << type <<
"\"" <<
G4endl;
205 fout <<
" desc=\"" << desc <<
"\"/>" <<
G4endl;
207 #ifdef G4HEPREPFILEDEBUG
208 G4cout <<
"G4HepRepFileXMLWriter:addAttDef No file is currently open" <<
G4endl;
220 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" << name <<
"\"" <<
G4endl;
222 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
224 #ifdef G4HEPREPFILEDEBUG
225 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
236 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" << name <<
"\"" <<
G4endl;
238 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
240 #ifdef G4HEPREPFILEDEBUG
241 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
252 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" << name <<
"\"" <<
G4endl;
254 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
256 #ifdef G4HEPREPFILEDEBUG
257 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
268 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" << name <<
"\"" <<
G4endl;
275 #ifdef G4HEPREPFILEDEBUG
276 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
288 int redness =
int(value1*255.);
289 int greenness =
int(value2*255.);
290 int blueness =
int(value3*255.);
292 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" << name <<
"\"" <<
G4endl;
294 fout <<
" value=\"" << redness <<
"," << greenness <<
"," << blueness <<
"\"/>" <<
G4endl;
296 #ifdef G4HEPREPFILEDEBUG
297 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
311 fout <<
"<heprep:heprep xmlns:heprep=\"http://www.slac.stanford.edu/~perl/heprep/\"" <<
G4endl;
312 fout <<
" xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\" xsi:schemaLocation=\"HepRep.xsd\">" <<
G4endl;
317 G4cout <<
"G4HepRepFileXMLWriter:open Unable to write to file " << fileSpec <<
G4endl;
331 G4cout <<
"G4HepRepFileXMLWriter:close No file is currently open" <<
G4endl;
391 while (
inType[i] && i<12) {
virtual G4double getScale()
void addPoint(double x, double y, double z)
virtual G4ThreeVector getCenter()
void addType(const char *name, int newTypeDepth)
const XML_Char int const XML_Char * value
void addAttValue(const char *name, const char *value)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static G4HepRepMessenger * GetInstance()
G4GLOB_DLL std::ostream G4cout
void open(const char *filespec)
void addAttDef(const char *name, const char *desc, const char *type, const char *extra)