ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cheprep::XMLHepRepWriter Class Reference

#include <geant4/tree/geant4-10.6-release/source/visualization/HepRep/include/cheprep/XMLHepRepWriter.h>

+ Inheritance diagram for cheprep::XMLHepRepWriter:
+ Collaboration diagram for cheprep::XMLHepRepWriter:

Public Member Functions

 XMLHepRepWriter (std::ostream *out, bool randomAccess, bool compress)
 
 ~XMLHepRepWriter ()
 
bool addProperty (std::string key, std::string value)
 
bool close ()
 
bool write (HEPREP::HepRep *heprep, std::string name)
 
bool write (std::vector< std::string > layers)
 
bool write (HEPREP::HepRepTypeTree *typeTree)
 
bool write (HEPREP::HepRepType *type)
 
bool write (HEPREP::HepRepTreeID *treeID)
 
bool write (HEPREP::HepRepAction *action)
 
bool write (HEPREP::HepRepInstanceTree *instanceTree)
 
bool write (HEPREP::HepRepInstance *instance)
 
bool write (HEPREP::HepRepPoint *point)
 
bool write (HEPREP::HepRepAttribute *attribute)
 
bool write (HEPREP::HepRepDefinition *definition)
 
bool write (HEPREP::HepRepAttValue *attValue)
 
bool write (HEPREP::HepRepAttDef *attDef)
 
- Public Member Functions inherited from HEPREP::HepRepWriter
virtual ~HepRepWriter ()
 Destructor.
 

Private Attributes

std::ostream * out
 
bool compress
 
std::string nameSpace
 
AbstractXMLWriterxml
 
cheprep::ZipOutputStreamzip
 
cheprep::GZIPOutputStreamgz
 
std::map< std::string,
std::string > 
properties
 

Detailed Description

Definition at line 37 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 37 of file XMLHepRepWriter.h

Constructor & Destructor Documentation

cheprep::XMLHepRepWriter::XMLHepRepWriter ( std::ostream *  out,
bool  randomAccess,
bool  compress 
)

Definition at line 20 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 20 of file XMLHepRepWriter.cc

References gz, NAMESPACE, nameSpace, out, and zip.

cheprep::XMLHepRepWriter::~XMLHepRepWriter ( )

Definition at line 49 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 49 of file XMLHepRepWriter.cc

References gz, and zip.

Member Function Documentation

bool cheprep::XMLHepRepWriter::addProperty ( std::string  key,
std::string  value 
)
virtual

Adds a property, to be written to the HepRep file when closed.

Parameters
key
value
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 54 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 54 of file XMLHepRepWriter.cc

References properties.

bool cheprep::XMLHepRepWriter::close ( )
virtual

Closes the writer and its underlying stream.

Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 59 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 59 of file XMLHepRepWriter.cc

References cheprep::GZIPOutputStream::close(), cheprep::ZipOutputStream::close(), cheprep::ZipOutputStream::closeEntry(), gz, properties, cheprep::ZipOutputStream::putNextEntry(), and zip.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRep heprep,
std::string  name 
)
virtual

Writes a HepRep.

Parameters
heprepto be written.
namefor the heprep to be written (for tagged access), may be ommited.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 78 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 78 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeDoc(), cheprep::ZipOutputStream::closeEntry(), cheprep::AbstractXMLWriter::closeTag(), compress, HEPREP::HepRep::getInstanceTreeList(), HEPREP::HepRep::getLayerOrder(), HEPREP::HepRep::getTypeTreeList(), NAMESPACE, nameSpace, cheprep::AbstractXMLWriter::openDoc(), cheprep::AbstractXMLWriter::openTag(), out, cheprep::ZipOutputStream::putNextEntry(), cheprep::AbstractXMLWriter::setAttribute(), xml, and zip.

Referenced by write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool cheprep::XMLHepRepWriter::write ( std::vector< std::string >  layerOrder)
virtual

Writes the layerOrder.

Parameters
layerOrderto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 116 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 116 of file XMLHepRepWriter.cc

References nameSpace, cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepTypeTree typeTree)
virtual

Writes a HepRepTypeTree.

Parameters
typeTreeto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 131 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 131 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeTag(), HEPREP::HepRepTreeID::getName(), HEPREP::HepRepTypeTree::getTypeList(), HEPREP::HepRepTreeID::getVersion(), nameSpace, cheprep::AbstractXMLWriter::openTag(), cheprep::AbstractXMLWriter::setAttribute(), write(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepType type)
virtual

Writes a HepRepType.

Parameters
typeto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 145 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 145 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeTag(), HEPREP::HepRepType::getName(), HEPREP::HepRepType::getTypeList(), nameSpace, cheprep::AbstractXMLWriter::openTag(), cheprep::AbstractXMLWriter::setAttribute(), write(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepTreeID treeID)
virtual

Writes a HepRepTreeID.

Parameters
treeIDto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 159 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 159 of file XMLHepRepWriter.cc

References HEPREP::HepRepTreeID::getName(), HEPREP::HepRepTreeID::getQualifier(), HEPREP::HepRepTreeID::getVersion(), nameSpace, cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepAction action)
virtual

Writes a HepRepAction.

