CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDCheck.h File Reference
#include <iostream>
#include <vector>
#include "DetectorDescription/Core/interface/DDName.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"

Go to the source code of this file.

Functions

bool DDCheck (std::ostream &)
 
bool DDCheck (const DDCompactView &cpv, std::ostream &)
 
bool DDCheckMaterials (std::ostream &, std::vector< std::pair< std::string, DDName > > *=0)
 Checks all registered materials and sends a report /p os. More...
 

Function Documentation

bool DDCheck ( std::ostream &  )

Definition at line 156 of file DDCheck.cc.

bool DDCheck ( const DDCompactView cpv,
std::ostream &   
)

Definition at line 174 of file DDCheck.cc.

bool DDCheckMaterials ( std::ostream &  ,
std::vector< std::pair< std::string, DDName > > *  = 0 
)

Checks all registered materials and sends a report /p os.

Definition at line 86 of file DDCheckMaterials.cc.

References DDCheckMaterial(), relativeConstraints::error, benchmark_cfg::errors, i, DDI::Singleton< I >::instance(), j, mps_fire::result, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

87 {
88  bool result = false;
89  std::vector<std::pair<std::string,DDName> > errors;
90 
92 
93  for( const auto& i : mr ) {
94  std::pair<std::string,DDName> error("","");
95  DDMaterial tmat(i.first);
96 
97  if (DDCheckMaterial(tmat,error)) {
98  errors.push_back(error);
99  }
100  }
101 
102  std::string s(" ");
103  os << "[DDCore:Report] Materials " << std::endl;
104  os << s << mr.size() << " Materials declared" << std::endl;
105  os << s << "detected errors:" << errors.size() << std::endl;
106  for( auto j : errors ) {
107  os << std::endl << s << j.second << " " << j.first << std::endl;
108  result = true;
109  }
110  if(res) *res = errors;
111  return result;
112 }
int i
Definition: DBlmapReader.cc:9
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
tuple result
Definition: mps_fire.py:84
static value_type & instance()
int j
Definition: DBlmapReader.cc:9
bool DDCheckMaterial(DDMaterial &mip, std::pair< std::string, DDName > &result, int rlevel=0)