CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

131 : DDHtmlDetails(cat,txt) {}
DDHtmlDetails(const std::string &cat, const std::string &txt)

Member Function Documentation

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

Implements DDHtmlDetails.

Definition at line 230 of file DDHtmlFormatter.cc.

References DDHtmlFormatter::br(), DDLogicalPart::category(), DDEnums::categoryName(), DDBase< N, C >::ddname(), DDHtmlDetails::f_, edm::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().

231 {
232  static bool once = false;
234  if ( !once ) {
235  once = true;
236  DDSpecifics::iterator<DDSpecifics> it, ed;
237  ed.end();
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) {
243  if (pit->size()) {
244  lp_sp_t::instance()[pit->back().lp_].insert(*it);
245  }
246  }
247  }
248  }
249  }
250  string s = nm.ns() + " : " + nm.name();
251  DDLogicalPart lp(nm);
252  os << f_.header(s);
253  os << f_.h2("LogicalPart <b>" + s + "</b>");
254  os << f_.br();
255  if ( lp.isDefined().second == false ) {
256  os << "<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.ns() << "! </p>" << endl;
257  return false;
258  }
259 
260  string so_url = "../../so/" + lp.solid().ddname().ns() + "/" + lp.solid().ddname().name() + ".html";
261  string ma_url = "../../ma/" + lp.material().ddname().ns() + "/" + lp.material().ddname().name() + ".html";
262  string so_nm = lp.solid().ddname().ns() + ":" + lp.solid().ddname().name();
263  string ma_nm = lp.material().ddname().ns() + ":" + lp.material().ddname().name();
264  os << f_.table()
265  << f_.tr() << f_.td("Category") << f_.td( DDEnums::categoryName(lp.category()) ) << f_.trEnd()
266  << f_.tr() << f_.td("Solid") << f_.td( f_.lnk(so_url, so_nm, "_popup" )) << f_.trEnd()
267  << f_.tr() << f_.td("Material") << f_.td(f_.lnk(ma_url, ma_nm, "_popup")) << f_.trEnd();
268  os << f_.tableEnd();
269 
270  typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
271  const lp_sp_type & lp_sp = lp_sp_t::instance();
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());
276  os << "<p>" << endl;
277  for (; it != ed; ++it) {
278  os << f_.link("../../sp/" + it->ddname().ns() + "/" + it->ddname().name() + ".html", it->ddname().fullname(), "_popup")
279  << " " << endl;
280  }
281  os << "</p>" << endl;
282  }
283 
284  os << f_.footer();
285  return true;
286 }
static PFTauRenderPlugin instance
DDHtmlFormatter br()
DDHtmlFormatter h3(const std::string &content)
const std::string & ns() const
Returns the namespace.
Definition: DDName.cc:101
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:88
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()
volatile std::atomic< bool > shutdown_flag false
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
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
ns_type & DDHtmlLpDetails::names ( void  )
virtual

Implements DDHtmlDetails.

Definition at line 84 of file DDHtmlFormatter.cc.

References findNameSpaces(), and DDHtmlDetails::names_.

85 {
86  DDLogicalPart lp;
88  return names_;
89 }
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
bool findNameSpaces(T dummy, ns_type &m)