CMS 3D CMS Logo

List of all members | Public Member Functions
DDHtmlLpDetails Class Reference

#include <DDHtmlFormatter.h>

Inheritance diagram for DDHtmlLpDetails:
DDHtmlDetails

Public Member Functions

 DDHtmlLpDetails (const std::string &cat, const std::string &txt)
 
bool details (std::ostream &os, const DDName &) override
 
ns_typenames () override
 
- Public Member Functions inherited from DDHtmlDetails
const std::string & category ()
 
 DDHtmlDetails (const std::string &cat, const std::string &txt)
 
const std::string & text ()
 
virtual ~DDHtmlDetails ()
 

Additional Inherited Members

- Protected Attributes inherited from DDHtmlDetails
std::string cat_
 
DDHtmlFormatter f_
 
ns_type names_
 
std::string txt_
 

Detailed Description

Definition at line 117 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

DDHtmlLpDetails::DDHtmlLpDetails ( const std::string &  cat,
const std::string &  txt 
)
inline

Definition at line 120 of file DDHtmlFormatter.h.

References cscdqm::h::names.

120 : DDHtmlDetails(cat,txt) {}
def cat(path)
Definition: eostools.py:400
DDHtmlDetails(const std::string &cat, const std::string &txt)

Member Function Documentation

bool DDHtmlLpDetails::details ( std::ostream &  os,
const DDName  
)
overridevirtual

Implements DDHtmlDetails.

Definition at line 240 of file DDHtmlFormatter.cc.

References DDHtmlFormatter::br(), DDLogicalPart::category(), DDEnums::categoryName(), DDBase< N, C >::ddname(), DDHtmlDetails::f_, funct::false, DDHtmlFormatter::footer(), DDHtmlFormatter::h2(), DDHtmlFormatter::h3(), DDHtmlFormatter::header(), instance, DDBase< N, C >::isDefined(), DDHtmlFormatter::link(), DDHtmlFormatter::lnk(), DDLogicalPart::material(), DDName::name(), DDName::ns(), alignCSCRings::s, DDLogicalPart::solid(), DDHtmlFormatter::table(), DDHtmlFormatter::tableEnd(), DDHtmlFormatter::td(), DDHtmlFormatter::tr(), and DDHtmlFormatter::trEnd().

241 {
242  static bool once = false;
244  if ( !once ) {
245  once = true;
246  DDSpecifics::iterator<DDSpecifics> it, ed;
247  ed.end();
248  for (; it != ed; ++it ) {
249  if (it->isDefined().second) {
250  const vector<DDPartSelection> & ps = it->selection();
251  vector<DDPartSelection>::const_iterator pit(ps.begin()), ped(ps.end());
252  for (; pit != ped; ++pit) {
253  if (!pit->empty()) {
254  lp_sp_t::instance()[pit->back().lp_].insert(*it);
255  }
256  }
257  }
258  }
259  }
260  string s = nm.ns() + " : " + nm.name();
261  DDLogicalPart lp(nm);
262  os << f_.header(s);
263  os << f_.h2("LogicalPart <b>" + s + "</b>");
264  os << f_.br();
265  if ( lp.isDefined().second == false ) {
266  os << "<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.ns() << "! </p>" << endl;
267  return false;
268  }
269 
270  string so_url = "../../so/" + lp.solid().ddname().ns() + "/" + lp.solid().ddname().name() + ".html";
271  string ma_url = "../../ma/" + lp.material().ddname().ns() + "/" + lp.material().ddname().name() + ".html";
272  string so_nm = lp.solid().ddname().ns() + ":" + lp.solid().ddname().name();
273  string ma_nm = lp.material().ddname().ns() + ":" + lp.material().ddname().name();
274  os << f_.table()
275  << f_.tr() << f_.td("Category") << f_.td( DDEnums::categoryName(lp.category()) ) << f_.trEnd()
276  << f_.tr() << f_.td("Solid") << f_.td( f_.lnk(so_url, so_nm, "_popup" )) << f_.trEnd()
277  << f_.tr() << f_.td("Material") << f_.td(f_.lnk(ma_url, ma_nm, "_popup")) << f_.trEnd();
278  os << f_.tableEnd();
279 
280  typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
281  const lp_sp_type & lp_sp = lp_sp_t::instance();
282  lp_sp_type::const_iterator lpspit = lp_sp.find(lp);
283  if (lpspit != lp_sp.end()) {
284  os << f_.h3("assigned SpecPars (Specifics):");
285  set<DDSpecifics>::const_iterator it(lpspit->second.begin()), ed(lpspit->second.end());
286  os << "<p>" << endl;
287  for (; it != ed; ++it) {
288  os << f_.link("../../sp/" + it->ddname().ns() + "/" + it->ddname().name() + ".html", it->ddname().fullname(), "_popup")
289  << " " << endl;
290  }
291  os << "</p>" << endl;
292  }
293 
294  os << f_.footer();
295  return true;
296 }
static PFTauRenderPlugin instance
DDHtmlFormatter br()
DDHtmlFormatter h3(const std::string &content)
DDHtmlFormatter td(const std::string &content)
DDHtmlFormatter f_
DDHtmlFormatter h2(const std::string &content)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
DDHtmlFormatter table(int border=0)
DDHtmlFormatter tableEnd()
DDHtmlFormatter tr()
DDHtmlFormatter header(const std::string &text, const std::string &style="../../style.css")
std::string lnk(const std::string &url, const std::string &text, const std::string &target="_self")
DDHtmlFormatter trEnd()
DDHtmlFormatter link(const std::string &url, const std::string &text, const std::string &target="_self")
DDHtmlFormatter footer()
static const char *const categoryName(Category s)
Definition: DDEnums.h:17
ns_type & DDHtmlLpDetails::names ( void  )
overridevirtual

Implements DDHtmlDetails.

Definition at line 94 of file DDHtmlFormatter.cc.

References findNameSpaces(), and DDHtmlDetails::names_.

95 {
96  DDLogicalPart lp;
98  return names_;
99 }
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
bool findNameSpaces(T dummy, ns_type &m)