#include <DDErrorDetection.h>
Definition at line 111 of file DDErrorDetection.h.
DDErrorDetection::~DDErrorDetection |
( |
| ) |
|
DDErrorDetection::DDErrorDetection |
( |
| ) |
|
|
inlineprivate |
void DDErrorDetection::errors |
( |
| ) |
|
Definition at line 86 of file DDErrorDetection.cc.
References begin, DDBase< N, C >::ddname(), graph< N, E >::edges(), end, DDName::fullname(), g, DDCompactView::graph(), DDI::Singleton< I >::instance(), graph< N, E >::nodeData(), and graph< N, E >::nodeIndex().
88 static std::map<std::string, std::set<DDLogicalPart> > result_;
89 if (result_.size())
return result_;
96 for (; it != ed; ++it) {
97 std::set<DDLogicalPart>::const_iterator sit(it->second.begin()), sed(it->second.end());
98 for( ; sit != sed; ++sit) {
102 result_.insert(make_pair(lp.
ddname().
fullname(), std::set<DDLogicalPart>()));
104 for (; er.first != er.second; ++er.first) {
std::pair< const_edge_iterator, const_edge_iterator > const_edge_range
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
const N & nodeData(const edge_type &) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
static value_type & instance()
edge_range edges(index_type nodeIndex)
const std::string fullname() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
index_result nodeIndex(const N &) const
const std::vector< pair< std::string, DDName > > & DDErrorDetection::ma |
( |
| ) |
|
Definition at line 180 of file DDErrorDetection.cc.
References DDCheckMaterials(), and connectstrParser::o.
182 static std::vector<pair<std::string,DDName> > result_;
183 ofstream
o(
"/dev/null");
185 if (result_.size())
return result_;
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 152 of file DDErrorDetection.cc.
References i, funct::m, and alignCSCRings::s.
154 static std::map<DDMaterial, std::set<DDLogicalPart> > result_;
155 if (result_.size())
return result_;
157 const std::vector<pair<std::string,DDName> > & err_mat =
ma();
158 std::vector<pair<std::string,DDName> >::const_iterator it(err_mat.begin()), ed(err_mat.end());
159 for (; it != ed; ++it) {
160 std::set<DDLogicalPart>
s;
165 DDLogicalPart::iterator<DDLogicalPart> lpit,lped; lped.end();
166 for (; lpit != lped; ++lpit) {
167 if (lpit->isDefined().second) {
168 std::map<DDMaterial, std::set<DDLogicalPart> >::iterator
i = result_.find(lpit->material());
170 if ( i != result_.end() ) {
172 i->second.insert(*lpit);
DDMaterial is used to define and access material information.
const std::vector< std::pair< std::string, DDName > > & ma()
void DDErrorDetection::nix |
( |
| ) |
|
bool DDErrorDetection::noErrorsInTheReport |
( |
const DDCompactView & |
cpv | ) |
|
Definition at line 291 of file DDErrorDetection.cc.
References DDI::Singleton< I >::instance().
const std::map< DDSolid, std::set< DDSolid > > & so()
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
static value_type & instance()
const std::map< std::string, std::set< DDLogicalPart > > & lp_cpv(const DDCompactView &cpv)
const std::vector< std::pair< std::string, DDName > > & ma()
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
void DDErrorDetection::report |
( |
const DDCompactView & |
cpv, |
|
|
std::ostream & |
o |
|
) |
| |
Definition at line 246 of file DDErrorDetection.cc.
References gather_cfg::cout, and DDI::Singleton< I >::instance().
249 o << std::endl << std::endl <<
"---> DDD ERROR REPORT <---" << std::endl << std::endl;
250 o <<
"MISSING DEFINITIONS:" << std::endl << std::endl;
251 o <<
"LogicalParts:" << std::endl
253 o <<
"Materials:" << std::endl
255 o <<
"Solids:" << std::endl
257 o <<
"Rotations:" << std::endl
259 o <<
"Specifics:" << std::endl
261 o << std::endl <<
"IMPLICATIONS OF MISSING DEFINITIONS:" << std::endl << std::endl;
263 o <<
"A) LogicalParts that have missing definitions but are used in the geometr. hierarchy (PosParts):" << std::endl
264 <<
" Format: namespace:name: [name of child]*" << std::endl;
267 o <<
"B) Detailed report on Materials:" << std::endl;
268 const std::vector<pair<std::string,DDName> > &
res =
ma();
269 std::vector<pair<std::string,DDName> >::const_iterator it(res.begin()), ed(res.end());
270 for (; it != ed; ++it) {
271 std::cout << it->second <<
": " << it->first << std::endl;
276 o <<
"C) Solids affected by Solids that have missing definitions:" << std::endl;
277 o <<
so() << std::endl;
279 o <<
"D) LogicalParts affected by Materials of B):" << std::endl;
280 o <<
ma_lp() << std::endl;
282 o <<
"E) LogicalParts affected by Solids of C):" << std::endl;
283 o <<
so_lp() << std::endl;
const std::map< DDSolid, std::set< DDSolid > > & so()
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
static value_type & instance()
const std::map< std::string, std::set< DDLogicalPart > > & lp_cpv(const DDCompactView &cpv)
const std::vector< std::pair< std::string, DDName > > & ma()
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
Definition at line 56 of file DDErrorDetection.cc.
References gather_cfg::cout, dd_error_scan(), and DDI::Singleton< I >::instance().
58 std::cout <<
"DDErrorDetection::scan(): Scanning for DDD errors ..." << std::flush;
72 std::cout <<
" ... finished." << std::endl;
DDMaterial is used to define and access material information.
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
static value_type & instance()
const std::map< std::string, std::set< C > > & dd_error_scan(const C &)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Interface to attach user specific data to nodes in the expanded-view.
const std::map< DDSolid, std::set< DDSolid > > & DDErrorDetection::so |
( |
| ) |
|
Definition at line 195 of file DDErrorDetection.cc.
References a, b, gather_cfg::cout, ddintersection, ddsubtraction, ddunion, DDBase< N, C >::isDefined(), funct::m, mag(), DDSolid::shape(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and w.
197 static std::map<DDSolid, std::set<DDSolid> > result_;
198 if (result_.size())
return result_;
205 std::vector<DDSolid> errs;
206 DDSolid::iterator<DDSolid> it, ed; ed.end();
207 for (; it != ed; ++it) {
216 mag.addEdge(
a, ma, 0);
217 mag.addEdge(
b, ma, 0);
225 std::vector<DDSolid>::const_iterator mit(errs.begin()),
227 for (; mit != med; ++mit) {
231 ma_walker_t
w(mag,*mit);
233 result_[*mit].insert(
w.current().first);
def_type isDefined() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
A DDSolid represents the shape of a part.
DDSolidShape shape(void) const
The type of the solid.
const std::vector< std::pair< std::string, DDName > > & ma()
Definition at line 113 of file DDErrorDetection.cc.
References i, funct::m, and alignCSCRings::s.
115 static std::map<DDSolid, std::set<DDLogicalPart> > result_;
116 if (result_.size())
return result_;
118 const std::map<DDSolid, std::set<DDSolid> > & err_mat =
so();
119 std::map<DDSolid, std::set<DDSolid> >::const_iterator it(err_mat.begin()), ed(err_mat.end());
120 for (; it != ed; ++it) {
121 std::set<DDLogicalPart>
s;
124 std::set<DDSolid>::const_iterator sit(it->second.begin()), sed(it->second.end());
125 for(; sit != sed; ++sit) {
130 DDLogicalPart::iterator<DDLogicalPart> lpit,lped; lped.end();
131 for (; lpit != lped; ++lpit) {
132 if (lpit->isDefined().second) {
133 std::map<DDSolid, std::set<DDLogicalPart> >::iterator
i = result_.find(lpit->solid());
135 if ( i != result_.end() ) {
137 i->second.insert(*lpit);
const std::map< DDSolid, std::set< DDSolid > > & so()
A DDSolid represents the shape of a part.
void DDErrorDetection::warnings |
( |
| ) |
|