1 namespace std { }
using namespace std;
11 #include "CLHEP/Units/GlobalSystemOfUnits.h"
12 #include "CLHEP/Units/SystemOfUnits.h"
16 #include "DetectorDescription/Base/interface/Singleton.icc"
38 o << f.
os_.str(); f.
os_.str(
"");
45 os_ <<
"<html>\n<head>\n<title>" << title <<
"</title>" << endl;
46 os_ <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style <<
"\">" << endl;
54 os_ << lnk(url,txt,target) << endl;
70 os_ <<
"</body></html>" << endl;
82 os_ << f.
header(title_,
"../style.css");
83 os_ << f.
h2(title_) << f.
p(text_);
84 ns_type::const_iterator it = n_.begin();
85 ns_type::const_iterator ed = n_.end();
87 for (; it != ed; ++it) {
88 os_ << f.
li(f.
lnk(it->first +
"/list.html" , it->first, target_));
90 os_ << f.
ulEnd() << endl;
137 <<
f_.
h3(
">> formatting under construction <<");
138 os <<
DDSolid(nm);
return true;
144 <<
f_.
h3(
">> formatting under construction <<");
150 os <<
f_.
header(
"Rotations Details");
154 os <<
"<b>ERROR!</b><br><p>The Rotation " << nm <<
" is not defined!</p>" << endl;
158 ddr.
matrix()->GetComponents(x, y, z);
160 os <<
f_.
h3(
"GEANT3 style:");
161 os <<
"<table border=\"0\">" << endl
162 <<
"<tr><td>thetaX =</td><td>" << x.Theta()/deg <<
" deg</td><tr>" << endl
163 <<
"<tr><td>phiX =</td><td>" << x.Phi()/deg <<
" deg</td><tr>" << endl
164 <<
"<tr><td>thetaY =</td><td>" << y.Theta()/deg <<
" deg</td><tr>" << endl
165 <<
"<tr><td>phiY =</td><td>" << y.Phi()/deg <<
" deg</td><tr>" << endl
166 <<
"<tr><td>thetaZ =</td><td>" << z.Theta()/deg <<
" deg</td><tr>" << endl
167 <<
"<tr><td>phiZ =</td><td>" << z.Phi()/deg <<
" deg</td><tr>" << endl
170 os <<
f_.
h3(
"Rotation axis & angle (theta,phi,angle)") << endl;
177 static bool once =
false;
180 DDLogicalPart::iterator<DDLogicalPart> it, ed;
183 for (; it != ed; ++it) {
184 if (it->isDefined().second)
189 string s = nm.
ns() +
" : " + nm.
name();
192 os <<
f_.
h2(
"Material <b>" + s +
"</b>");
195 os <<
"<b>ERROR!<b><br><p>The Material is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
199 os <<
"<p>density = " << ma.
density()/
g*cm3 <<
" g/cm3 </p>" << endl;
202 os <<
f_.
p(
"Composites by fraction-mass:");
205 for(
int i=0;
i<co; ++
i) {
207 string elem =
"ERROR";
209 double frac = fm.second;
217 os <<
f_.
tr() <<
"<td>" << frac <<
"</td>"
224 os <<
f_.
p(
"ElementaryMaterial:");
225 os <<
"<p>z = " << ma.
z() <<
"</p>" << endl;
226 os <<
"<p>a = " << ma.
a()/
g*mole <<
"g/mole</p>" << endl;
231 set<DDLogicalPart>::const_iterator it(lps.begin()), ed(lps.end());
233 os <<
f_.
h3(
"Material used in following LogicalParts:") << endl;
236 for (; it != ed; ++it ) {
237 const DDName &
n = it->ddname();
240 os <<
"</p>" << endl;
246 static bool once =
false;
250 DDSpecifics::iterator<DDSpecifics> it, ed;
252 for (; it != ed; ++it ) {
253 if (it->isDefined().second) {
254 const vector<DDPartSelection> & ps = it->selection();
255 vector<DDPartSelection>::const_iterator pit(ps.begin()), ped(ps.end());
256 for (; pit != ped; ++pit) {
264 string s = nm.
ns() +
" : " + nm.
name();
267 os <<
f_.
h2(
"LogicalPart <b>" + s +
"</b>");
270 os <<
"<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.
ns() <<
"! </p>" << endl;
284 typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
286 lp_sp_type::const_iterator lpspit = lp_sp.find(lp);
287 if (lpspit != lp_sp.end()) {
288 os <<
f_.
h3(
"assigned SpecPars (Specifics):");
289 set<DDSpecifics>::const_iterator it(lpspit->second.begin()), ed(lpspit->second.end());
291 for (; it != ed; ++it) {
292 os <<
f_.
link(
"../../sp/" + it->ddname().ns() +
"/" + it->ddname().name() +
".html", it->ddname().fullname(),
"_popup")
295 os <<
"</p>" << endl;
306 cout <<
"---> dd_to_html() called with category=" << dtls.
category() << endl;
311 mkdir( category.c_str(), 0755 );
314 string ns_fname = category +
"/ns.html";
315 ofstream ns_file(ns_fname.c_str());
321 ns_type::const_iterator it(names.begin()), ed(names.end());
322 for( ; it != ed; ++it ) {
324 const string & ns = it->first;
327 string dir = category +
"/" + ns;
328 mkdir( dir.c_str(), 0755 );
331 string fname = category +
"/" + ns +
"/list.html";
332 ofstream list_file(fname.c_str());
334 list_file << f.header(text)
335 << f.p(
"Instances in Namespace <b>" + ns +
"</b><br>");
338 set<string>::const_iterator nit(it->second.begin()), ned(it->second.end());
339 for(; nit != ned; ++nit) {
341 const string & nm = *nit;
342 string result_s = nm;
345 string d_fname = category +
"/" + ns +
"/" + nm +
".html";
346 ofstream detail_file(d_fname.c_str());
350 if (!result) result_s =
">> ERROR: " + nm +
" <<";
351 list_file << f.li(f.lnk(nm+
".html", result_s,
"_details"));
354 list_file << f.ulEnd() << f.footer();
366 os_ <<
"<frameset cols=\"25%,*\">" << endl;
367 os_ <<
" <frameset rows=\"50%,*\">" << endl;
368 os_ <<
" <frame src=\"" <<
u1_ <<
"\" name=\"" <<
n1_ <<
"\">" << endl;
369 os_ <<
" <frame src=\"" <<
u2_ <<
"\" name=\"" <<
n2_ <<
"\">" << endl;
370 os_ <<
" </frameset>" << endl;
371 os_ <<
" <frame src=\"" <<
u3_ <<
"\" name=\"" <<
n3_ <<
"\">" << endl;
372 os_ <<
"</frameset>" << endl;
379 os << f.
header(
"DDD Reports");
380 os <<
"<frameset rows=\"50%,50%\"> " << endl
381 <<
" <frameset cols=\"50%,50%\">" << endl
382 <<
" <frame name=\"_ns\" src=\"ns.html\">" << endl
383 <<
" <frame name=\"_list\">" << endl
384 <<
" </frameset>" << endl
385 <<
" <frameset cols=\"50%,50%\">" << endl
386 <<
" <frame name=\"_details\">" << endl
387 <<
" <frame name=\"_popup\">" << endl
388 <<
" </frameset>" << endl
389 <<
"</frameset>" << endl
398 os << f.
header(
"DDD Web Representation");
399 os <<
"<frameset cols=\"20%,80%\">" << endl
400 <<
" <frame name=\"_menu\" src=\"menu.html\">" << endl
401 <<
" <frame name=\"_selection\" >" << endl
402 <<
"</frameset>" << endl;
411 os << f.
header(
"DDD Web Main Menu",
"style.css");
412 os << f.
h1(
"Select a Category:")
413 << f.
p(f.
lnk(
"lp/index.html",
"LogicalParts",
"_selection"))
414 << f.
p(f.
lnk(
"ma/index.html",
"Materials",
"_selection"))
415 << f.
p(f.
lnk(
"so/index.html",
"Solids",
"_selection"))
416 << f.
p(f.
lnk(
"ro/index.html",
"Rotations",
"_selection"))
417 << 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.