#include <DetectorDescription/RegressionTest/interface/DDHtmlFormatter.h>
Public Member Functions | |
DDHtmlLpDetails (const string &cat, const string &txt) | |
bool | details (ostream &os, const DDName &) |
ns_type & | names () |
Definition at line 127 of file DDHtmlFormatter.h.
DDHtmlLpDetails::DDHtmlLpDetails | ( | const string & | cat, | |
const string & | txt | |||
) | [inline] |
Implements DDHtmlDetails.
Definition at line 221 of file DDHtmlFormatter.cc.
References DDHtmlFormatter::br(), DDLogicalPart::category(), DDEnums::categoryName(), DDBase< N, C >::ddname(), lat::endl(), DDHtmlDetails::f_, false, DDHtmlFormatter::footer(), DDHtmlFormatter::h2(), DDHtmlFormatter::h3(), DDHtmlFormatter::header(), DDBase< N, C >::isDefined(), it, DDHtmlFormatter::link(), DDHtmlFormatter::lnk(), lp, DDLogicalPart::material(), DDName::name(), DDName::ns(), s, DDLogicalPart::solid(), DDHtmlFormatter::table(), DDHtmlFormatter::tableEnd(), DDHtmlFormatter::td(), DDHtmlFormatter::tr(), and DDHtmlFormatter::trEnd().
00222 { 00223 static bool once = false; 00224 typedef DDI::Singleton< map<DDLogicalPart, set<DDSpecifics> > > lp_sp_t; 00225 if ( !once ) { 00226 once = true; 00227 DDSpecifics::iterator<DDSpecifics> it, ed; 00228 ed.end(); 00229 for (; it != ed; ++it ) { 00230 if (it->isDefined().second) { 00231 const vector<DDPartSelection> & ps = it->selection(); 00232 vector<DDPartSelection>::const_iterator pit(ps.begin()), ped(ps.end()); 00233 for (; pit != ped; ++pit) { 00234 if (pit->size()) { 00235 lp_sp_t::instance()[pit->back().lp_].insert(*it); 00236 } 00237 } 00238 } 00239 } 00240 } 00241 string s = nm.ns() + " : " + nm.name(); 00242 DDLogicalPart lp(nm); 00243 os << f_.header(s); 00244 os << f_.h2("LogicalPart <b>" + s + "</b>"); 00245 os << f_.br(); 00246 if ( lp.isDefined().second == false ) { 00247 os << "<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.ns() << "! </p>" << endl; 00248 return false; 00249 } 00250 00251 string so_url = "../../so/" + lp.solid().ddname().ns() + "/" + lp.solid().ddname().name() + ".html"; 00252 string ma_url = "../../ma/" + lp.material().ddname().ns() + "/" + lp.material().ddname().name() + ".html"; 00253 string so_nm = lp.solid().ddname().ns() + ":" + lp.solid().ddname().name(); 00254 string ma_nm = lp.material().ddname().ns() + ":" + lp.material().ddname().name(); 00255 os << f_.table() 00256 << f_.tr() << f_.td("Category") << f_.td( DDEnums::categoryName(lp.category()) ) << f_.trEnd() 00257 << f_.tr() << f_.td("Solid") << f_.td( f_.lnk(so_url, so_nm, "_popup" )) << f_.trEnd() 00258 << f_.tr() << f_.td("Material") << f_.td(f_.lnk(ma_url, ma_nm, "_popup")) << f_.trEnd(); 00259 os << f_.tableEnd(); 00260 00261 typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type; 00262 const lp_sp_type & lp_sp = lp_sp_t::instance(); 00263 lp_sp_type::const_iterator lpspit = lp_sp.find(lp); 00264 if (lpspit != lp_sp.end()) { 00265 os << f_.h3("assigned SpecPars (Specifics):"); 00266 set<DDSpecifics>::const_iterator it(lpspit->second.begin()), ed(lpspit->second.end()); 00267 os << "<p>" << endl; 00268 for (; it != ed; ++it) { 00269 os << f_.link("../../sp/" + it->ddname().ns() + "/" + it->ddname().name() + ".html", it->ddname(), "_popup") 00270 << " " << endl; 00271 } 00272 os << "</p>" << endl; 00273 } 00274 00275 os << f_.footer(); 00276 return true; 00277 }
ns_type & DDHtmlLpDetails::names | ( | ) | [virtual] |
Implements DDHtmlDetails.
Definition at line 74 of file DDHtmlFormatter.cc.
References findNameSpaces(), lp, and DDHtmlDetails::names_.
Referenced by dd_to_html().
00075 { 00076 DDLogicalPart lp; 00077 findNameSpaces(lp, names_); 00078 return names_; 00079 }