CMS 3D CMS Logo

List of all members | Public Member Functions
DDHtmlRoDetails Class Reference

#include <DDHtmlFormatter.h>

Inheritance diagram for DDHtmlRoDetails:
DDHtmlDetails

Public Member Functions

 DDHtmlRoDetails (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 184 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

◆ DDHtmlRoDetails()

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

Definition at line 186 of file DDHtmlFormatter.h.

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

Member Function Documentation

◆ details()

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

Implements DDHtmlDetails.

Definition at line 129 of file DDHtmlFormatter.cc.

References angle_units::operators::convertRadToDeg(), DDHtmlDetails::f_, DDName::fullname(), DDHtmlFormatter::h2(), DDHtmlFormatter::h3(), DDHtmlFormatter::header(), DDBase< N, C >::isDefined(), DDRotation::matrix(), x, y, and z.

129  {
130  os << f_.header("Rotations Details");
131 
132  DDRotation ddr(nm);
133  if (ddr.isDefined().second == false) {
134  os << "<b>ERROR!</b><br><p>The Rotation " << nm << " is not defined!</p>" << endl;
135  return false;
136  }
137  DD3Vector x, y, z;
138  ddr.matrix().GetComponents(x, y, z);
139  os << f_.h2("Rotation: " + nm.fullname());
140  os << f_.h3("GEANT3 style:");
141  os << "<table border=\"0\">" << endl
142  << "<tr><td>thetaX =</td><td>" << convertRadToDeg(x.Theta()) << " deg</td><tr>" << endl
143  << "<tr><td>phiX =</td><td>" << convertRadToDeg(x.Phi()) << " deg</td><tr>" << endl
144  << "<tr><td>thetaY =</td><td>" << convertRadToDeg(y.Theta()) << " deg</td><tr>" << endl
145  << "<tr><td>phiY =</td><td>" << convertRadToDeg(y.Phi()) << " deg</td><tr>" << endl
146  << "<tr><td>thetaZ =</td><td>" << convertRadToDeg(z.Theta()) << " deg</td><tr>" << endl
147  << "<tr><td>phiZ =</td><td>" << convertRadToDeg(z.Phi()) << " deg</td><tr>" << endl
148  << "</table>";
149 
150  os << f_.h3("Rotation axis & angle (theta,phi,angle)") << endl;
151  os << DDRotation(nm);
152  return true;
153 }
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
DDHtmlFormatter h3(const std::string &content)
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
DDHtmlFormatter f_
DDHtmlFormatter h2(const std::string &content)
DDHtmlFormatter header(const std::string &text, const std::string &style="../../style.css")

◆ names()

ns_type & DDHtmlRoDetails::names ( void  )
overridevirtual

Implements DDHtmlDetails.

Definition at line 111 of file DDHtmlFormatter.cc.

References findNameSpaces(), and DDHtmlDetails::names_.

111  {
112  DDRotation lp;
113  findNameSpaces(lp, names_);
114  return names_;
115 }
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
bool findNameSpaces(T dummy, ns_type &m)