#include <G4HepRepFileXMLWriter.hh>
|
| G4HepRepFileXMLWriter () |
|
void | addType (const char *name, int newTypeDepth) |
|
void | addInstance () |
|
void | addPrimitive () |
|
void | addPoint (double x, double y, double z) |
|
void | addAttDef (const char *name, const char *desc, const char *type, const char *extra) |
|
void | addAttValue (const char *name, const char *value) |
|
void | addAttValue (const char *name, double value) |
|
void | addAttValue (const char *name, int value) |
|
void | addAttValue (const char *name, bool value) |
|
void | addAttValue (const char *name, double value1, double value2, double value3) |
|
void | open (const char *filespec) |
|
void | close () |
|
void | endTypes () |
|
Definition at line 51 of file G4HepRepFileXMLWriter.hh.
G4HepRepFileXMLWriter::G4HepRepFileXMLWriter |
( |
| ) |
|
void G4HepRepFileXMLWriter::addAttDef |
( |
const char * |
name, |
|
|
const char * |
desc, |
|
|
const char * |
type, |
|
|
const char * |
extra |
|
) |
| |
Definition at line 195 of file G4HepRepFileXMLWriter.cc.
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;
G4GLOB_DLL std::ostream G4cout
void G4HepRepFileXMLWriter::addAttValue |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
Definition at line 214 of file G4HepRepFileXMLWriter.cc.
220 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" <<
name <<
"\"" <<
G4endl;
224 #ifdef G4HEPREPFILEDEBUG
225 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
void G4HepRepFileXMLWriter::addAttValue |
( |
const char * |
name, |
|
|
double |
value |
|
) |
| |
Definition at line 230 of file G4HepRepFileXMLWriter.cc.
236 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" <<
name <<
"\"" <<
G4endl;
240 #ifdef G4HEPREPFILEDEBUG
241 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
void G4HepRepFileXMLWriter::addAttValue |
( |
const char * |
name, |
|
|
int |
value |
|
) |
| |
Definition at line 246 of file G4HepRepFileXMLWriter.cc.
252 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" <<
name <<
"\"" <<
G4endl;
256 #ifdef G4HEPREPFILEDEBUG
257 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
void G4HepRepFileXMLWriter::addAttValue |
( |
const char * |
name, |
|
|
bool |
value |
|
) |
| |
Definition at line 262 of file G4HepRepFileXMLWriter.cc.
268 fout <<
" <heprep:attvalue showLabel=\"NONE\" name=\"" <<
name <<
"\"" <<
G4endl;
271 fout <<
" value=\"True\"/>" <<
G4endl;
273 fout <<
" value=\"False\"/>" <<
G4endl;
275 #ifdef G4HEPREPFILEDEBUG
276 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
void G4HepRepFileXMLWriter::addAttValue |
( |
const char * |
name, |
|
|
double |
value1, |
|
|
double |
value2, |
|
|
double |
value3 |
|
) |
| |
Definition at line 281 of file G4HepRepFileXMLWriter.cc.
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;
G4GLOB_DLL std::ostream G4cout
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void G4HepRepFileXMLWriter::addInstance |
( |
| ) |
|
Definition at line 120 of file G4HepRepFileXMLWriter.cc.
129 fout <<
"<heprep:instance>" <<
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;
G4GLOB_DLL std::ostream G4cout
void G4HepRepFileXMLWriter::addPoint |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Definition at line 164 of file G4HepRepFileXMLWriter.cc.
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;
virtual G4double getScale()
G4GLOB_DLL std::ostream G4cout
virtual G4ThreeVector getCenter()
static G4HepRepMessenger * GetInstance()
void G4HepRepFileXMLWriter::addPrimitive |
( |
| ) |
|
Definition at line 142 of file G4HepRepFileXMLWriter.cc.
151 fout <<
"<heprep:primitive>" <<
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;
G4GLOB_DLL std::ostream G4cout
void G4HepRepFileXMLWriter::addType |
( |
const char * |
name, |
|
|
int |
newTypeDepth |
|
) |
| |
Definition at line 71 of file G4HepRepFileXMLWriter.cc.
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;
G4GLOB_DLL std::ostream G4cout
void addType(const char *name, int newTypeDepth)
void G4HepRepFileXMLWriter::close |
( |
| ) |
|
void G4HepRepFileXMLWriter::endTypes |
( |
| ) |
|
void G4HepRepFileXMLWriter::open |
( |
const char * |
filespec | ) |
|
Definition at line 302 of file G4HepRepFileXMLWriter.cc.
310 fout <<
"<?xml version=\"1.0\" ?>" <<
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;
G4GLOB_DLL std::ostream G4cout
bool G4HepRepFileXMLWriter::inInstance[50] |
bool G4HepRepFileXMLWriter::inType[50] |
bool G4HepRepFileXMLWriter::isOpen |
char* G4HepRepFileXMLWriter::prevTypeName[50] |
int G4HepRepFileXMLWriter::typeDepth |
The documentation for this class was generated from the following files: