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 163 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

◆ DDHtmlLpDetails()

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

Definition at line 165 of file DDHtmlFormatter.h.

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

Member Function Documentation

◆ details()

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

Implements DDHtmlDetails.

Definition at line 222 of file DDHtmlFormatter.cc.

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

222  {
223  static bool once = false;
225  if (!once) {
226  once = true;
227  DDSpecifics::iterator<DDSpecifics> it, ed;
228  ed.end();
229  for (; it != ed; ++it) {
230  if (it->isDefined().second) {
231  const vector<DDPartSelection>& ps = it->selection();
232  vector<DDPartSelection>::const_iterator pit(ps.begin()), ped(ps.end());
233  for (; pit != ped; ++pit) {
234  if (!pit->empty()) {
235  lp_sp_t::instance()[pit->back().lp_].insert(*it);
236  }
237  }
238  }
239  }
240  }
241  string s = nm.ns() + " : " + nm.name();
242  DDLogicalPart lp(nm);
243  os << f_.header(s);
244  os << f_.h2("LogicalPart <b>" + s + "</b>");
245  os << f_.br();
246  if (lp.isDefined().second == false) {
247  os << "<b>ERROR!<b><br><p>The LogicalPart is not defined in namespace " << nm.ns() << "! </p>" << endl;
248  return false;
249  }
250 
251  string so_url = "../../so/" + lp.solid().ddname().ns() + "/" + lp.solid().ddname().name() + ".html";
252  string ma_url = "../../ma/" + lp.material().ddname().ns() + "/" + lp.material().ddname().name() + ".html";
253  string so_nm = lp.solid().ddname().ns() + ":" + lp.solid().ddname().name();
254  string ma_nm = lp.material().ddname().ns() + ":" + lp.material().ddname().name();
255  os << f_.table() << f_.tr() << f_.td("Category") << f_.td(DDEnums::categoryName(lp.category())) << f_.trEnd()
256  << f_.tr() << f_.td("Solid") << f_.td(f_.lnk(so_url, so_nm, "_popup")) << f_.trEnd() << f_.tr()
257  << f_.td("Material") << f_.td(f_.lnk(ma_url, ma_nm, "_popup")) << f_.trEnd();
258  os << f_.tableEnd();
259 
260  typedef map<DDLogicalPart, set<DDSpecifics> > lp_sp_type;
261  const lp_sp_type& lp_sp = lp_sp_t::instance();
262  lp_sp_type::const_iterator lpspit = lp_sp.find(lp);
263  if (lpspit != lp_sp.end()) {
264  os << f_.h3("assigned SpecPars (Specifics):");
265  set<DDSpecifics>::const_iterator it(lpspit->second.begin()), ed(lpspit->second.end());
266  os << "<p>" << endl;
267  for (; it != ed; ++it) {
268  os << f_.link("../../sp/" + it->ddname().ns() + "/" + it->ddname().name() + ".html",
269  it->ddname().fullname(),
270  "_popup")
271  << " " << endl;
272  }
273  os << "</p>" << endl;
274  }
275 
276  os << f_.footer();
277  return true;
278 }
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:93
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:26

◆ names()

ns_type & DDHtmlLpDetails::names ( void  )
overridevirtual

Implements DDHtmlDetails.

Definition at line 87 of file DDHtmlFormatter.cc.

References findNameSpaces(), and DDHtmlDetails::names_.

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