1 namespace std { }
using namespace std;
5 #include "CLHEP/Units/GlobalSystemOfUnits.h"
19 #include "DetectorDescription/Base/interface/Singleton.icc"
24 o << f.
os_.str(); f.
os_.str(
"");
31 os_ <<
"<html>\n<head>\n<title>" << title <<
"</title>" << endl;
32 os_ <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style <<
"\">" << endl;
40 os_ << lnk(url,txt,target) << endl;
56 os_ <<
"</body></html>" << endl;
68 os_ << f.
header(title_,
"../style.css");
69 os_ << f.
h2(title_) << f.
p(text_);
70 ns_type::const_iterator it = n_.begin();
71 ns_type::const_iterator ed = n_.end();
73 for (; it != ed; ++it) {
74 os_ << f.
li(f.
lnk(it->first +
"/list.html" , it->first, target_));
76 os_ << f.
ulEnd() << endl;
123 <<
f_.
h3(
">> formatting under construction <<");
124 os <<
DDSolid(nm);
return true;
130 <<
f_.
h3(
">> formatting under construction <<");
136 os <<
f_.
header(
"Rotations Details");
140 os <<
"<b>ERROR!</b><br><p>The Rotation " << nm <<
" is not defined!</p>" << endl;
144 ddr.
matrix()->GetComponents(x, y, z);
146 os <<
f_.
h3(
"GEANT3 style:");
147 os <<
"<table border=\"0\">" << endl
148 <<
"<tr><td>thetaX =</td><td>" << x.Theta()/deg <<
" deg</td><tr>" << endl
149 <<
"<tr><td>phiX =</td><td>" << x.Phi()/deg <<
" deg</td><tr>" << endl
150 <<
"<tr><td>thetaY =</td><td>" << y.Theta()/deg <<
" deg</td><tr>" << endl
151 <<
"<tr><td>phiY =</td><td>" << y.Phi()/deg <<
" deg</td><tr>" << endl
152 <<
"<tr><td>thetaZ =</td><td>" << z.Theta()/deg <<
" deg</td><tr>" << endl
153 <<
"<tr><td>phiZ =</td><td>" << z.Phi()/deg <<
" deg</td><tr>" << endl
156 os <<
f_.
h3(
"Rotation axis & angle (theta,phi,angle)") << endl;
163 static bool once =
false;
166 DDLogicalPart::iterator<DDLogicalPart> it, ed;
169 for (; it != ed; ++it) {
170 if (it->isDefined().second)
175 string s = nm.
ns() +
" : " + nm.
name();
178 os <<
f_.
h2(
"Material <b>" + s +
"</b>");
181 os <<
"<b>ERROR!<b><br><p>The Material is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
185 os <<
"<p>density = " << ma.
density()/
g*cm3 <<
" g/cm3 </p>" << endl;
188 os <<
f_.
p(
"Composites by fraction-mass:");
191 for(
int i=0;
i<co; ++
i) {
193 string elem =
"ERROR";
195 double frac = fm.second;
203 os <<
f_.
tr() <<
"<td>" << frac <<
"</td>"
210 os <<
f_.
p(
"ElementaryMaterial:");
211 os <<
"<p>z = " << ma.
z() <<
"</p>" << endl;
212 os <<
"<p>a = " << ma.
a()/
g*mole <<
"g/mole</p>" << endl;
217 set<DDLogicalPart>::const_iterator it(lps.begin()), ed(lps.end());
219 os <<
f_.
h3(
"Material used in following LogicalParts:") << endl;
222 for (; it != ed; ++it ) {
223 const DDName &
n = it->ddname();
226 os <<
"</p>" << endl;
232 static bool once =
false;
236 DDSpecifics::iterator<DDSpecifics> it, ed;
238 for (; it != ed; ++it ) {
239 if (it->isDefined().second) {
240 const vector<DDPartSelection> & ps = it->selection();
241 vector<DDPartSelection>::const_iterator pit(ps.begin()), ped(ps.end());
242 for (; pit != ped; ++pit) {
250 string s = nm.
ns() +
" : " + nm.
name();
253 os <<
f_.
h2(
"LogicalPart <b>" + s +
"</b>");
256 os <<
"<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
270 typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
272 lp_sp_type::const_iterator lpspit = lp_sp.find(lp);
273 if (lpspit != lp_sp.end()) {
274 os <<
f_.
h3(
"assigned SpecPars (Specifics):");
275 set<DDSpecifics>::const_iterator it(lpspit->second.begin()), ed(lpspit->second.end());
277 for (; it != ed; ++it) {
278 os <<
f_.
link(
"../../sp/" + it->ddname().ns() +
"/" + it->ddname().name() +
".html", it->ddname().fullname(),
"_popup")
281 os <<
"</p>" << endl;
292 cout <<
"---> dd_to_html() called with category=" << dtls.
category() << endl;
297 mkdir( category.c_str(), 0755 );
300 string ns_fname = category +
"/ns.html";
301 ofstream ns_file(ns_fname.c_str());
307 ns_type::const_iterator it(names.begin()), ed(names.end());
308 for( ; it != ed; ++it ) {
310 const string & ns = it->first;
313 string dir = category +
"/" + ns;
314 mkdir( dir.c_str(), 0755 );
317 string fname = category +
"/" + ns +
"/list.html";
318 ofstream list_file(fname.c_str());
320 list_file << f.header(text)
321 << f.p(
"Instances in Namespace <b>" + ns +
"</b><br>");
324 set<string>::const_iterator nit(it->second.begin()), ned(it->second.end());
325 for(; nit != ned; ++nit) {
327 const string & nm = *nit;
328 string result_s = nm;
331 string d_fname = category +
"/" + ns +
"/" + nm +
".html";
332 ofstream detail_file(d_fname.c_str());
336 if (!result) result_s =
">> ERROR: " + nm +
" <<";
337 list_file << f.li(f.lnk(nm+
".html", result_s,
"_details"));
340 list_file << f.ulEnd() << f.footer();
352 os_ <<
"<frameset cols=\"25%,*\">" << endl;
353 os_ <<
" <frameset rows=\"50%,*\">" << endl;
354 os_ <<
" <frame src=\"" <<
u1_ <<
"\" name=\"" <<
n1_ <<
"\">" << endl;
355 os_ <<
" <frame src=\"" <<
u2_ <<
"\" name=\"" <<
n2_ <<
"\">" << endl;
356 os_ <<
" </frameset>" << endl;
357 os_ <<
" <frame src=\"" <<
u3_ <<
"\" name=\"" <<
n3_ <<
"\">" << endl;
358 os_ <<
"</frameset>" << endl;
365 os << f.
header(
"DDD Reports");
366 os <<
"<frameset rows=\"50%,50%\"> " << endl
367 <<
" <frameset cols=\"50%,50%\">" << endl
368 <<
" <frame name=\"_ns\" src=\"ns.html\">" << endl
369 <<
" <frame name=\"_list\">" << endl
370 <<
" </frameset>" << endl
371 <<
" <frameset cols=\"50%,50%\">" << endl
372 <<
" <frame name=\"_details\">" << endl
373 <<
" <frame name=\"_popup\">" << endl
374 <<
" </frameset>" << endl
375 <<
"</frameset>" << endl
384 os << f.
header(
"DDD Web Representation");
385 os <<
"<frameset cols=\"20%,80%\">" << endl
386 <<
" <frame name=\"_menu\" src=\"menu.html\">" << endl
387 <<
" <frame name=\"_selection\" >" << endl
388 <<
"</frameset>" << endl;
397 os << f.
header(
"DDD Web Main Menu",
"style.css");
398 os << f.
h1(
"Select a Category:")
399 << f.
p(f.
lnk(
"lp/index.html",
"LogicalParts",
"_selection"))
400 << f.
p(f.
lnk(
"ma/index.html",
"Materials",
"_selection"))
401 << f.
p(f.
lnk(
"so/index.html",
"Solids",
"_selection"))
402 << f.
p(f.
lnk(
"ro/index.html",
"Rotations",
"_selection"))
403 << f.
p(f.
lnk(
"sp/index.html",
"SpecPars",
"_selection"))
double a() const
returns the atomic mass
bool details(std::ostream &os, const DDName &)
def_type isDefined() const
static const HistoName names[]
bool details(std::ostream &os, const DDName &)
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
DDEnums::Category category(void) const
Returns the categorization of the DDLogicalPart (sensitive detector element, cable, ...)
virtual bool details(std::ostream &os, const DDName &)=0
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
bool details(std::ostream &os, const DDName &)
double z() const
retruns the atomic number
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
const std::string fullname() const
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
bool details(std::ostream &os, const DDName &)
virtual ns_type & names()=0
DDHtmlDetails(const std::string &cat, const std::string &txt)
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
const std::string & text()
bool findNameSpaces(T dummy, ns_type &m)
const std::string & category()
bool details(std::ostream &os, const DDName &)
volatile std::atomic< bool > shutdown_flag false
DDRotationMatrix * matrix()
std::map< std::string, std::set< std::string > > ns_type
static const char *const categoryName(Category s)
const std::string & name() const
Returns the name.
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
Interface to attach user specific data to nodes in the expanded-view.