CMS 3D CMS Logo

DDQuery.h
Go to the documentation of this file.
1 #ifndef DDCore_DDQuery_h
2 #define DDCore_DDQuery_h
3 
4 #include <map>
5 #include <utility>
6 #include <vector>
7 
12 
13 class DDCompactView;
14 class DDScope;
15 
17 class DDQuery
18 {
19 public:
21  DDQuery(const DDCompactView &);
22 
23  virtual ~DDQuery();
24 
25  virtual const std::vector<DDExpandedNode> & exec();
26 
27  virtual void addFilter(const DDFilter &);
28 
29  virtual void setScope(const DDScope &);
30 
31 protected:
33  const DDScope * scope_;
34 
35  std::vector<std::pair<bool, DDFilter *> > criteria_; // one filter and the result on the current node
36  std::vector<DDExpandedNode> result_; // query result
37 };
38 
39 #endif
Base class for querying for nodes in the DDExpandedView.
Definition: DDQuery.h:17
virtual const std::vector< DDExpandedNode > & exec()
Definition: DDQuery.cc:38
virtual void setScope(const DDScope &)
Definition: DDQuery.cc:32
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::vector< DDExpandedNode > result_
Definition: DDQuery.h:36
virtual ~DDQuery()
Definition: DDQuery.cc:15
const DDScope * scope_
Definition: DDQuery.h:33
DDQuery(const DDCompactView &)
sets up a query
Definition: DDQuery.cc:10
defines subtrees in the expanded-view
Definition: DDScope.h:28
virtual void addFilter(const DDFilter &)
Definition: DDQuery.cc:22
DDExpandedView epv_
Definition: DDQuery.h:32
A Filter accepts or rejects a DDExpandedNode based on a user-coded decision rule. ...
Definition: DDFilter.h:16
std::vector< std::pair< bool, DDFilter * > > criteria_
Definition: DDQuery.h:35
Provides an exploded view of the detector (tree-view)