CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TinyDomTest Class Reference

#include <TinyDomTest.h>

Public Member Functions

unsigned int allNodes (const NodeName &, std::vector< const AttList *> &)
 
 TinyDomTest (const TinyDom &)
 

Private Attributes

const TinyDomdom_
 

Detailed Description

some tests for TinyDom and TinyDomWalker

Definition at line 8 of file TinyDomTest.h.

Constructor & Destructor Documentation

◆ TinyDomTest()

TinyDomTest::TinyDomTest ( const TinyDom d)
explicit

Definition at line 7 of file TinyDomTest.cc.

7 : dom_(d) {}
d
Definition: ztail.py:151
const TinyDom & dom_
Definition: TinyDomTest.h:15

Member Function Documentation

◆ allNodes()

unsigned int TinyDomTest::allNodes ( const NodeName tagName,
std::vector< const AttList *> &  result 
)

Definition at line 9 of file TinyDomTest.cc.

References math::Graph< N, E >::begin(), dom_, math::Graph< N, E >::edgeData(), math::Graph< N, E >::end(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, math::Graph< N, E >::nodeData(), mps_fire::result, and dcs_print_summary_cfg::tagName.

9  {
10  result.clear();
13  for (; it != ed; ++it) {
14  const TinyDom::edge_list &el = *it;
15  TinyDom::edge_list::const_iterator el_it = el.begin();
16  TinyDom::edge_list::const_iterator el_ed = el.end();
17  for (; el_it != el_ed; ++el_it) {
18  if (dom_.nodeData(el_it->first).sameName(tagName)) {
19  result.emplace_back(&dom_.edgeData(el_it->second));
20  }
21  }
22  }
23  return result.size();
24 }
const N & nodeData(const edge_type &) const
Definition: Graph.h:272
adj_iterator end()
Definition: Graph.h:174
std::vector< edge_type > edge_list
Definition: Graph.h:19
bool sameName(const TagName &tn) const
Definition: TagName.h:19
adj_iterator begin()
Definition: Graph.h:172
const TinyDom & dom_
Definition: TinyDomTest.h:15
adj_list::const_iterator const_adj_iterator
Definition: Graph.h:105
const E & edgeData(index_type i) const
Definition: Graph.h:158

Member Data Documentation

◆ dom_

const TinyDom& TinyDomTest::dom_
private

Definition at line 15 of file TinyDomTest.h.

Referenced by allNodes().