CMS 3D CMS Logo

Classes | Typedefs | Functions

/data/refman/pasoursint/CMSSW_5_3_6/src/DetectorDescription/RegressionTest/interface/DDErrorDetection.h File Reference

#include <map>
#include <set>
#include <string>
#include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "DetectorDescription/Core/interface/DDSolid.h"
#include "DetectorDescription/Core/interface/DDTransform.h"
#include "DetectorDescription/Core/interface/DDSpecifics.h"
#include <DetectorDescription/Core/interface/DDCompactView.h>
#include "DetectorDescription/Base/interface/Singleton.h"

Go to the source code of this file.

Classes

class  DDErrorDetection

Typedefs

typedef DDI::Singleton
< std::map< std::string,
std::set< DDLogicalPart > > > 
lp_err
typedef DDI::Singleton
< std::map< std::string,
std::set< DDMaterial > > > 
ma_err
typedef std::map< std::string,
std::set< DDName > > 
ns_nm_type
typedef std::map< std::string,
std::set< std::string > > 
ns_type
typedef DDI::Singleton
< std::map< std::string,
std::set< DDRotation > > > 
ro_err
typedef DDI::Singleton
< std::map< std::string,
std::set< DDSolid > > > 
so_err
typedef DDI::Singleton
< std::map< std::string,
std::set< DDSpecifics > > > 
sp_err

Functions

template<class C >
const std::map< std::string,
std::set< C > > & 
dd_error_scan (const C &)
template<typename T >
bool findNameSpaces (T dummy, ns_nm_type &m)
template<typename T >
bool findNameSpaces (T dummy, ns_type &m)
template<class T >
std::ostream & operator<< (std::ostream &o, const std::map< std::string, std::set< T > > &m)
template<class T >
std::ostream & operator<< (std::ostream &o, const std::set< T > &v)
template<class T , class N >
std::ostream & operator<< (std::ostream &o, const std::map< N, std::set< T > > &m)

Typedef Documentation

typedef DDI::Singleton<std::map<std::string,std::set<DDLogicalPart> > > lp_err

Definition at line 17 of file DDErrorDetection.h.

typedef DDI::Singleton<std::map<std::string,std::set<DDMaterial> > > ma_err

Definition at line 18 of file DDErrorDetection.h.

typedef std::map<std::string, std::set<DDName> > ns_nm_type

Definition at line 27 of file DDErrorDetection.h.

typedef std::map<std::string, std::set<std::string> > ns_type

Definition at line 26 of file DDErrorDetection.h.

typedef DDI::Singleton<std::map<std::string,std::set<DDRotation> > > ro_err

Definition at line 20 of file DDErrorDetection.h.

typedef DDI::Singleton<std::map<std::string,std::set<DDSolid> > > so_err

Definition at line 19 of file DDErrorDetection.h.

typedef DDI::Singleton<std::map<std::string,std::set<DDSpecifics> > > sp_err

Definition at line 21 of file DDErrorDetection.h.


Function Documentation

template<class C >
const std::map<std::string, std::set<C> >& dd_error_scan ( const C &  )

Definition at line 104 of file DDErrorDetection.h.

References end, and svgfig::template().

Referenced by DDErrorDetection::scan().

{
    typedef std::map<std::string, std::set<C> > error_type;
    static error_type result_;
    typename C::template iterator<C> it;
    typename C::template iterator<C> ed(C::end());
    for (; it != ed; ++it) {
      if (!it->isDefined().second) {
        result_[it->name().ns()].insert(*it);
      }
    }  
    return result_;
}
template<typename T >
bool findNameSpaces ( T  dummy,
ns_nm_type m 
)

Definition at line 89 of file DDErrorDetection.h.

References instance, query::result, and svgfig::template().

{
   bool result=true;
   typename T::template iterator<T> it,ed;
   ed.end();
   for (; it != ed; ++it) {
     result = it->isDefined().second;
     if (!result) 
       DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
     m[it->name().ns()].insert(it->name().name());
   }
   return result;
}
template<typename T >
bool findNameSpaces ( T  dummy,
ns_type m 
)

Definition at line 73 of file DDErrorDetection.h.

References instance, query::result, and svgfig::template().

Referenced by DDHtmlLpDetails::names(), DDHtmlSpDetails::names(), DDHtmlRoDetails::names(), DDHtmlSoDetails::names(), and DDHtmlMaDetails::names().

{
   bool result=true;
   typename T::template iterator<T> it,ed;
   ed.end();
   for (; it != ed; ++it) {
     result = it->isDefined().second;
     if (!result) 
       DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
     m[it->name().ns()].insert(it->name().name());
   }
   return result;
}
template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::map< std::string, std::set< T > > &  m 
)

Definition at line 52 of file DDErrorDetection.h.

References m, and python::connectstrParser::o.

                                                                                                   {
  typedef typename std::map<std::string, std::set<T> >::const_iterator c_it;
  c_it it(m.begin()), ed(m.end());
  for (; it != ed; ++it) {
    o << it->first << ": " << it->second;
    o << std::endl;
  }
  return o;
}
template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::set< T > &  v 
)

Definition at line 33 of file DDErrorDetection.h.

References python::connectstrParser::o, and v.

{
  typename std::set<T>::const_iterator it(v.begin()), ed(v.end());
  for(; it != ed; ++it) {
    o << it->ddname() << ' ';
  }
  return o;
}
template<class T , class N >
std::ostream& operator<< ( std::ostream &  o,
const std::map< N, std::set< T > > &  m 
)

Definition at line 62 of file DDErrorDetection.h.

References m, and python::connectstrParser::o.

                                                                                                    {
  typedef typename std::map<N, std::set<T> >::const_iterator c_it;
  c_it it(m.begin()), ed(m.end());
  for (; it != ed; ++it) {
    o << it->first.ddname() << ": " << it->second;
    o << std::endl;
  }
  return o;
}