27 fname =
"dump" +
fname;
30 if ( dumpHistory || dumpPosInfo) {
32 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;
35 typedef std::map<nav_type,int> id_type;
38 std::ofstream
dump(fname.c_str());
39 bool notReachedDepth(
true);
48 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().x();
49 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().y();
50 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << epv.
translation().z();
68 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.X();
69 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.X();
70 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.X();
71 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Y();
72 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Y();
73 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Y();
74 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << x.Z();
75 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << y.Z();
76 dump <<
"," << std::setw(12) << std::fixed << std::setprecision(4) << z.Z();
80 if ( nVols != 0 &&
id > nVols ) notReachedDepth =
false;
81 }
while (epv.
next() && notReachedDepth);
87 std::string dsname =
"dumpSpecs" +
fname;
88 std::ofstream
dump(dsname.c_str());
90 DDCompactView::DDCompactView::graph_type gra = cpv.
graph();
91 std::set<DDLogicalPart> lpStore;
93 adjl_iterator git = gra.
begin();
94 adjl_iterator gend = gra.end();
97 for (; git != gend; ++git)
100 if ( lpStore.find(ddLP) != lpStore.end() && ddLP.
attachedSpecifics().size() != 0 ) {
105 lpStore.insert(ddLP);
111 DDCompactView::graph_type::edge_list::const_iterator cit = git->begin();
112 DDCompactView::graph_type::edge_list::const_iterator cend = git->end();
113 for (; cit != cend; ++cit)
116 if (lpStore.find(ddcurLP) != lpStore.end() && ddcurLP.
attachedSpecifics().size() != 0 ) {
121 lpStore.insert(ddcurLP);
233 std::vector<std::pair< DDPartSelection*, DDsvalues_type*> >::const_iterator bit(attspec.begin()), eit(attspec.end());
234 for ( ; bit != eit; ++bit ) {
236 std::vector<DDPartSelectionLevel>::iterator psit(bit->first->begin()), pseit(bit->first->end());
237 for ( ; psit != pseit; ++psit ) {
238 switch ( psit->selectionType_ ) {
240 throw cms::Exception(
"DetectorDescriptionSpecPar") <<
"Can not have an unknown selection type!";
249 dump <<
"//" << psit->lp_.toString();
252 dump <<
"//" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]" ;
255 dump <<
"/" << psit->lp_.toString();
258 dump <<
"/" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]" ;
261 throw cms::Exception(
"DetectorDescriptionSpecPar") <<
"Can not end up here! default of switch on selectionTyp_";
266 DDsvalues_type::iterator bsit(bit->second->begin()), bseit(bit->second->end());
267 for ( ; bsit != bseit; ++bsit ) {
268 dump << bsit->second.name() <<
" ";
269 dump << ( bsit->second.isEvaluated() ?
"eval " :
"NOT eval " );
271 for ( ; sdind != bsit->second.strings().size() ; ++sdind ) {
272 if (bsit->second.isEvaluated()) {
273 dump << bsit->second.doubles()[sdind] ;
275 dump << bsit->second.strings()[sdind] ;
277 if (sdind != bsit->second.strings().size() - 1) dump <<
", ";
279 if ( bsit->second.strings().size() > 0 && bsit + 1 != bseit ) dump <<
" | ";
281 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() 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