4 #include "DetectorDescription/Core/interface/Singleton.icc" 42 os_ <<
"<html>\n<head>\n<title>" <<
title <<
"</title>" << endl;
43 os_ <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" <<
style <<
"\">" << endl;
64 os_ <<
"</body></html>" << endl;
73 os_ <<
f.header(title_,
"../style.css");
74 os_ <<
f.h2(title_) <<
f.p(text_);
75 ns_type::const_iterator
it = n_.begin();
76 ns_type::const_iterator ed = n_.end();
78 for (;
it != ed; ++
it) {
79 os_ <<
f.li(
f.lnk(
it->first +
"/list.html",
it->first, target_));
81 os_ <<
f.ulEnd() << endl;
82 os_ <<
f.footer() << endl;
118 os <<
f_.
header(
"Solid Details") <<
f_.
h3(
">> formatting under construction <<");
124 os <<
f_.
header(
"SpecPars Details") <<
f_.
h3(
">> formatting under construction <<");
130 os <<
f_.
header(
"Rotations Details");
134 os <<
"<b>ERROR!</b><br><p>The Rotation " << nm <<
" is not defined!</p>" << endl;
140 os <<
f_.
h3(
"GEANT3 style:");
141 os <<
"<table border=\"0\">" << endl
142 <<
"<tr><td>thetaX =</td><td>" <<
convertRadToDeg(
x.Theta()) <<
" deg</td><tr>" << endl
143 <<
"<tr><td>phiX =</td><td>" <<
convertRadToDeg(
x.Phi()) <<
" deg</td><tr>" << endl
144 <<
"<tr><td>thetaY =</td><td>" <<
convertRadToDeg(
y.Theta()) <<
" deg</td><tr>" << endl
145 <<
"<tr><td>phiY =</td><td>" <<
convertRadToDeg(
y.Phi()) <<
" deg</td><tr>" << endl
146 <<
"<tr><td>thetaZ =</td><td>" <<
convertRadToDeg(
z.Theta()) <<
" deg</td><tr>" << endl
147 <<
"<tr><td>phiZ =</td><td>" <<
convertRadToDeg(
z.Phi()) <<
" deg</td><tr>" << endl
150 os <<
f_.
h3(
"Rotation axis & angle (theta,phi,angle)") << endl;
157 static bool once =
false;
160 DDLogicalPart::iterator<DDLogicalPart>
it, ed;
163 for (;
it != ed; ++
it) {
164 if (
it->isDefined().second)
169 string s = nm.
ns() +
" : " + nm.
name();
172 os <<
f_.
h2(
"Material <b>" +
s +
"</b>");
175 os <<
"<b>ERROR!<b><br><p>The Material is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
182 os <<
f_.
p(
"Composites by fraction-mass:");
185 for (
int i = 0;
i <
co; ++
i) {
187 string elem =
"ERROR";
189 double frac = fm.second;
191 if (
m.isDefined().second) {
192 if (
m.noOfConstituents())
197 os <<
f_.
tr() <<
"<td>" <<
frac <<
"</td>" 198 <<
f_.
td(
f_.
lnk(
"../" +
m.ddname().ns() +
"/" +
m.ddname().name() +
".html",
m.ddname().fullname(),
"_popup"))
203 os <<
f_.
p(
"ElementaryMaterial:");
204 os <<
"<p>z = " << ma.
z() <<
"</p>" << endl;
205 os <<
"<p>a = " <<
convertUnitsTo(1._g_per_mole, ma.
a()) <<
"g/mole</p>" << endl;
209 set<DDLogicalPart>::const_iterator
it(lps.begin()), ed(lps.end());
211 os <<
f_.
h3(
"Material used in following LogicalParts:") << endl;
214 for (;
it != ed; ++
it) {
216 os <<
f_.
link(
"../../lp/" +
n.ns() +
"/" +
n.name() +
".html",
n.fullname(),
"_popup");
218 os <<
"</p>" << endl;
223 static bool once =
false;
227 DDSpecifics::iterator<DDSpecifics>
it, ed;
229 for (;
it != ed; ++
it) {
230 if (
it->isDefined().second) {
231 const vector<DDPartSelection>& ps =
it->selection();
232 vector<DDPartSelection>::const_iterator pit(ps.begin()),
ped(ps.end());
233 for (; pit !=
ped; ++pit) {
241 string s = nm.
ns() +
" : " + nm.
name();
244 os <<
f_.
h2(
"LogicalPart <b>" +
s +
"</b>");
247 os <<
"<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
260 typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
262 lp_sp_type::const_iterator lpspit = lp_sp.find(lp);
263 if (lpspit != lp_sp.end()) {
264 os <<
f_.
h3(
"assigned SpecPars (Specifics):");
265 set<DDSpecifics>::const_iterator
it(lpspit->second.begin()), ed(lpspit->second.end());
267 for (;
it != ed; ++
it) {
268 os <<
f_.
link(
"../../sp/" +
it->ddname().ns() +
"/" +
it->ddname().name() +
".html",
269 it->ddname().fullname(),
273 os <<
"</p>" << endl;
283 cout <<
"---> dd_to_html() called with category=" << dtls.
category() << endl;
291 string ns_fname =
category +
"/ns.html";
292 ofstream ns_file(ns_fname.c_str());
298 ns_type::const_iterator
it(
names.begin()), ed(
names.end());
299 for (;
it != ed; ++
it) {
300 const string& ns =
it->first;
308 ofstream list_file(
fname.c_str());
310 list_file <<
f.header(
text) <<
f.p(
"Instances in Namespace <b>" + ns +
"</b><br>");
313 set<string>::const_iterator nit(
it->second.begin()), ned(
it->second.end());
314 for (; nit != ned; ++nit) {
315 const string& nm = *nit;
316 string result_s = nm;
319 string d_fname =
category +
"/" + ns +
"/" + nm +
".html";
320 ofstream detail_file(d_fname.c_str());
325 result_s =
">> ERROR: " + nm +
" <<";
326 list_file <<
f.li(
f.lnk(nm +
".html", result_s,
"_details"));
328 list_file <<
f.ulEnd() <<
f.footer();
338 os_ <<
"<frameset cols=\"25%,*\">" << endl;
339 os_ <<
" <frameset rows=\"50%,*\">" << endl;
340 os_ <<
" <frame src=\"" <<
u1_ <<
"\" name=\"" <<
n1_ <<
"\">" << endl;
341 os_ <<
" <frame src=\"" <<
u2_ <<
"\" name=\"" <<
n2_ <<
"\">" << endl;
342 os_ <<
" </frameset>" << endl;
343 os_ <<
" <frame src=\"" <<
u3_ <<
"\" name=\"" <<
n3_ <<
"\">" << endl;
344 os_ <<
"</frameset>" << endl;
345 os_ <<
f.footer() << endl;
350 os <<
f.header(
"DDD Reports");
351 os <<
"<frameset rows=\"50%,50%\"> " << endl
352 <<
" <frameset cols=\"50%,50%\">" << endl
353 <<
" <frame name=\"_ns\" src=\"ns.html\">" << endl
354 <<
" <frame name=\"_list\">" << endl
355 <<
" </frameset>" << endl
356 <<
" <frameset cols=\"50%,50%\">" << endl
357 <<
" <frame name=\"_details\">" << endl
358 <<
" <frame name=\"_popup\">" << endl
359 <<
" </frameset>" << endl
360 <<
"</frameset>" << endl
367 os <<
f.header(
"DDD Web Representation");
368 os <<
"<frameset cols=\"20%,80%\">" << endl
369 <<
" <frame name=\"_menu\" src=\"menu.html\">" << endl
370 <<
" <frame name=\"_selection\" >" << endl
371 <<
"</frameset>" << endl;
378 os <<
f.header(
"DDD Web Main Menu",
"style.css");
379 os <<
f.h1(
"Select a Category:") <<
f.p(
f.lnk(
"lp/index.html",
"LogicalParts",
"_selection"))
380 <<
f.p(
f.lnk(
"ma/index.html",
"Materials",
"_selection")) <<
f.p(
f.lnk(
"so/index.html",
"Solids",
"_selection"))
381 <<
f.p(
f.lnk(
"ro/index.html",
"Rotations",
"_selection")) <<
f.p(
f.lnk(
"sp/index.html",
"SpecPars",
"_selection"));
bool details(std::ostream &os, const DDName &) override
ns_type & names() override
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
bool details(std::ostream &os, const DDName &) override
virtual bool details(std::ostream &os, const DDName &)=0
constexpr NumType convertRadToDeg(NumType radians)
bool details(std::ostream &os, const DDName &) override
DDName is used to identify DDD entities uniquely.
__host__ __device__ VT * co
bool details(std::ostream &os, const DDName &) override
const std::string names[nVars_]
A DDSolid represents the shape of a part.
constexpr NumType convertUnitsTo(double desiredUnits, NumType val)
Represents a uniquely identifyable rotation matrix.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
const std::string & name() const
Returns the name.
std::map< std::string, std::set< std::string > > ns_type
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
DDEnums::Category category(void) const
Returns the categorization of the DDLogicalPart (sensitive detector element, cable, ...)
bool details(std::ostream &os, const DDName &) override
virtual ns_type & names()=0
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
double density() const
returns the density
ns_type & names() override
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
double z() const
retruns the atomic number
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
DDHtmlDetails(const std::string &cat, const std::string &txt)
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
const std::string fullname() const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
ns_type & names() override
const std::string & text()
bool findNameSpaces(T dummy, ns_type &m)
const std::string & category()
double a() const
returns the atomic mass
ns_type & names() override
def_type isDefined() const
static const char *const categoryName(Category s)
Interface to attach user specific data to nodes in the expanded-view.
ns_type & names() override
DDRotationMatrix & matrix()
const std::string & ns() const
Returns the namespace.