Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:35

0001 #include "DetectorDescription/RegressionTest/src/TinyDomTest.h"
0002 #include "DataFormats/Math/interface/Graph.h"
0003 #include "DetectorDescription/RegressionTest/src/TagName.h"
0004 
0005 #include <utility>
0006 
0007 TinyDomTest::TinyDomTest(const TinyDom &d) : dom_(d) {}
0008 
0009 unsigned int TinyDomTest::allNodes(const NodeName &tagName, std::vector<const AttList *> &result) {
0010   result.clear();
0011   TinyDom::const_adj_iterator it = dom_.begin();
0012   TinyDom::const_adj_iterator ed = dom_.end();
0013   for (; it != ed; ++it) {
0014     const TinyDom::edge_list &el = *it;
0015     TinyDom::edge_list::const_iterator el_it = el.begin();
0016     TinyDom::edge_list::const_iterator el_ed = el.end();
0017     for (; el_it != el_ed; ++el_it) {
0018       if (dom_.nodeData(el_it->first).sameName(tagName)) {
0019         result.emplace_back(&dom_.edgeData(el_it->second));
0020       }
0021     }
0022   }
0023   return result.size();
0024 }