#include "DetectorDescription/Base/interface/DDdebug.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "DetectorDescription/Core/src/Material.h"
#include "DetectorDescription/Base/interface/DDException.h"
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &os, const DDMaterial &mat) |
std::ostream& operator<< | ( | std::ostream & | os, |
const DDMaterial & | mat | ||
) |
Definition at line 132 of file DDMaterial.cc.
References DDMaterial::a(), DDMaterial::constituent(), DDMaterial::density(), f, g, i, testEve_cfg::level, DDBase< N, C >::name(), DDMaterial::noOfConstituents(), asciidump::s, and DDMaterial::z().
{ static int level=0; ++level; if (mat) { os << '[' << mat.name() <<']' << " z=" << mat.z() << " a=" << mat.a()/g*mole << "*g/mole" << " d=" << mat.density()/g*cm3 << "*g/cm3"; std::string s(2*level,' '); for (int i=0; i<mat.noOfConstituents(); ++i) { DDMaterial::FractionV::value_type f = mat.constituent(i); os << std::endl << s << i+1 << " : fm=" << f.second << " : " << f.first; } //--level; } else os << "* material not declared * "; --level; return os; }