1 #ifndef DETECTOR_DESCRIPTION_DD_ERROR_DETECTION_H 2 #define DETECTOR_DESCRIPTION_DD_ERROR_DETECTION_H 33 using ns_type = std::map<std::string, std::set<std::string>>;
34 using ns_nm_type = std::map<std::string, std::set<DDName>>;
36 template<
class T> std::ostream & operator<<( std::ostream & o, const std::set<T> &
v )
38 typename std::set<T>::const_iterator it(
v.begin()), ed(
v.end());
39 for(; it != ed; ++it) {
40 o << it->ddname() <<
' ';
45 template<
class T> std::ostream & operator<<( std::ostream & o, const std::map<std::string, std::set<T> > &
m ) {
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;
55 template<
class T,
class N> std::ostream & operator<<(std::ostream & o, const std::map<N, std::set<T> > &
m) {
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;
71 for (; it != ed; ++it) {
72 result = it->isDefined().second;
75 m[it->name().ns()].insert(it->name().name());
87 for (; it != ed; ++it) {
88 result = it->isDefined().second;
91 m[it->name().ns()].insert(it->name().name());
97 template <
class C>
const std::map<std::string, std::set<C> > &
dd_error_scan(
const C &)
99 typedef std::map<std::string, std::set<C> > error_type;
100 static error_type result_;
103 for (; it != ed; ++it) {
104 if (!it->isDefined().second) {
105 result_[it->name().ns()].insert(*it);
124 const std::map<DDMaterial, std::set<DDLogicalPart> > &
ma_lp();
125 const std::map<DDSolid, std::set<DDLogicalPart> > &
so_lp();
126 const std::map<DDSolid, std::set<DDSolid> > &
so();
130 const std::vector<std::pair<std::string,std::string> > &
ma();
void scan(const DDCompactView &cpv)
const std::map< DDSolid, std::set< DDSolid > > & so()
static PFTauRenderPlugin instance
const std::vector< std::pair< std::string, std::string > > & ma()
DDMaterial is used to define and access material information.
DDName is used to identify DDD entities uniquely.
const std::map< DDMaterial, std::set< DDLogicalPart > > & ma_lp()
Compact representation of the geometrical detector hierarchy.
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
std::map< std::string, std::set< DDName >> ns_nm_type
std::map< std::string, std::set< std::string >> ns_type
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)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
def template(fileName, svg, replaceme="REPLACEME")
const std::map< DDSolid, std::set< DDLogicalPart > > & so_lp()
void report(const DDCompactView &cpv, std::ostream &o)
bool findNameSpaces(T dummy, ns_type &m)
Interface to attach user specific data to nodes in the expanded-view.