10 #define NAMESPACE "heprep"
13 using namespace HEPREP;
20 XMLHepRepWriter::XMLHepRepWriter(ostream* os,
bool randomAccess,
bool useCompression)
34 #ifndef CHEPREP_NO_ZLIB
38 cerr <<
"WARNING: the .gz output stream you are creating will be a plain file," << endl;
39 cerr <<
"since compression support (ZLIB) was not compiled into the library." << endl;
40 cerr <<
"To add ZLIB support, you need to undefine CHEPREP_NO_ZLIB." << endl;
63 map<string, string>::iterator i =
properties.begin();
65 *
zip << (*i).first <<
"=" << (*i).second << endl;
83 if (name.rfind(
".bheprep") == name.length()-8) {
91 xml->
setAttribute(
"xmlns", (
string)
"http://java.freehep.org/schemas/heprep/2.0");
92 xml->
setAttribute(
"xmlns",
"xsi",
"http://www.w3.org/2001/XMLSchema-instance");
93 xml->
setAttribute(
"xsi",
"schemaLocation",
"http://java.freehep.org/schemas/heprep/2.0 http://java.freehep.org/schemas/heprep/2.0/HepRep.xsd");
97 for (vector<HepRepTypeTree*>::iterator i1=typeTreeSet.begin(); i1 != typeTreeSet.end(); i1++) {
101 for (vector<HepRepInstanceTree*>::iterator i2=instanceTreeSet.begin(); i2 != instanceTreeSet.end(); i2++) {
117 string layerOrder =
"";
119 for (vector<string>::iterator i=layers.begin(); i != layers.end(); i++) {
121 layerOrder.append(
", ");
123 layerOrder.append(*i);
137 for (vector<HepRepType*>::iterator i=types.begin(); i != types.end(); i++) {
152 for (vector<HepRepType*>::iterator i=types.begin(); i != types.end(); i++) {
182 for (vector<HepRepTreeID*>::iterator i1=instanceTreeSet.begin(); i1 != instanceTreeSet.end(); i1++) {
187 vector<HepRepInstance*> instanceList = instanceTree->
getInstances();
188 for (vector<HepRepInstance*>::iterator i2=instanceList.begin(); i2 != instanceList.end(); i2++) {
201 vector<HepRepPoint*> pointList = instance->
getPoints();
202 for (vector<HepRepPoint*>::iterator i1=pointList.begin(); i1 != pointList.end(); i1++) {
206 vector<HepRepInstance*> instanceList = instance->
getInstances();
207 for (vector<HepRepInstance*>::iterator i2=instanceList.begin(); i2 != instanceList.end(); i2++) {
232 if (layerAtt != NULL)
write(layerAtt);
235 for (set<HepRepAttValue*>::iterator i=attSet.begin(); i != attSet.end(); i++) {
243 for (set<HepRepAttDef*>::iterator i=list.begin(); i != list.end(); i++) {
270 if (attValue->
showLabel() != HepRepConstants::SHOW_NONE) {