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) {}

Member Function Documentation

◆ details()

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

Implements DDHtmlDetails.

Definition at line 222 of file DDHtmlFormatter.cc.

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 }

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(), 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().

◆ names()

ns_type & DDHtmlLpDetails::names ( void  )
overridevirtual

Implements DDHtmlDetails.

Definition at line 87 of file DDHtmlFormatter.cc.

87  {
88  DDLogicalPart lp;
90  return names_;
91 }

References findNameSpaces(), and DDHtmlDetails::names_.

DDHtmlFormatter::h3
DDHtmlFormatter h3(const std::string &content)
Definition: DDHtmlFormatter.h:64
DDHtmlFormatter::lnk
std::string lnk(const std::string &url, const std::string &text, const std::string &target="_self")
Definition: DDHtmlFormatter.cc:54
DDHtmlFormatter::footer
DDHtmlFormatter footer()
Definition: DDHtmlFormatter.cc:62
eostools.cat
def cat(path)
Definition: eostools.py:401
DDI::Singleton
Definition: Singleton.h:6
DDHtmlFormatter::br
DDHtmlFormatter br()
Definition: DDHtmlFormatter.h:27
findNameSpaces
bool findNameSpaces(T dummy, ns_type &m)
Definition: DDErrorDetection.h:68
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDHtmlFormatter::link
DDHtmlFormatter link(const std::string &url, const std::string &text, const std::string &target="_self")
Definition: DDHtmlFormatter.cc:48
DDEnums::categoryName
static const char *const categoryName(Category s)
Definition: DDEnums.h:26
DDHtmlDetails::DDHtmlDetails
DDHtmlDetails(const std::string &cat, const std::string &txt)
Definition: DDHtmlFormatter.cc:85
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDHtmlFormatter::tableEnd
DDHtmlFormatter tableEnd()
Definition: DDHtmlFormatter.h:78
DDHtmlFormatter::td
DDHtmlFormatter td(const std::string &content)
Definition: DDHtmlFormatter.h:93
DDHtmlFormatter::header
DDHtmlFormatter header(const std::string &text, const std::string &style="../../style.css")
Definition: DDHtmlFormatter.cc:40
DDHtmlFormatter::trEnd
DDHtmlFormatter trEnd()
Definition: DDHtmlFormatter.h:88
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
DDHtmlFormatter::tr
DDHtmlFormatter tr()
Definition: DDHtmlFormatter.h:83
DDHtmlFormatter::table
DDHtmlFormatter table(int border=0)
Definition: DDHtmlFormatter.h:73
DDHtmlDetails::names_
ns_type names_
Definition: DDHtmlFormatter.h:158
DDHtmlFormatter::h2
DDHtmlFormatter h2(const std::string &content)
Definition: DDHtmlFormatter.h:59
DDHtmlDetails::f_
DDHtmlFormatter f_
Definition: DDHtmlFormatter.h:160