19 curr_err +=
"material not declared; unknown material!";
21 result.first = curr_err;
27 curr_err +=
"material name=" + mip.
name().
ns() +
":" + mip.
name().
name()
28 +
" is declared but not defined";
29 result.first = curr_err;
43 curr_err += no_density;
55 curr_err += no_composites;
60 curr_err =
" NOT-DEFINED ";
64 result.first=curr_err;
71 for (; loop>=0; --
loop) {
72 std::pair<std::string,DDName> res(
"",
"");
82 result.first=curr_err;
92 bool DDCheckMaterials(std::ostream & os, std::vector<std::pair<std::string,DDName> > * res)
95 std::vector<std::pair<std::string,DDName> >
errors;
102 RegT::value_type::iterator
i = mr.begin();
104 for(; i != mr.end(); ++
i) {
105 std::pair<std::string,DDName>
error(
"",
"");
109 errors.push_back(error);
114 os <<
"[DDCore:Report] Materials " << std::endl;
115 os << s << mr.size() <<
" Materials declared" << std::endl;
116 os << s <<
"detected errors:" << errors.size() << std::endl;
117 std::vector<std::pair<std::string,DDName> >::iterator
j = errors.begin();
118 for (;j!=errors.end();++
j) {
119 os << std::endl << s << j->second <<
" " << j->first << std::endl;
double a() const
returns the atomic mass
def_type isDefined() const
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
const std::string & ns() const
Returns the namespace.
double z() const
retruns the atomic number
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Container::value_type value_type
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
bool DDCheckMaterials(std::ostream &, std::vector< std::pair< std::string, DDName > > *=0)
Checks all registered materials and sends a report /p os.
const std::string & name() const
Returns the name.
bool DDCheckMaterial(DDMaterial &mip, std::pair< std::string, DDName > &result, int rlevel=0)