97{
98 static G4bool first =
true;
99 if (first) {
100 first = false;
101 os << " Verbosity actions:"
102 << "\n >=0 one line"
103 << "\n >=1 a few lines"
104 << "\n >=2 check G4Atts"
105 << "\n >=3 print G4Atts"
106 << "\n >=4 print some attValues"
107 << '\n';
108 }
109
112 switch (fType) {
114 status = "error";
115 break;
117 status = "active";
118 break;
120 [[fallthrough]];
122 status = (fVisAttributes.
IsVisible() ?
"active" :
"inactive");
123 break;
125 [[fallthrough]];
127 status = (fVisAttributes.
IsVisible() ?
"visible" :
"invisible");
128 break;
129 }
130 if (fExpanded) {
131 status += ",expanded";
132 } else {
133 status += ",collapsed";
134 }
135 os << status << ')';
136
138 switch (fType) {
140 break;
142 break;
144 [[fallthrough]];
146 description = " \"" + fModelDescription + '"';
147 break;
149 [[fallthrough]];
151 description = " (" + fPVPath.substr(1, fPVPath.length() - 1) + ')';
152 break;
153 }
154 os << description;
155
158 }
159
160
161 if (verbosity >= 1) {
165 << "\n " << fChildren.size() << (fChildren.size()==1?" child":" children");
166 }
167
168
169 if (verbosity >= 2) {
172 if (attDefs == nullptr || attValues == nullptr) {
173 os << "\n No G4Atts";
174 }
175 else {
177 if (attCheck.Check("G4SceneTreeItem::Dump")) {
179 ed << "Item: " << attCheck;
181 "G4Atts don't check out");
182 return;
183 }
184
185 if (verbosity >= 3) {
186 os << "\n G4Atts:\n" << attCheck;
187 static G4bool first1 =
true;
188 if (first1) {
189 first1 = false;
190 os << "\n Available G4Atts for touchable:";
191
193 os << "\n " << att.first
194 << ',' << att.second.GetName()
195 << ',' << att.second.GetDesc()
196 << ',' << att.second.GetCategory()
197 << ',' << att.second.GetExtra()
198 << ',' << att.second.GetValueType()
199 << ',' << att.second.GetTypeKey();
200 }
201
202 os << '\n';
203 }
204 }
205
206 if (verbosity >= 4) {
207 for (
G4String name : {
"PVPath",
"GlobalExtent"}) {
209 const auto& iterAttDef = attDefs->find(name);
210 if (iterAttDef != attDefs->end()) {
211 result = result + "\n " + iterAttDef->second.GetName();
212 result = result + ", " + iterAttDef->second.GetDesc();
213 }
215 for (const auto& attValue : *attValues) {
216
217 if (attValue.GetName() == name) {
218 pAttValue = &attValue;
219 break;
220 }
221 }
222 if (pAttValue) {
223 result = result +
", " + pAttValue->
GetValue();
224 }
225
226 os << result;
227 }
228 }
229 }
230 }
231
232 os << std::endl;
233}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
const G4String & GetValue() const
const G4String & GetDescription() const
const G4String & GetModelDescription() const
const G4String & GetTypeString() const
const std::map< G4String, G4AttDef > * GetAttDefs() const
const G4String & GetModelType() const
std::vector< G4AttValue > * GetAttValues() const
const G4Colour & GetColour() const