CMS 3D CMS Logo

Classes | Typedefs | Functions
DDErrorDetection.h File Reference
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include <map>
#include <ostream>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "DetectorDescription/Base/interface/Singleton.h"
#include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "DetectorDescription/Core/interface/DDSolid.h"
#include "DetectorDescription/Core/interface/DDSpecifics.h"
#include "DetectorDescription/Core/interface/DDTransform.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 25 of file DDErrorDetection.h.

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

Definition at line 28 of file DDErrorDetection.h.

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

Definition at line 34 of file DDErrorDetection.h.

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

Definition at line 33 of file DDErrorDetection.h.

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

Definition at line 30 of file DDErrorDetection.h.

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

Definition at line 29 of file DDErrorDetection.h.

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

Definition at line 31 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 97 of file DDErrorDetection.h.

References end, and svgfig::template().

Referenced by DDErrorDetection::scan().

98 {
99  typedef std::map<std::string, std::set<C> > error_type;
100  static error_type result_;
101  typename C::template iterator<C> it;
102  typename C::template iterator<C> ed(C::end());
103  for (; it != ed; ++it) {
104  if (!it->isDefined().second) {
105  result_[it->name().ns()].insert(*it);
106  }
107  }
108  return result_;
109 }
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:520
#define end
Definition: vmac.h:37
template<typename T >
bool findNameSpaces ( T  dummy,
ns_type m 
)

Definition at line 66 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().

67 {
68  bool result=true;
69  typename T::template iterator<T> it,ed;
70  ed.end();
71  for (; it != ed; ++it) {
72  result = it->isDefined().second;
73  if (!result)
74  DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
75  m[it->name().ns()].insert(it->name().name());
76  }
77  return result;
78 }
static PFTauRenderPlugin instance
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:520
template<typename T >
bool findNameSpaces ( T  dummy,
ns_nm_type m 
)

Definition at line 82 of file DDErrorDetection.h.

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

83 {
84  bool result=true;
85  typename T::template iterator<T> it,ed;
86  ed.end();
87  for (; it != ed; ++it) {
88  result = it->isDefined().second;
89  if (!result)
90  DDI::Singleton<std::map<std::string,std::set<T> > >::instance()[it->name().ns()].insert(*it);
91  m[it->name().ns()].insert(it->name().name());
92  }
93  return result;
94 }
static PFTauRenderPlugin instance
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:520
template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::set< T > &  v 
)

Definition at line 36 of file DDErrorDetection.h.

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

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

Definition at line 45 of file DDErrorDetection.h.

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

45  {
46  typedef typename std::map<std::string, std::set<T> >::const_iterator c_it;
47  c_it it(m.begin()), ed(m.end());
48  for (; it != ed; ++it) {
49  o << it->first << ": " << it->second;
50  o << std::endl;
51  }
52  return o;
53 }
template<class T , class N >
std::ostream& operator<< ( std::ostream &  o,
const std::map< N, std::set< T > > &  m 
)

Definition at line 55 of file DDErrorDetection.h.

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

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