1 #ifndef DD_DDErrorDetection_h
2 #define DD_DDErrorDetection_h
26 typedef std::map<std::string, std::set<std::string> >
ns_type;
27 typedef std::map<std::string, std::set<DDName> >
ns_nm_type;
33 template<
class T> std::ostream & operator<<(std::ostream & o, const std::set<T> &
v)
35 typename std::set<T>::const_iterator it(
v.begin()), ed(
v.end());
36 for(; it != ed; ++it) {
37 o << it->ddname() <<
' ';
52 template<
class T> std::ostream & operator<<(std::ostream & o, const std::map<std::string, std::set<T> > &
m) {
53 typedef typename std::map<std::string, std::set<T> >::const_iterator c_it;
54 c_it it(
m.begin()), ed(
m.end());
55 for (; it != ed; ++it) {
56 o << it->first <<
": " << it->second;
62 template<
class T,
class N> std::ostream & operator<<(std::ostream & o, const std::map<N, std::set<T> > &
m) {
63 typedef typename std::map<N, std::set<T> >::const_iterator c_it;
64 c_it it(
m.begin()), ed(
m.end());
65 for (; it != ed; ++it) {
66 o << it->first.ddname() <<
": " << it->second;
78 for (; it != ed; ++it) {
79 result = it->isDefined().second;
82 m[it->name().ns()].insert(it->name().name());
94 for (; it != ed; ++it) {
95 result = it->isDefined().second;
98 m[it->name().ns()].insert(it->name().name());
104 template <
class C>
const std::map<std::string, std::set<C> > &
dd_error_scan(
const C &)
106 typedef std::map<std::string, std::set<C> > error_type;
107 static error_type result_;
110 for (; it != ed; ++it) {
111 if (!it->isDefined().second) {
112 result_[it->name().ns()].insert(*it);
131 const std::map<DDMaterial, std::set<DDLogicalPart> > &
ma_lp();
132 const std::map<DDSolid, std::set<DDLogicalPart> > &
so_lp();
133 const std::map<DDSolid, std::set<DDSolid> > &
so();
137 const std::vector<std::pair<std::string,DDName> > &
ma();
void scan(const DDCompactView &cpv)
DDI::Singleton< std::map< std::string, std::set< DDLogicalPart > > > lp_err
const std::map< DDSolid, std::set< DDSolid > > & so()
std::map< std::string, std::set< DDName > > ns_nm_type
static PFTauRenderPlugin instance
DDI::Singleton< std::map< std::string, std::set< DDMaterial > > > ma_err
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
type of data representation of DDCompactView
const std::map< std::string, std::set< DDLogicalPart > > & lp_cpv(const DDCompactView &cpv)
const std::map< std::string, std::set< C > > & dd_error_scan(const C &)
bool noErrorsInTheReport(const DDCompactView &cpv)
const std::vector< std::pair< std::string, DDName > > & ma()
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
void report(const DDCompactView &cpv, std::ostream &o)
DDI::Singleton< std::map< std::string, std::set< DDSpecifics > > > sp_err
bool findNameSpaces(T dummy, ns_type &m)
std::map< std::string, std::set< std::string > > ns_type
DDI::Singleton< std::map< std::string, std::set< DDSolid > > > so_err
DDI::Singleton< std::map< std::string, std::set< DDRotation > > > ro_err