Go to the source code of this file.
bool DDCheckMaterial |
( |
DDMaterial & |
mip, |
|
|
std::pair< std::string, DDName > & |
result |
|
) |
| |
Definition at line 6 of file DDCheckMaterials.cc.
References DDMaterial::a(), DDMaterial::constituent(), DDBase< N, C >::ddname(), DDMaterial::density(), DDBase< N, C >::isDefined(), python.cmstools::loop(), DDName::name(), DDBase< N, C >::name(), DDMaterial::noOfConstituents(), DDName::ns(), AlCaHLTBitMon_QueryRunRegistry::string, and DDMaterial::z().
Referenced by DDCheckMaterials().
13 static int rlevel = 0;
20 curr_err +=
"material not declared; unknown material!";
28 curr_err +=
"material name=" + mip.
name().
ns() +
":" + mip.
name().
name()
29 +
" is declared but not defined";
44 curr_err += no_density;
56 curr_err += no_composites;
61 curr_err =
" NOT-DEFINED ";
72 for (; loop>=0; --
loop) {
73 std::pair<std::string,DDName> res(
"",
"");
double a() const
returns the atomic mass
def_type isDefined() const
DDMaterial is used to define and access material information.
bool DDCheckMaterial(DDMaterial &mip, std::pair< std::string, DDName > &result)
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
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
const std::string & name() const
Returns the name.
bool DDCheckMaterials |
( |
std::ostream & |
os, |
|
|
std::vector< std::pair< std::string, DDName > > * |
res |
|
) |
| |
Checks all registered materials and sends a report /p os.
Definition at line 93 of file DDCheckMaterials.cc.
References DDCheckMaterial(), error, benchmark_cfg::errors, i, instance, j, query::result, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by DDErrorDetection::ma().
96 std::vector<std::pair<std::string,DDName> >
errors;
103 RegT::value_type::iterator
i = mr.begin();
105 for(; i != mr.end(); ++
i) {
106 std::pair<std::string,DDName>
error(
"",
"");
110 errors.push_back(
error);
115 os <<
"[DDCore:Report] Materials " << std::endl;
116 os <<
s << mr.size() <<
" Materials declared" << std::endl;
117 os <<
s <<
"detected errors:" << errors.size() << std::endl;
118 std::vector<std::pair<std::string,DDName> >::iterator
j = errors.begin();
119 for (;j!=errors.end();++
j) {
120 os << std::endl <<
s << j->second <<
" " << j->first << std::endl;
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
bool DDCheckMaterial(DDMaterial &mip, std::pair< std::string, DDName > &result)
Container::value_type value_type