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>>;
37 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() <<
' ';
46 std::ostream& operator<<(std::ostream& o, const std::map<std::string, std::set<T>>&
m) {
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;
56 template <
class T,
class N>
57 std::ostream& operator<<(std::ostream& o, const std::map<N, std::set<T>>&
m) {
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;
72 for (; it != ed; ++it) {
73 result = it->isDefined().second;
76 m[it->name().ns()].insert(it->name().name());
86 for (; it != ed; ++it) {
87 result = it->isDefined().second;
90 m[it->name().ns()].insert(it->name().name());
97 typedef std::map<std::string, std::set<C>> error_type;
98 static error_type result_;
101 for (; it != ed; ++it) {
102 if (!it->isDefined().second) {
103 result_[it->name().ns()].insert(*it);
121 const std::map<DDMaterial, std::set<DDLogicalPart>>&
ma_lp();
122 const std::map<DDSolid, std::set<DDLogicalPart>>&
so_lp();
123 const std::map<DDSolid, std::set<DDSolid>>&
so();
127 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.