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 &)
 
ns_typenames ()
 
- 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 128 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

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

Definition at line 131 of file DDHtmlFormatter.h.

References cscdqm::h::names.

131 : 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  
)
virtual

Implements DDHtmlDetails.

Definition at line 244 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().

245 {
246  static bool once = false;
248  if ( !once ) {
249  once = true;
250  DDSpecifics::iterator<DDSpecifics> it, ed;
251  ed.end();
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) {
257  if (pit->size()) {
258  lp_sp_t::instance()[pit->back().lp_].insert(*it);
259  }
260  }
261  }
262  }
263  }
264  string s = nm.ns() + " : " + nm.name();
265  DDLogicalPart lp(nm);
266  os << f_.header(s);
267  os << f_.h2("LogicalPart <b>" + s + "</b>");
268  os << f_.br();
269  if ( lp.isDefined().second == false ) {
270  os << "<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.ns() << "! </p>" << endl;
271  return false;
272  }
273 
274  string so_url = "../../so/" + lp.solid().ddname().ns() + "/" + lp.solid().ddname().name() + ".html";
275  string ma_url = "../../ma/" + lp.material().ddname().ns() + "/" + lp.material().ddname().name() + ".html";
276  string so_nm = lp.solid().ddname().ns() + ":" + lp.solid().ddname().name();
277  string ma_nm = lp.material().ddname().ns() + ":" + lp.material().ddname().name();
278  os << f_.table()
279  << f_.tr() << f_.td("Category") << f_.td( DDEnums::categoryName(lp.category()) ) << f_.trEnd()
280  << f_.tr() << f_.td("Solid") << f_.td( f_.lnk(so_url, so_nm, "_popup" )) << f_.trEnd()
281  << f_.tr() << f_.td("Material") << f_.td(f_.lnk(ma_url, ma_nm, "_popup")) << f_.trEnd();
282  os << f_.tableEnd();
283 
284  typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
285  const lp_sp_type & lp_sp = lp_sp_t::instance();
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());
290  os << "<p>" << endl;
291  for (; it != ed; ++it) {
292  os << f_.link("../../sp/" + it->ddname().ns() + "/" + it->ddname().name() + ".html", it->ddname().fullname(), "_popup")
293  << " " << endl;
294  }
295  os << "</p>" << endl;
296  }
297 
298  os << f_.footer();
299  return true;
300 }
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  )
virtual

Implements DDHtmlDetails.

Definition at line 98 of file DDHtmlFormatter.cc.

References findNameSpaces(), and DDHtmlDetails::names_.

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