CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions
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_type &m)
 
template<typename T >
bool findNameSpaces (T dummy, ns_nm_type &m)
 
template<class T >
std::ostream & operator<< (std::ostream &o, const std::set< T > &v)
 
template<class T >
std::ostream & operator<< (std::ostream &o, const std::map< std::string, std::set< T > > &m)
 
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().

105 {
106  typedef std::map<std::string, std::set<C> > error_type;
107  static error_type result_;
108  typename C::template iterator<C> it;
109  typename C::template iterator<C> ed(C::end());
110  for (; it != ed; ++it) {
111  if (!it->isDefined().second) {
112  result_[it->name().ns()].insert(*it);
113  }
114  }
115  return result_;
116 }
#define end
Definition: vmac.h:37
def template
Definition: svgfig.py:520
template<typename T >
bool findNameSpaces ( T  dummy,
ns_type m 
)

Definition at line 73 of file DDErrorDetection.h.

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

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

74 {
75  bool result=true;
76  typename T::template iterator<T> it,ed;
77  ed.end();
78  for (; it != ed; ++it) {
79  result = it->isDefined().second;
80  if (!result)
81  DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
82  m[it->name().ns()].insert(it->name().name());
83  }
84  return result;
85 }
static PFTauRenderPlugin instance
tuple result
Definition: mps_fire.py:95
def template
Definition: svgfig.py:520
template<typename T >
bool findNameSpaces ( T  dummy,
ns_nm_type m 
)

Definition at line 89 of file DDErrorDetection.h.

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

90 {
91  bool result=true;
92  typename T::template iterator<T> it,ed;
93  ed.end();
94  for (; it != ed; ++it) {
95  result = it->isDefined().second;
96  if (!result)
97  DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
98  m[it->name().ns()].insert(it->name().name());
99  }
100  return result;
101 }
static PFTauRenderPlugin instance
tuple result
Definition: mps_fire.py:95
def template
Definition: svgfig.py:520
template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::set< T > &  v 
)

Definition at line 33 of file DDErrorDetection.h.

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

34 {
35  typename std::set<T>::const_iterator it(v.begin()), ed(v.end());
36  for(; it != ed; ++it) {
37  o << it->ddname() << ' ';
38  }
39  return o;
40 }
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 visualization-live-secondInstance_cfg::m, and connectstrParser::o.

52  {
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;
57  o << std::endl;
58  }
59  return o;
60 }
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 visualization-live-secondInstance_cfg::m, and connectstrParser::o.

62  {
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;
67  o << std::endl;
68  }
69  return o;
70 }