File indexing completed on 2024-04-06 12:05:24
0001 #ifndef DDCore_DDScope_h
0002 #define DDCore_DDScope_h
0003
0004 #include <iosfwd>
0005 #include <vector>
0006
0007 #include "DetectorDescription/Core/interface/DDExpandedNode.h"
0008
0009 enum dd_scope_class { different_branch, subtree, supertree, delete_action };
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 struct DDScopeClassification {
0020 dd_scope_class operator()(const DDGeoHistory &, const DDGeoHistory &) const;
0021 };
0022
0023
0024
0025
0026
0027 class DDScope {
0028 friend std::ostream &operator<<(std::ostream &, const DDScope &);
0029
0030 public:
0031 typedef std::vector<DDGeoHistory> scope_type;
0032
0033
0034 DDScope(void);
0035
0036
0037 DDScope(const DDGeoHistory &, int depth = 0);
0038
0039 ~DDScope(void);
0040
0041
0042
0043
0044
0045 bool addScope(const DDGeoHistory &s);
0046
0047
0048 void setDepth(int);
0049
0050
0051 int depth(void) const;
0052
0053
0054 const scope_type &scope(void) const;
0055
0056 protected:
0057 scope_type subtrees_;
0058 DDScopeClassification classify_;
0059 int depth_;
0060 };
0061
0062 std::ostream &operator<<(std::ostream &, const DDScope &);
0063
0064 #endif