CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDNumberingScheme.h
Go to the documentation of this file.
1 #ifndef DDNumberingScheme_h
2 #define DDNumberingScheme_h
3 
4 #include <vector>
5 
6 class DDExpandedView;
7 //typename DDExpandedView::nav_type;
8 class DDFilteredView;
9 //class DDFilteredView::nav_type;
11 
15 class DDNumberingScheme //: throw DDException
16 {
17 public:
18  typedef std::vector<int> nav_type;
19  virtual ~DDNumberingScheme();
20 
22  virtual int id(const DDExpandedView &) const = 0;
23 
25  virtual int id(const DDFilteredView &) const = 0;
26 
28  virtual int id(const nav_type &) const = 0 ;
29 
30 
32 
35  virtual bool node(int id, DDExpandedView & view) const = 0;
36 
38 
41  virtual bool node(int id, DDFilteredView & view) const = 0;
42 
43 };
44 
45 
46 
47 
48 #include <map>
50 
54 class DDDefaultNumberingScheme : public DDNumberingScheme //: throw DDException
55 {
56 public:
60  virtual ~DDDefaultNumberingScheme();
61 
63  virtual int id(const DDExpandedView &) const;
64 
66  virtual int id(const DDNumberingScheme::nav_type &) const;
67 
69  virtual int id(const DDFilteredView &) const;
70 
72 
75  virtual bool node(int id, DDExpandedView & view) const;
76 
78 
81  virtual bool node(int id, DDFilteredView & view) const;
82 
83 protected:
85 
86 protected:
87  std::map<nav_type,int> path2id_;
88  std::vector<std::map<nav_type,int>::iterator> id2path_;
89 };
90 
91 
92 
93 
94 #endif
DDNumberingScheme::nav_type idToNavType(int id) const
std::map< nav_type, int > path2id_
virtual bool node(int id, DDExpandedView &view) const
calculate the node given an id
virtual ~DDNumberingScheme()
std::vector< int > nav_type
virtual bool node(int id, DDExpandedView &view) const =0
calculate the node given an id
virtual int id(const DDExpandedView &) const
calculate the id of a given node
Default numbering scheme.
double f[11][100]
DDNumberingScheme::nav_type nav_type
virtual int id(const DDExpandedView &) const =0
calculate the id of a given node
std::vector< std::map< nav_type, int >::iterator > id2path_
Base for user specfic numbering schemes.
Provides an exploded view of the detector (tree-view)
DDDefaultNumberingScheme(const DDExpandedView &e)