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

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

+ Inheritance diagram for cheprep::BHepRepWriter:
+ Collaboration diagram for cheprep::BHepRepWriter:

Public Member Functions

 BHepRepWriter (std::ostream &os)
 
virtual ~BHepRepWriter ()
 
void close ()
 
void openDoc (std::string version="BinaryHepRep/1.0", std::string encoding="UTF-8", bool standalone=false)
 
void closeDoc (bool force=false)
 
void openTag (std::string name)
 
void closeTag ()
 
void printTag (std::string name)
 
void setAttribute (std::string name, char *value)
 
void setAttribute (std::string name, std::string value)
 
void setAttribute (std::string name, std::vector< double > value)
 
void setAttribute (std::string name, int64 value)
 
void setAttribute (std::string name, int value)
 
void setAttribute (std::string name, bool value)
 
void setAttribute (std::string name, double value)
 
void openTag (std::string ns, std::string name)
 
void printTag (std::string ns, std::string name)
 
void setAttribute (std::string ns, std::string name, std::string value)
 
void setAttribute (std::string ns, std::string name, double value)
 
- Public Member Functions inherited from cheprep::AbstractXMLWriter
 AbstractXMLWriter (std::string aDefaultNameSpace)
 
virtual ~AbstractXMLWriter ()
 

Private Member Functions

void writeTag (std::string name, bool content=false)
 
void writePoints ()
 
void writeStringDefine (std::string s)
 
void writeMultiByteInt (unsigned int ui)
 
void writeReal (double ui)
 
void writeLong (int64 i)
 
void writeInt (int i)
 
void writeByte (unsigned char b)
 
void writeString (std::string s)
 

Private Attributes

std::ostream & os
 
bool singlePrecision
 
bool isBigEndian
 
std::map< std::string,
unsigned int
stringValues
 
std::map< std::string,
std::string > 
stringAttributes
 
std::map< std::string,
std::vector< double > > 
colorAttributes
 
std::map< std::string, int64longAttributes
 
std::map< std::string, intintAttributes
 
std::map< std::string, bool > booleanAttributes
 
std::map< std::string, double > doubleAttributes
 
std::vector< double > points
 

Static Private Attributes

static const unsigned char WBXML_VERSION = 0x03
 
static const unsigned char UNKNOWN_PID = 0x01
 
static const unsigned char UTF8 = 0x6a
 
static const unsigned char SWITCH_PAGE = 0x00
 
static const unsigned char END = 0x01
 
static const unsigned char ENTITY = 0x02
 
static const unsigned char STR_I = 0x03
 
static const unsigned char LITERAL = 0x04
 
static const unsigned char CONTENT = 0x40
 
static const unsigned char EXT_I_0 = 0x40
 
static const unsigned char EXT_I_1 = 0x41
 
static const unsigned char EXT_I_2 = 0x42
 
static const unsigned char PI = 0x43
 
static const unsigned char LITERAL_C = 0x44
 
static const unsigned char ATTRIBUTE = 0x80
 
static const unsigned char EXT_T_0 = 0x80
 
static const unsigned char EXT_T_1 = 0x81
 
static const unsigned char EXT_T_2 = 0x82
 
static const unsigned char STR_T = 0x83
 
static const unsigned char LITERAL_A = 0x84
 
static const unsigned char EXT_0 = 0xC0
 
static const unsigned char EXT_1 = 0xC1
 
static const unsigned char EXT_2 = 0xC2
 
static const unsigned char OPAQUE = 0xC3
 
static const unsigned char LITERAL_AC = 0xC4
 
static const unsigned char STR_D = EXT_I_0
 
static const unsigned char STR_R = EXT_T_0
 
static std::map< std::string,
unsigned char > 
tags
 
static std::map< std::string,
unsigned char > 
attributes
 
static std::map< std::string,
unsigned char > 
values
 

Additional Inherited Members

