CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
hierarchy.h File Reference

Go to the source code of this file.

Functions

void hierarchy (const DDLogicalPart &)
 

Function Documentation

void hierarchy ( const DDLogicalPart )

Definition at line 168 of file hierarchy.cc.

References prof2calltree::count, gather_cfg::cout, DDBase< N, C >::ddname(), graph< N, E >::edges(), g, generateHtml(), DDCompactView::graph(), hierarchy(), DDLogicalPart::material(), DDBase< N, C >::name(), graph< N, E >::nodeData(), DDName::ns(), and writeMaterials().

Referenced by hierarchy().

169 {
170  static DDCompactView cpv ;
171  static DDCompactView::graph_type g = cpv.graph();
172  static int count=0;
173  static std::vector<DDLogicalPart> history;
174  static std::map<std::string,std::set<DDMaterial> > materials;
175  //DDCompactView::graph_type::adj_iterator it = g.begin();
176 
177  history.push_back(parent);
178  materials[parent.material().name().ns()].insert(parent.material());
179  std::cout << history.size() << std::string(2*count,' ') << " " << parent.ddname() << std::endl;
182  std::map<DDLogicalPart,int> children;
183  for (; eit != er.second; ++eit) {
184  children[g.nodeData(*eit)]++;
185  }
186 
187  generateHtml(history,children);
188 
189  std::map<DDLogicalPart,int>::iterator cit = children.begin();
190  for (; cit != children.end(); ++cit) {
191  ++count;
192  hierarchy(cit->first);
193  history.pop_back();
194  --count;
195  }
196 
197  writeMaterials(materials);
198 }
void writeMaterials(std::map< std::string, std::set< DDMaterial > > &m)
Definition: hierarchy.cc:145
list parent
Definition: dbtoconf.py:74
std::pair< edge_iterator, edge_iterator > edge_range
Definition: adjgraph.h:138
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
const N & nodeData(const edge_type &) const
Definition: adjgraph.h:317
type of data representation of DDCompactView
Definition: DDCompactView.h:77
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
edge_range edges(index_type nodeIndex)
Definition: adjgraph.h:277
void hierarchy(const DDLogicalPart &parent)
Definition: hierarchy.cc:168
edge_list::iterator edge_iterator
Definition: adjgraph.h:134
void generateHtml(std::vector< DDLogicalPart > &v, std::map< DDLogicalPart, int > &c)
Definition: hierarchy.cc:77
tuple cout
Definition: gather_cfg.py:121