Geant4
10.03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
G4HepRepFileXMLWriter.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//--------------------------------------------------------------------------
28
// File and Version Information:
29
// $Id: G4HepRepFileXMLWriter.hh 66373 2012-12-18 09:41:34Z gcosmo $
30
//
31
// Description:
32
// Create a HepRep XML File (HepRep version 1).
33
//
34
// Environment:
35
// Software developed for the general High Energy Physics community.
36
//
37
// Author :
38
// J. Perl Original Author
39
//
40
// Copyright Information:
41
// Copyright (C) 2001 Stanford Linear Accelerator Center
42
//------------------------------------------------------------------------
43
#ifndef G4HepRepFileXMLWriter_hh
44
#define G4HepRepFileXMLWriter_hh
45
46
//#define G4HEPREPFILEDEBUG // Comment this out to suppress debug code.
47
48
#include "
globals.hh
"
49
#include <fstream>
50
51
class
G4HepRepFileXMLWriter
52
{
53
public
:
54
G4HepRepFileXMLWriter
();
55
56
void
addType
(
const
char
*
name
,
int
newTypeDepth);
57
void
addInstance
();
58
void
addPrimitive
();
59
void
addPoint
(
double
x,
double
y,
double
z);
60
61
void
addAttDef
(
const
char
* name,
62
const
char
* desc,
63
const
char
* type,
64
const
char
* extra);
65
66
void
addAttValue
(
const
char
* name,
67
const
char
* value);
68
69
void
addAttValue
(
const
char
* name,
70
double
value);
71
72
void
addAttValue
(
const
char
* name,
73
int
value);
74
75
void
addAttValue
(
const
char
* name,
76
bool
value);
77
78
void
addAttValue
(
const
char
* name,
79
double
value1,
80
double
value2,
81
double
value3);
82
83
void
open
(
const
char
* filespec);
84
void
close
();
85
86
void
endTypes
();
87
88
bool
isOpen
;
89
int
typeDepth
;
90
bool
inType
[50];
91
bool
inInstance
[50];
92
char
*
prevTypeName
[50];
93
94
private
:
95
std::ofstream
fout
;
96
97
void
init
();
98
99
bool
inPrimitive
;
100
bool
inPoint
;
101
102
void
endType
();
103
void
endInstance
();
104
void
endPrimitive
();
105
void
endPoint
();
106
107
void
indent
();
108
};
109
#endif
G4HepRepFileXMLWriter::inType
bool inType[50]
Definition:
G4HepRepFileXMLWriter.hh:90
G4HepRepFileXMLWriter::endInstance
void endInstance()
Definition:
G4HepRepFileXMLWriter.cc:354
G4HepRepFileXMLWriter::inPrimitive
bool inPrimitive
Definition:
G4HepRepFileXMLWriter.hh:99
G4HepRepFileXMLWriter::addPrimitive
void addPrimitive()
Definition:
G4HepRepFileXMLWriter.cc:142
G4HepRepFileXMLWriter::endPrimitive
void endPrimitive()
Definition:
G4HepRepFileXMLWriter.cc:365
G4HepRepFileXMLWriter::addAttValue
void addAttValue(const char *name, const char *value)
Definition:
G4HepRepFileXMLWriter.cc:214
G4HepRepFileXMLWriter::inPoint
bool inPoint
Definition:
G4HepRepFileXMLWriter.hh:100
G4HepRepFileXMLWriter::inInstance
bool inInstance[50]
Definition:
G4HepRepFileXMLWriter.hh:91
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:77
G4HepRepFileXMLWriter::addInstance
void addInstance()
Definition:
G4HepRepFileXMLWriter.cc:120
G4HepRepFileXMLWriter::close
void close()
Definition:
G4HepRepFileXMLWriter.cc:321
G4HepRepFileXMLWriter::G4HepRepFileXMLWriter
G4HepRepFileXMLWriter()
Definition:
G4HepRepFileXMLWriter.cc:48
G4HepRepFileXMLWriter::typeDepth
int typeDepth
Definition:
G4HepRepFileXMLWriter.hh:89
G4HepRepFileXMLWriter::addPoint
void addPoint(double x, double y, double z)
Definition:
G4HepRepFileXMLWriter.cc:164
G4HepRepFileXMLWriter::addAttDef
void addAttDef(const char *name, const char *desc, const char *type, const char *extra)
Definition:
G4HepRepFileXMLWriter.cc:195
G4HepRepFileXMLWriter::indent
void indent()
Definition:
G4HepRepFileXMLWriter.cc:386
G4HepRepFileXMLWriter
Definition:
G4HepRepFileXMLWriter.hh:51
G4HepRepFileXMLWriter::init
void init()
Definition:
G4HepRepFileXMLWriter.cc:54
globals.hh
G4HepRepFileXMLWriter::prevTypeName
char * prevTypeName[50]
Definition:
G4HepRepFileXMLWriter.hh:92
G4HepRepFileXMLWriter::endTypes
void endTypes()
Definition:
G4HepRepFileXMLWriter.cc:335
G4HepRepFileXMLWriter::fout
std::ofstream fout
Definition:
G4HepRepFileXMLWriter.hh:95
G4HepRepFileXMLWriter::isOpen
bool isOpen
Definition:
G4HepRepFileXMLWriter.hh:88
G4HepRepFileXMLWriter::addType
void addType(const char *name, int newTypeDepth)
Definition:
G4HepRepFileXMLWriter.cc:71
G4HepRepFileXMLWriter::open
void open(const char *filespec)
Definition:
G4HepRepFileXMLWriter.cc:302
G4HepRepFileXMLWriter::endPoint
void endPoint()
Definition:
G4HepRepFileXMLWriter.cc:376
G4HepRepFileXMLWriter::endType
void endType()
Definition:
G4HepRepFileXMLWriter.cc:342
geant4.10.03
source
visualization
HepRep
include
G4HepRepFileXMLWriter.hh
Generated on Thu Feb 14 2002 02:29:28 for Geant4 by
1.8.8