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/Core/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

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

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

◆ lp_err

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

Definition at line 27 of file DDErrorDetection.h.

◆ ma_err

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

Definition at line 28 of file DDErrorDetection.h.

◆ ns_nm_type

using ns_nm_type = std::map<std::string, std::set<DDName> >

Definition at line 34 of file DDErrorDetection.h.

◆ ns_type

using ns_type = std::map<std::string, std::set<std::string> >

Definition at line 33 of file DDErrorDetection.h.

◆ ro_err

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

Definition at line 30 of file DDErrorDetection.h.

◆ so_err

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

Definition at line 29 of file DDErrorDetection.h.

◆ sp_err

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

Definition at line 31 of file DDErrorDetection.h.

Function Documentation

◆ dd_error_scan()

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

Definition at line 96 of file DDErrorDetection.h.

References mps_fire::end, and svgfig::template().

Referenced by DDErrorDetection::scan().

96  {
97  typedef std::map<std::string, std::set<C>> error_type;
98  static error_type result_;
99  typename C::template iterator<C> it;
100  typename C::template iterator<C> ed(C::end());
101  for (; it != ed; ++it) {
102  if (!it->isDefined().second) {
103  result_[it->name().ns()].insert(*it);
104  }
105  }
106  return result_;
107 }
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521

◆ findNameSpaces() [1/2]

template<typename T >
bool findNameSpaces ( T  dummy,
ns_type m 
)

Definition at line 68 of file DDErrorDetection.h.

References instance, visualization-live-secondInstance_cfg::m, mps_fire::result, and svgfig::template().

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

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

◆ findNameSpaces() [2/2]

template<typename T >
bool findNameSpaces ( T  dummy,
ns_nm_type m 
)

Definition at line 82 of file DDErrorDetection.h.

References instance, visualization-live-secondInstance_cfg::m, mps_fire::result, and svgfig::template().

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

◆ operator<<() [1/3]

template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::set< T > &  v 
)

Definition at line 37 of file DDErrorDetection.h.

References EcalTangentSkim_cfg::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 }

◆ operator<<() [2/3]

template<class T >
std::ostream& operator<< ( std::ostream &  o,
const std::map< std::string, std::set< T >> &  m 
)

Definition at line 46 of file DDErrorDetection.h.

References visualization-live-secondInstance_cfg::m, and EcalTangentSkim_cfg::o.

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

◆ operator<<() [3/3]

template<class T , class N >
std::ostream& operator<< ( std::ostream &  o,
const std::map< N, std::set< T >> &  m 
)

Definition at line 57 of file DDErrorDetection.h.

References visualization-live-secondInstance_cfg::m, and EcalTangentSkim_cfg::o.

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