23 fname =
"dump" +
fname;
26 if ( dumpHistory || dumpPosInfo) {
28 std::cout <<
"After the GeoHistory in the output file dumpGeoHistoryOnRead you will see x, y, z, r11, r12, r13, r21, r22, r23, r31, r32, r33" << std::endl;
31 typedef std::map<nav_type,int> id_type;
34 std::ofstream
dump(fname.c_str());
35 bool notReachedDepth(
true);
44 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().x();
45 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().y();
46 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().z();
64 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
65 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
66 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
67 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
68 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
69 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
70 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
71 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
72 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Z();
76 if ( nVols != 0 &&
id > nVols ) notReachedDepth =
false;
77 }
while (epv.
next() && notReachedDepth);
84 std::ofstream
dump(dsname.c_str());
86 DDCompactView::DDCompactView::graph_type gra = cpv.
graph();
87 std::set<DDLogicalPart> lpStore;
89 adjl_iterator git = gra.
begin();
90 adjl_iterator gend = gra.end();
93 for (; git != gend; ++git)
96 if ( lpStore.find(ddLP) != lpStore.end() && ddLP.
attachedSpecifics().size() != 0 ) {
101 lpStore.insert(ddLP);
107 DDCompactView::graph_type::edge_list::const_iterator cit = git->begin();
108 DDCompactView::graph_type::edge_list::const_iterator cend = git->end();
109 for (; cit != cend; ++cit)
112 if (lpStore.find(ddcurLP) != lpStore.end() && ddcurLP.
attachedSpecifics().size() != 0 ) {
117 lpStore.insert(ddcurLP);
229 std::vector<std::pair< DDPartSelection*, DDsvalues_type*> >::const_iterator bit(attspec.begin()), eit(attspec.end());
230 for ( ; bit != eit; ++bit ) {
232 std::vector<DDPartSelectionLevel>::iterator psit(bit->first->begin()), pseit(bit->first->end());
233 for ( ; psit != pseit; ++psit ) {
234 switch ( psit->selectionType_ ) {
236 throw cms::Exception(
"DetectorDescriptionSpecPar") <<
"Can not have an unknown selection type!";
245 dump <<
"//" << psit->lp_.toString();
248 dump <<
"//" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]" ;
251 dump <<
"/" << psit->lp_.toString();
254 dump <<
"/" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]" ;
257 throw cms::Exception(
"DetectorDescriptionSpecPar") <<
"Can not end up here! default of switch on selectionTyp_";
262 DDsvalues_type::iterator bsit(bit->second->begin()), bseit(bit->second->end());
263 for ( ; bsit != bseit; ++bsit ) {
264 dump << bsit->second.name() <<
" ";
265 dump << ( bsit->second.isEvaluated() ?
"eval " :
"NOT eval " );
267 for ( ; sdind != bsit->second.strings().size() ; ++sdind ) {
268 if (bsit->second.isEvaluated()) {
269 dump << bsit->second.doubles()[sdind] ;
271 dump << bsit->second.strings()[sdind] ;
273 if (sdind != bsit->second.strings().size() - 1) dump <<
", ";
275 if ( bsit->second.strings().size() > 0 && bsit + 1 != bseit ) dump <<
" | ";
277 if ( bit->second->size() > 0 && bit + 1 != eit) dump <<
" | ";
bool next()
set current node to the next node in the expanded tree
void dumpInfo(bool dumpHistory, bool dumpSpecs, bool dumpPosInfo, const DDCompactView &cpv, std::string fname="GeoHistory", int nVols=0)
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
const graph_type & graph() const
Provides read-only access to the data structure of the compact-view.
void dumpSpec(const std::vector< std::pair< DDPartSelection *, DDsvalues_type * > > &attspec, std::ostream &dump)
std::vector< double >::size_type index_type
type of data representation of DDCompactView
nav_type navPos() const
return the stack of sibling numbers which indicates the current position in the DDExpandedView ...
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
const std::vector< std::pair< DDPartSelection *, DDsvalues_type * > > & attachedSpecifics(void) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
const DDTranslation & translation() const
The absolute translation of the current node.
std::string toString() const
adj_list::const_iterator const_adj_iterator
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
Provides an exploded view of the detector (tree-view)
std::vector< int > nav_type
std::vector of sibling numbers