22 typedef std::map<nav_type,int>::iterator m_it;
29 std::pair<m_it,bool>
res = path2id_.insert(std::make_pair(e.
navPos(),
count));
30 id2path_.emplace_back(res.first);
41 typedef std::map<nav_type,int>::iterator m_it;
48 std::pair<m_it,bool>
res = path2id_.insert(std::make_pair(f.
navPos(),
count));
49 id2path_.emplace_back(res.first);
74 std::map<nav_type,int>::const_iterator it = path2id_.find(n);
76 if (it != path2id_.end())
84 return view.
goTo(idToNavType(
id));
90 edm::LogError(
"DDNumberingScheme") <<
"DDDefaultNumberingScheme::node(int,DDFilteredView&) NOT IMPLEMENTED!" 92 return view.
goTo(idToNavType(
id));
100 if ( (
id>=(
int)id2path_.size()) || (
id < 0) )
104 std::map<nav_type,int>::iterator it = id2path_[pos];
bool node(int id, DDExpandedView &view) const override
calculate the node given an id
bool next()
set current node to the next node in the expanded tree
DDNumberingScheme::nav_type idToNavType(int id) const
virtual int id(const DDExpandedView &) const =0
calculate the id of a given node
virtual ~DDNumberingScheme()
nav_type navPos() const
return the stack of sibling numbers
std::vector< int > nav_type
nav_type navPos() const
return the stack of sibling numbers which indicates the current position in the DDExpandedView ...
bool goTo(const nav_type &)
bool next()
set current node to the next node in the filtered tree
DDNumberingScheme::nav_type nav_type
~DDDefaultNumberingScheme() override
void reset()
true, if a call to firstChild() would succeed (current node has at least one child) ...
bool goTo(const nav_type &)
transversed the DDExpandedView according to the given stack of sibling numbers
int id(const DDExpandedView &) const override
calculate the id of a given node
void reset()
clears the scope and sets the filtered view to its root-node
Provides an exploded view of the detector (tree-view)
DDDefaultNumberingScheme(const DDExpandedView &e)