- Protected Attributes inherited from cheprep::AbstractXMLWriter
std::string defaultNameSpace
 

Detailed Description

Definition at line 19 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 19 of file BHepRepWriter.h

Constructor & Destructor Documentation

cheprep::BHepRepWriter::BHepRepWriter ( std::ostream &  os)

Definition at line 20 of file BHepRepWriter.cc.

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

References attributes, c, isBigEndian, tags, Acts::UnitConstants::u, and values.

cheprep::BHepRepWriter::~BHepRepWriter ( )
virtual

Definition at line 201 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 201 of file BHepRepWriter.cc

Member Function Documentation

void cheprep::BHepRepWriter::close ( void  )
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 204 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 204 of file BHepRepWriter.cc

void cheprep::BHepRepWriter::closeDoc ( bool  force = false)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 225 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 225 of file BHepRepWriter.cc

References attributes, END, PI, and writeByte().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::closeTag ( )
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 235 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 235 of file BHepRepWriter.cc

References END, writeByte(), and writePoints().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::openDoc ( std::string  version = "BinaryHepRep/1.0",
std::string  encoding = "UTF-8",
bool  standalone = false 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 207 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 207 of file BHepRepWriter.cc

References stringValues, UNKNOWN_PID, UTF8, WBXML_VERSION, writeByte(), writeMultiByteInt(), and writeString().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::openTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 231 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 231 of file BHepRepWriter.cc

References writeTag().

Referenced by openTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::openTag ( std::string  ns,
std::string  name 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 43 of file BHepRepWriter.h.

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

References cheprep::AbstractXMLWriter::defaultNameSpace, and openTag().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::printTag ( std::string  name)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 240 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 240 of file BHepRepWriter.cc

References writeTag().

Referenced by printTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::printTag ( std::string  ns,
std::string  name 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 46 of file BHepRepWriter.h.

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

References cheprep::AbstractXMLWriter::defaultNameSpace, and printTag().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
char *  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 400 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 400 of file BHepRepWriter.cc

Referenced by setAttribute().

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
std::string  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 404 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 404 of file BHepRepWriter.cc

References attributes, and stringAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
std::vector< double >  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 416 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 416 of file BHepRepWriter.cc

References attributes, and colorAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
int64  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 428 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 428 of file BHepRepWriter.cc

References attributes, and longAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
int  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 440 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 440 of file BHepRepWriter.cc

References attributes, and intAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
bool  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 452 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 452 of file BHepRepWriter.cc

References attributes, and booleanAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  name,
double  value 
)
virtual

Implements cheprep::AbstractXMLWriter.

Definition at line 464 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 464 of file BHepRepWriter.cc

References attributes, and doubleAttributes.

void cheprep::BHepRepWriter::setAttribute ( std::string  ns,
std::string  name,
std::string  value 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 49 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 49 of file BHepRepWriter.h

References setAttribute().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::setAttribute ( std::string  ns,
std::string  name,
double  value 
)
inlinevirtual

Implements cheprep::AbstractXMLWriter.

Definition at line 52 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 52 of file BHepRepWriter.h

References setAttribute().

+ Here is the call graph for this function:

void cheprep::BHepRepWriter::writeByte ( unsigned char  b)
private

Definition at line 536 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 536 of file BHepRepWriter.cc

References os.

Referenced by closeDoc(), closeTag(), openDoc(), writeMultiByteInt(), writePoints(), writeStringDefine(), and writeTag().

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeInt ( int  i)
private

Definition at line 528 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 528 of file BHepRepWriter.cc

References os.

Referenced by writeReal(), and writeTag().

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeLong ( int64  i)
private

Definition at line 516 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 516 of file BHepRepWriter.cc

References os.

Referenced by writeReal(), and writeTag().

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeMultiByteInt ( unsigned int  ui)
private

Definition at line 481 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 481 of file BHepRepWriter.cc

References incremental_prev_tag::idx, and writeByte().

Referenced by openDoc(), writePoints(), and writeTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writePoints ( )
private

Definition at line 384 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 384 of file BHepRepWriter.cc

References CONTENT, END, OPAQUE, points, singlePrecision, tags, writeByte(), writeMultiByteInt(), and writeReal().

Referenced by closeTag(), and writeTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeReal ( double  ui)
private

Definition at line 497 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 497 of file BHepRepWriter.cc

References d, f, singlePrecision, Acts::UnitConstants::u, writeInt(), and writeLong().

Referenced by writePoints(), and writeTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeString ( std::string  s)
private

Definition at line 540 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 540 of file BHepRepWriter.cc

References os.

Referenced by openDoc(), and writeStringDefine().

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeStringDefine ( std::string  s)
private

Definition at line 476 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 476 of file BHepRepWriter.cc

References STR_D, writeByte(), and writeString().

Referenced by writeTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cheprep::BHepRepWriter::writeTag ( std::string  name,
bool  content = false 
)
private

Definition at line 244 of file BHepRepWriter.cc.

View newest version in sPHENIX GitHub at line 244 of file BHepRepWriter.cc

References attributes, booleanAttributes, colorAttributes, CONTENT, doubleAttributes, END, int(), intAttributes, longAttributes, OPAQUE, points, singlePrecision, STR_R, stringAttributes, stringValues, tags, Acts::Test::transform, v, values, writeByte(), writeInt(), writeLong(), writeMultiByteInt(), writePoints(), writeReal(), and writeStringDefine().

Referenced by openTag(), and printTag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

const unsigned char cheprep::BHepRepWriter::ATTRIBUTE = 0x80
staticprivate

Definition at line 75 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 75 of file BHepRepWriter.h

std::map< std::string, unsigned char > cheprep::BHepRepWriter::attributes
staticprivate

Definition at line 94 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 94 of file BHepRepWriter.h

Referenced by BHepRepWriter(), closeDoc(), setAttribute(), and writeTag().

std::map<std::string, bool> cheprep::BHepRepWriter::booleanAttributes
private

Definition at line 110 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 110 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

std::map<std::string, std::vector<double> > cheprep::BHepRepWriter::colorAttributes
private

Definition at line 107 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 107 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

const unsigned char cheprep::BHepRepWriter::CONTENT = 0x40
staticprivate

Definition at line 68 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 68 of file BHepRepWriter.h

Referenced by writePoints(), and writeTag().

std::map<std::string, double> cheprep::BHepRepWriter::doubleAttributes
private

Definition at line 111 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 111 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

const unsigned char cheprep::BHepRepWriter::END = 0x01
staticprivate

Definition at line 63 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 63 of file BHepRepWriter.h

Referenced by closeDoc(), closeTag(), writePoints(), and writeTag().

const unsigned char cheprep::BHepRepWriter::ENTITY = 0x02
staticprivate

Definition at line 64 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 64 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_0 = 0xC0
staticprivate

Definition at line 82 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 82 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_1 = 0xC1
staticprivate

Definition at line 83 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 83 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_2 = 0xC2
staticprivate

Definition at line 84 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 84 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_I_0 = 0x40
staticprivate

Definition at line 69 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 69 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_I_1 = 0x41
staticprivate

Definition at line 70 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 70 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_I_2 = 0x42
staticprivate

Definition at line 71 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 71 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_T_0 = 0x80
staticprivate

Definition at line 76 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 76 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_T_1 = 0x81
staticprivate

Definition at line 77 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 77 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::EXT_T_2 = 0x82
staticprivate

Definition at line 78 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 78 of file BHepRepWriter.h

std::map<std::string, int> cheprep::BHepRepWriter::intAttributes
private

Definition at line 109 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 109 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

bool cheprep::BHepRepWriter::isBigEndian
private

Definition at line 100 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 100 of file BHepRepWriter.h

Referenced by BHepRepWriter().

const unsigned char cheprep::BHepRepWriter::LITERAL = 0x04
staticprivate

Definition at line 66 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 66 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::LITERAL_A = 0x84
staticprivate

Definition at line 80 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 80 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::LITERAL_AC = 0xC4
staticprivate

Definition at line 86 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 86 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::LITERAL_C = 0x44
staticprivate

Definition at line 73 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 73 of file BHepRepWriter.h

std::map<std::string, int64> cheprep::BHepRepWriter::longAttributes
private

Definition at line 108 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 108 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

const unsigned char cheprep::BHepRepWriter::OPAQUE = 0xC3
staticprivate

Definition at line 85 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 85 of file BHepRepWriter.h

Referenced by writePoints(), and writeTag().

std::ostream& cheprep::BHepRepWriter::os
private

Definition at line 98 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 98 of file BHepRepWriter.h

Referenced by writeByte(), writeInt(), writeLong(), and writeString().

const unsigned char cheprep::BHepRepWriter::PI = 0x43
staticprivate

Definition at line 72 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 72 of file BHepRepWriter.h

Referenced by closeDoc().

std::vector<double> cheprep::BHepRepWriter::points
private

Definition at line 114 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 114 of file BHepRepWriter.h

Referenced by writePoints(), and writeTag().

bool cheprep::BHepRepWriter::singlePrecision
private

Definition at line 99 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 99 of file BHepRepWriter.h

Referenced by writePoints(), writeReal(), and writeTag().

const unsigned char cheprep::BHepRepWriter::STR_D = EXT_I_0
staticprivate

Definition at line 89 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 89 of file BHepRepWriter.h

Referenced by writeStringDefine().

const unsigned char cheprep::BHepRepWriter::STR_I = 0x03
staticprivate

Definition at line 65 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 65 of file BHepRepWriter.h

const unsigned char cheprep::BHepRepWriter::STR_R = EXT_T_0
staticprivate

Definition at line 90 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 90 of file BHepRepWriter.h

Referenced by writeTag().

const unsigned char cheprep::BHepRepWriter::STR_T = 0x83
staticprivate

Definition at line 79 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 79 of file BHepRepWriter.h

std::map<std::string, std::string> cheprep::BHepRepWriter::stringAttributes
private

Definition at line 106 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 106 of file BHepRepWriter.h

Referenced by setAttribute(), and writeTag().

std::map<std::string, unsigned int> cheprep::BHepRepWriter::stringValues
private

Definition at line 103 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 103 of file BHepRepWriter.h

Referenced by openDoc(), and writeTag().

const unsigned char cheprep::BHepRepWriter::SWITCH_PAGE = 0x00
staticprivate

Definition at line 62 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 62 of file BHepRepWriter.h

std::map< std::string, unsigned char > cheprep::BHepRepWriter::tags
staticprivate

Definition at line 93 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 93 of file BHepRepWriter.h

Referenced by BHepRepWriter(), writePoints(), and writeTag().

const unsigned char cheprep::BHepRepWriter::UNKNOWN_PID = 0x01
staticprivate

Definition at line 58 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 58 of file BHepRepWriter.h

Referenced by openDoc().

const unsigned char cheprep::BHepRepWriter::UTF8 = 0x6a
staticprivate

Definition at line 59 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 59 of file BHepRepWriter.h

Referenced by openDoc().

std::map< std::string, unsigned char > cheprep::BHepRepWriter::values
staticprivate

Definition at line 95 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 95 of file BHepRepWriter.h

Referenced by BHepRepWriter(), and writeTag().

const unsigned char cheprep::BHepRepWriter::WBXML_VERSION = 0x03
staticprivate

Definition at line 57 of file BHepRepWriter.h.

View newest version in sPHENIX GitHub at line 57 of file BHepRepWriter.h

Referenced by openDoc().


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