132 constexpr std::streamsize fw = 11;
133 constexpr std::streamsize ifw = 4 + (fw & 1);
134 const Int_t rb =
m.GetRowLwb(), cb =
m.GetColLwb();
136 const Int_t R =
m.GetNrows(), C =
m.GetNcols();
137 out << R <<
"x" << C <<
" matrix is as follows";
139 std::streamsize swidth = out.width(4);
140 std::ios::fmtflags sflags = out.flags();
141 out.unsetf(std::ios_base::floatfield);
144 std::string index_pad((fw-ifw)/2,
' ');
145 out <<
"\n" << std::string(ifw,
' ') <<
" |";
146 for (Int_t c = 0; c < C; ++c)
147 out << index_pad << std::setw(ifw) << (cb + c) << index_pad <<
"|";
150 out <<
"\n" << std::string((C+1) * (fw+1),
'-');
153 for (Int_t
r = 0;
r < R; ++
r) {
155 out <<
"\n" << std::setw(ifw) << (rb +
r) <<
" |";
156 for (Int_t c = 0; c < C; ++c) out << std::setw(fw) <<
m(rb +
r, cb + c) <<
" ";
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...