ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
source
analysis
digits_hits
error_propagation
event
externals
g3tog4
geometry
global
graphics_reps
intercoms
interfaces
materials
parameterisations
particles
persistency
physics_lists
processes
readout
run
track
tracking
visualization
externals
FukuiRenderer
gMocren
HepRep
include
src
BHepRepWriter.cc
DefaultHepRep.cc
DefaultHepRepAction.cc
DefaultHepRepAttDef.cc
DefaultHepRepAttribute.cc
DefaultHepRepAttValue.cc
DefaultHepRepDefinition.cc
DefaultHepRepFactory.cc
DefaultHepRepInstance.cc
DefaultHepRepInstanceTree.cc
DefaultHepRepPoint.cc
DefaultHepRepTreeID.cc
DefaultHepRepType.cc
DefaultHepRepTypeTree.cc
DeflateOutputStreamBuffer.cc
G4HepRep.cc
G4HepRepFile.cc
G4HepRepFileSceneHandler.cc
G4HepRepFileViewer.cc
G4HepRepFileXMLWriter.cc
G4HepRepMessenger.cc
G4HepRepSceneHandler.cc
G4HepRepViewer.cc
GZIPOutputStream.cc
GZIPOutputStreamBuffer.cc
IndentPrintWriter.cc
XMLHepRepFactory.cc
XMLHepRepWriter.cc
XMLWriter.cc
ZipOutputStream.cc
ZipOutputStreamBuffer.cc
management
modeling
OpenGL
OpenInventor
RayTracer
Tree
VRML
XXX
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DefaultHepRepType.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DefaultHepRepType.cc
1
// Copyright FreeHEP, 2005.
2
3
#include "
cheprep/DefaultHepRepType.h
"
4
5
using namespace
std;
6
using namespace
HEPREP;
7
11
namespace
cheprep {
12
13
DefaultHepRepType::DefaultHepRepType(
HepRepType
* parentType,
string
typeName)
14
:
DefaultHepRepDefinition
(), parent(parentType),
name
(typeName) {
15
this->
description
=
"No Description"
;
16
this->
infoURL
=
"No Info URL"
;
17
18
// HepRepTypes are sometimes used without a parent (top-level)
19
if
(
parent
!= NULL) {
20
parent
->
addType
(
this
);
21
}
22
}
23
24
DefaultHepRepType::DefaultHepRepType
(
HepRepTypeTree
* parentTypeTree,
string
typeName)
25
:
DefaultHepRepDefinition
(), parent(NULL),
name
(typeName) {
26
this->
description
=
"No Description"
;
27
this->
infoURL
=
"No Info URL"
;
28
29
parentTypeTree->
addType
(
this
);
30
}
31
32
DefaultHepRepType::~DefaultHepRepType
() {
33
for
(vector<HepRepType*>::iterator i1 =
types
.begin(); i1 !=
types
.end(); i1++) {
34
delete
(*i1);
35
}
36
}
37
38
HepRepType
*
DefaultHepRepType::getSuperType
() {
39
return
parent
;
40
}
41
42
HepRepAttDef
*
DefaultHepRepType::getAttDef
(
string
defName) {
43
HepRepAttDef
* def = NULL;
44
HepRepType
* type =
this
;
45
while
((def == NULL) && (type != NULL)) {
46
def = type->
getAttDefFromNode
(defName);
47
type = type->
getSuperType
();
48
}
49
if
(def == NULL) {
50
cerr <<
"ERROR: No HepRepDefaults, trying to get definition for: "
<< defName << endl;
51
// FIXME, no HepRepDefaults
52
}
53
return
def;
54
}
55
59
HepRepAttValue
*
DefaultHepRepType::getAttValue
(
string
attName) {
60
HepRepAttValue
*
value
= NULL;
61
HepRepType
* type =
this
;
62
while
((value == NULL) && (type != NULL)) {
63
value = type->
getAttValueFromNode
(attName);
64
type = type->
getSuperType
();
65
}
66
if
(value == NULL) {
67
cerr <<
"ERROR: No HepRepDefaults, trying to get value for: "
<< attName << endl;
68
// FIXME, no HepRepDefaults
69
}
70
return
value
;
71
}
72
73
HepRepType
*
DefaultHepRepType::copy
(
HepRepType
*) {
74
cerr <<
"DefaultHepRepType::copy(HepRepType*) not implemented."
<< endl;
75
return
NULL;
76
}
77
78
string
DefaultHepRepType::getName
() {
79
return
name
;
80
}
81
82
string
DefaultHepRepType::getFullName
() {
83
return
(
getSuperType
() == NULL) ?
getName
() :
getSuperType
()->
getFullName
() +
"/"
+
getName
();
84
}
85
86
string
DefaultHepRepType::getDescription
() {
87
return
description
;
88
}
89
90
void
DefaultHepRepType::setDescription
(
string
desc
) {
91
this->
description
=
desc
;
92
}
93
94
string
DefaultHepRepType::getInfoURL
() {
95
return
infoURL
;
96
}
97
98
void
DefaultHepRepType::setInfoURL
(
string
info
) {
99
this->
infoURL
=
info
;
100
}
101
102
void
DefaultHepRepType::addType
(
HepRepType
* type) {
103
// FIXME should check if type already exists
104
types
.push_back(type);
105
}
106
107
vector<HepRepType*>
DefaultHepRepType::getTypeList
() {
108
return
types
;
109
}
110
111
112
}
// cheprep
geant4
tree
geant4-10.6-release
source
visualization
HepRep
src
DefaultHepRepType.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:55
using
1.8.2 with
ECCE GitHub integration