#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::G4HepRepFileXMLWriter |
( |
| ) |
|
◆ addAttDef()
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
◆ addAttValue() [1/5]
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;
222 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
224 #ifdef G4HEPREPFILEDEBUG 225 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
◆ addAttValue() [2/5]
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;
238 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
240 #ifdef G4HEPREPFILEDEBUG 241 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
◆ addAttValue() [3/5]
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;
254 fout <<
" value=\"" << value <<
"\"/>" <<
G4endl;
256 #ifdef G4HEPREPFILEDEBUG 257 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
◆ addAttValue() [4/5]
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;
275 #ifdef G4HEPREPFILEDEBUG 276 G4cout <<
"G4HepRepFileXMLWriter:addAttValue No file is currently open" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
◆ addAttValue() [5/5]
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
◆ addInstance()
void G4HepRepFileXMLWriter::addInstance |
( |
| ) |
|
Definition at line 120 of file G4HepRepFileXMLWriter.cc.
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
◆ addPoint()
void G4HepRepFileXMLWriter::addPoint |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Definition at line 164 of file G4HepRepFileXMLWriter.cc.
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()
◆ addPrimitive()
void G4HepRepFileXMLWriter::addPrimitive |
( |
| ) |
|
Definition at line 142 of file G4HepRepFileXMLWriter.cc.
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
◆ addType()
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)
◆ close()
void G4HepRepFileXMLWriter::close |
( |
| ) |
|
◆ endInstance()
void G4HepRepFileXMLWriter::endInstance |
( |
| ) |
|
|
private |
◆ endPoint()
void G4HepRepFileXMLWriter::endPoint |
( |
| ) |
|
|
private |
◆ endPrimitive()
void G4HepRepFileXMLWriter::endPrimitive |
( |
| ) |
|
|
private |
◆ endType()
void G4HepRepFileXMLWriter::endType |
( |
| ) |
|
|
private |
◆ endTypes()
void G4HepRepFileXMLWriter::endTypes |
( |
| ) |
|
◆ indent()
void G4HepRepFileXMLWriter::indent |
( |
| ) |
|
|
private |
◆ init()
void G4HepRepFileXMLWriter::init |
( |
| ) |
|
|
private |
◆ open()
void G4HepRepFileXMLWriter::open |
( |
const char * |
filespec | ) |
|
Definition at line 302 of file G4HepRepFileXMLWriter.cc.
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
◆ fout
std::ofstream G4HepRepFileXMLWriter::fout |
|
private |
◆ inInstance
bool G4HepRepFileXMLWriter::inInstance[50] |
◆ inPoint
bool G4HepRepFileXMLWriter::inPoint |
|
private |
◆ inPrimitive
bool G4HepRepFileXMLWriter::inPrimitive |
|
private |
◆ inType
bool G4HepRepFileXMLWriter::inType[50] |
◆ isOpen
bool G4HepRepFileXMLWriter::isOpen |
◆ prevTypeName
char* G4HepRepFileXMLWriter::prevTypeName[50] |
◆ typeDepth
int G4HepRepFileXMLWriter::typeDepth |
The documentation for this class was generated from the following files: