1 namespace std { }
using namespace std;
15 #include "DetectorDescription/Base/interface/Singleton.icc"
47 std::cout <<
"DDErrorDetection::scan(): Scanning for DDD errors ..." << std::flush;
61 std::cout <<
" ... finished." << std::endl;
66 std::cout <<
"What does DDErrorDetection::errors() do? nothing." << std::endl;
71 std::cout <<
"What does DDErrorDetection::warnings() do? nothing." << std::endl;
77 static std::map<std::string, std::set<DDLogicalPart> > result_;
78 if (result_.size())
return result_;
85 for (; it != ed; ++it) {
86 std::set<DDLogicalPart>::const_iterator sit(it->second.begin()), sed(it->second.end());
87 for( ; sit != sed; ++sit) {
91 result_.insert(make_pair(lp.
ddname().
fullname(), std::set<DDLogicalPart>()));
93 for (; er.first != er.second; ++er.first) {
104 static std::map<DDSolid, std::set<DDLogicalPart> > result_;
105 if (result_.size())
return result_;
107 const std::map<DDSolid, std::set<DDSolid> > & err_mat = so();
108 std::map<DDSolid, std::set<DDSolid> >::const_iterator it(err_mat.begin()), ed(err_mat.end());
109 for (; it != ed; ++it) {
110 std::set<DDLogicalPart>
s;
113 std::set<DDSolid>::const_iterator sit(it->second.begin()), sed(it->second.end());
114 for(; sit != sed; ++sit) {
119 DDLogicalPart::iterator<DDLogicalPart> lpit,lped; lped.end();
120 for (; lpit != lped; ++lpit) {
121 if (lpit->isDefined().second) {
122 std::map<DDSolid, std::set<DDLogicalPart> >::iterator
i = result_.find(lpit->solid());
124 if ( i != result_.end() ) {
126 i->second.insert(*lpit);
143 static std::map<DDMaterial, std::set<DDLogicalPart> > result_;
144 if (result_.size())
return result_;
146 const std::vector<pair<std::string,DDName> > & err_mat = ma();
147 std::vector<pair<std::string,DDName> >::const_iterator it(err_mat.begin()), ed(err_mat.end());
148 for (; it != ed; ++it) {
149 std::set<DDLogicalPart>
s;
154 DDLogicalPart::iterator<DDLogicalPart> lpit,lped; lped.end();
155 for (; lpit != lped; ++lpit) {
156 if (lpit->isDefined().second) {
157 std::map<DDMaterial, std::set<DDLogicalPart> >::iterator
i = result_.find(lpit->material());
159 if ( i != result_.end() ) {
161 i->second.insert(*lpit);
171 static std::vector<pair<std::string,DDName> > result_;
172 ofstream
o(
"/dev/null");
174 if (result_.size())
return result_;
186 static std::map<DDSolid, std::set<DDSolid> > result_;
187 if (result_.size())
return result_;
194 std::vector<DDSolid> errs;
195 DDSolid::iterator<DDSolid> it, ed; ed.end();
196 for (; it != ed; ++it) {
205 mag.addEdge(
a, ma, 0);
206 mag.addEdge(
b, ma, 0);
214 std::vector<DDSolid>::const_iterator mit(errs.begin()),
216 for (; mit != med; ++mit) {
220 ma_walker_t w(mag,*mit);
222 result_[*mit].insert(w.current().first);
238 o << std::endl << std::endl <<
"---> DDD ERROR REPORT <---" << std::endl << std::endl;
239 o <<
"MISSING DEFINITIONS:" << std::endl << std::endl;
240 o <<
"LogicalParts:" << std::endl
242 o <<
"Materials:" << std::endl
244 o <<
"Solids:" << std::endl
246 o <<
"Rotations:" << std::endl
248 o <<
"Specifics:" << std::endl
250 o << std::endl <<
"IMPLICATIONS OF MISSING DEFINITIONS:" << std::endl << std::endl;
252 o <<
"A) LogicalParts that have missing definitions but are used in the geometr. hierarchy (PosParts):" << std::endl
253 <<
" Format: namespace:name: [name of child]*" << std::endl;
254 o << lp_cpv(cpv) << std::endl;
256 o <<
"B) Detailed report on Materials:" << std::endl;
257 const std::vector<pair<std::string,DDName> > & res = ma();
258 std::vector<pair<std::string,DDName> >::const_iterator it(res.begin()), ed(res.end());
259 for (; it != ed; ++it) {
260 std::cout << it->second <<
": " << it->first << std::endl;
265 o <<
"C) Solids affected by Solids that have missing definitions:" << std::endl;
266 o << so() << std::endl;
268 o <<
"D) LogicalParts affected by Materials of B):" << std::endl;
269 o << ma_lp() << std::endl;
271 o <<
"E) LogicalParts affected by Solids of C):" << std::endl;
272 o << so_lp() << std::endl;
287 lp_cpv(cpv).empty() &&
void scan(const DDCompactView &cpv)
def_type isDefined() const
const std::map< DDSolid, std::set< DDSolid > > & so()
std::pair< const_edge_iterator, const_edge_iterator > const_edge_range
DDSolidShape shape() const
The type of the solid.
DDMaterial is used to define and access material information.
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
const N & nodeData(const edge_type &) const
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
type of data representation of DDCompactView
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
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
static value_type & instance()
edge_range edges(index_type nodeIndex)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const std::map< std::string, std::set< DDLogicalPart > > & lp_cpv(const DDCompactView &cpv)
const std::map< std::string, std::set< C > > & dd_error_scan(const C &)
bool noErrorsInTheReport(const DDCompactView &cpv)
const std::string fullname() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
const std::vector< std::pair< std::string, DDName > > & ma()
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
void report(const DDCompactView &cpv, std::ostream &o)
bool DDCheckMaterials(std::ostream &, std::vector< std::pair< std::string, DDName > > *=0)
Checks all registered materials and sends a report /p os.
index_result nodeIndex(const N &) const
Interface to attach user specific data to nodes in the expanded-view.