Parameters
actionto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 167 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 167 of file XMLHepRepWriter.cc

References HEPREP::HepRepAction::getExpression(), HEPREP::HepRepAction::getName(), nameSpace, cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepInstanceTree instanceTree)
virtual

Writes a HepRepInstanceTree.

Parameters
instanceTreeto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 174 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 174 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeTag(), HEPREP::HepRepInstanceTree::getInstances(), HEPREP::HepRepInstanceTree::getInstanceTreeList(), HEPREP::HepRepTreeID::getName(), HEPREP::HepRepInstanceTree::getTypeTree(), HEPREP::HepRepTreeID::getVersion(), nameSpace, cheprep::AbstractXMLWriter::openTag(), cheprep::AbstractXMLWriter::setAttribute(), write(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepInstance instance)
virtual

Writes a HepRepInstance.

Parameters
instanceto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 195 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 195 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeTag(), HEPREP::HepRepType::getFullName(), HEPREP::HepRepInstance::getInstances(), HEPREP::HepRepInstance::getPoints(), HEPREP::HepRepInstance::getType(), nameSpace, cheprep::AbstractXMLWriter::openTag(), cheprep::AbstractXMLWriter::setAttribute(), write(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepPoint point)
virtual

Writes a HepRepPoint.

Parameters
pointto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 214 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 214 of file XMLHepRepWriter.cc

References cheprep::AbstractXMLWriter::closeTag(), HEPREP::HepRepAttribute::getAttValuesFromNode(), HEPREP::HepRepPoint::getX(), HEPREP::HepRepPoint::getY(), HEPREP::HepRepPoint::getZ(), nameSpace, cheprep::AbstractXMLWriter::openTag(), cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), write(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepAttribute attribute)
virtual

Writes a HepRepAttribute.

Parameters
attributeto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 228 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 228 of file XMLHepRepWriter.cc

References HEPREP::HepRepAttribute::getAttValueFromNode(), HEPREP::HepRepAttribute::getAttValuesFromNode(), and write().

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepDefinition definition)
virtual

Writes a HepRepDefinition.

Parameters
definitionto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 241 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 241 of file XMLHepRepWriter.cc

References HEPREP::HepRepDefinition::getAttDefsFromNode(), and write().

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepAttValue attValue)
virtual

Writes a HepRepAttValue.

Parameters
attValueto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 249 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 249 of file XMLHepRepWriter.cc

References HEPREP::HepRepAttValue::getAsString(), HEPREP::HepRepAttValue::getBoolean(), HEPREP::HepRepAttValue::getColor(), HEPREP::HepRepAttValue::getDouble(), HEPREP::HepRepAttValue::getInteger(), HEPREP::HepRepAttValue::getLong(), HEPREP::HepRepAttValue::getName(), HEPREP::HepRepAttValue::getString(), HEPREP::HepRepAttValue::getType(), nameSpace, cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), HEPREP::HepRepAttValue::showLabel(), and xml.

+ Here is the call graph for this function:

bool cheprep::XMLHepRepWriter::write ( HEPREP::HepRepAttDef attDef)
virtual

Writes a HepRepAttDef.

Parameters
attDefto be written.
Returns
false in case of a stream problem.

Implements HEPREP::HepRepWriter.

Definition at line 278 of file XMLHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 278 of file XMLHepRepWriter.cc

References HEPREP::HepRepAttDef::getCategory(), HEPREP::HepRepAttDef::getDescription(), HEPREP::HepRepAttDef::getExtra(), HEPREP::HepRepAttDef::getName(), nameSpace, cheprep::AbstractXMLWriter::printTag(), cheprep::AbstractXMLWriter::setAttribute(), and xml.

+ Here is the call graph for this function:

Member Data Documentation

bool cheprep::XMLHepRepWriter::compress
private

Definition at line 41 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 41 of file XMLHepRepWriter.h

Referenced by write().

cheprep::GZIPOutputStream* cheprep::XMLHepRepWriter::gz
private

Definition at line 45 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 45 of file XMLHepRepWriter.h

Referenced by close(), XMLHepRepWriter(), and ~XMLHepRepWriter().

std::string cheprep::XMLHepRepWriter::nameSpace
private

Definition at line 42 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 42 of file XMLHepRepWriter.h

Referenced by write(), and XMLHepRepWriter().

std::ostream* cheprep::XMLHepRepWriter::out
private

Definition at line 40 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 40 of file XMLHepRepWriter.h

Referenced by write(), and XMLHepRepWriter().

std::map<std::string, std::string> cheprep::XMLHepRepWriter::properties
private

Definition at line 46 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 46 of file XMLHepRepWriter.h

Referenced by addProperty(), and close().

AbstractXMLWriter* cheprep::XMLHepRepWriter::xml
private

Definition at line 43 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 43 of file XMLHepRepWriter.h

Referenced by write().

cheprep::ZipOutputStream* cheprep::XMLHepRepWriter::zip
private

Definition at line 44 of file XMLHepRepWriter.h.

View newest version in sPHENIX GitHub at line 44 of file XMLHepRepWriter.h

Referenced by close(), write(), XMLHepRepWriter(), and ~XMLHepRepWriter().


The documentation for this class was generated from the following files: