CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDExpandedViewDump.h File Reference
#include <iostream>
#include "DetectorDescription/Core/interface/DDExpandedView.h"

Go to the source code of this file.

Functions

void DDExpandedViewDump (ostream &, DDExpandedView &, size_t skip=0, size_t mx=0)
 

Function Documentation

void DDExpandedViewDump ( ostream &  ,
DDExpandedView ,
size_t  skip = 0,
size_t  mx = 0 
)

Definition at line 9 of file DDExpandedViewDump.cc.

References DDExpandedView::copyno(), prof2calltree::count, gather_cfg::cout, DDExpandedView::geoHistory(), cuy::ins, DDExpandedView::logicalPart(), DDBase< N, C >::name(), DDExpandedView::next(), query::result, submit::rm, DDExpandedView::rotation(), alignCSCRings::s, runGlobalFakeInputProducer::skip, DDExpandedView::translation(), and findQualityFiles::v.

10 {
11  typedef set<string>::iterator s_iter;
12  set<string> result;
13  bool go(true);
14  int count(0);
15  bool dotrans(true);
16  if (getenv("DDNOTRANS")) dotrans=false;
17  ++skip;
18  while(go) {
19  if ((count % 5000)==0) cout << count << ' ' << flush;
20  if (sto > 0) if ((count % sto)==0) break;
21  ++count;
22  if((count % skip) ==0){
23  stringstream s;
24  s.setf(ios_base::fixed,ios_base::floatfield);
25  s.precision(2);
26  s << ex.logicalPart().name() << ' '
27  << ex.copyno() << ' '
28  << ex.geoHistory() << " r="
29  << ex.geoHistory().back().posdata()->rot_.name() << "\n";
30  DDRotationMatrix rm = ex.rotation();
31  {
32  double v[9]; rm.GetComponents(v,v+9);
33  s << "R=(";
34  s << v[0] << ' ' << v[1] << ' ' << v[2] << endl;
35  s << v[3] << ' ' << v[4] << ' ' << v[5] << endl;
36  s << v[6] << ' ' << v[7] << ' ' << v[7] << endl;
37  }
38  rm = ex.geoHistory().back().posdata()->rotation();
39  {
40  double v[9]; rm.GetComponents(v,v+9);
41  s << "r=(";
42  s << v[0] << ' ' << v[1] << ' ' << v[2] << endl;
43  s << v[3] << ' ' << v[4] << ' ' << v[5] << endl;
44  s << v[6] << ' ' << v[7] << ' ' << v[7] << endl;
45  }
46  if (dotrans) {
47  s << "T=("
48  << ex.translation().x() << ','
49  << ex.translation().y() << ','
50  << ex.translation().z() << ") "
51  ;
52  }
53  pair<s_iter,bool> ins = result.insert(s.str());
54  if(!ins.second) {
55  cout << "DDExpandedViewDump:ERROR: duplicated=" << s.str() << endl;
56  }
57  }
58  go = ex.next();
59  }
60  s_iter it(result.begin()), ed(result.end());
61  for(;it != ed;++it) {
62  os << *it << endl;
63  }
64 }
tuple result
Definition: query.py:137
string rm
Definition: submit.py:76
tuple ins
Definition: cuy.py:312
tuple cout
Definition: gather_cfg.py:121
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.