23 template <
class valType>
25 if (value < 0. && value > -5.0
e-5)
40 if (dumpHistory || dumpPosInfo) {
42 std::cout <<
"After the GeoHistory in the output file dumpGeoHistoryOnRead you will see x, y, z, r11, r12, r13, " 43 "r21, r22, r23, r31, r32, r33" 47 typedef std::map<nav_type, int> id_type;
51 bool notReachedDepth(
true);
62 size_t s = snprintf(
buf,
64 ",%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f,%12.4f",
83 if (nVols != 0 &&
id > nVols)
84 notReachedDepth =
false;
85 }
while (epv.
next() && notReachedDepth);
93 std::ofstream
dump(dsname.c_str());
94 const auto& gra = cpv.
graph();
95 std::set<DDLogicalPart> lpStore;
99 for (; git != gend; ++git) {
105 lpStore.insert(ddLP);
110 for (
const auto& cit : *git) {
112 if (lpStore.find(ddcurLP) != lpStore.end() && !ddcurLP.
attachedSpecifics().empty()) {
116 lpStore.insert(ddcurLP);
125 std::ostream&
dump) {
126 std::vector<std::pair<const DDPartSelection*, const DDsvalues_type*> >::const_iterator bit(attspec.begin()),
128 for (; bit != eit; ++bit) {
130 std::vector<DDPartSelectionLevel>::const_iterator psit(bit->first->begin()), pseit(bit->first->end());
131 for (; psit != pseit; ++psit) {
132 switch (psit->selectionType_) {
134 throw cms::Exception(
"DetectorDescriptionSpecPar") <<
"Can not have an unknown selection type!";
143 dump <<
"//" << psit->lp_.toString();
146 dump <<
"//" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]";
149 dump <<
"/" << psit->lp_.toString();
152 dump <<
"/" << psit->lp_.toString() <<
"[" << psit->copyno_ <<
"]";
156 <<
"Can not end up here! default of switch on selectionTyp_";
161 DDsvalues_type::const_iterator bsit(bit->second->begin()), bseit(bit->second->end());
162 for (; bsit != bseit; ++bsit) {
163 dump << bsit->second.name() <<
" ";
164 dump << (bsit->second.isEvaluated() ?
"eval " :
"NOT eval ");
166 for (; sdind != bsit->second.strings().size(); ++sdind) {
167 if (bsit->second.isEvaluated()) {
168 dump << bsit->second.doubles()[sdind];
170 dump << bsit->second.strings()[sdind];
172 if (sdind != bsit->second.strings().size() - 1)
175 if (!bsit->second.strings().empty() && bsit + 1 != bseit)
178 if (!bit->second->empty() && bit + 1 != eit)
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)
math::Graph< DDLogicalPart, DDPosData * > Graph
std::vector< double >::size_type index_type
const DDTranslation & translation() const
The absolute translation of the current node.
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
void dumpSpec(const std::vector< std::pair< const DDPartSelection *, const DDsvalues_type *> > &attspec, std::ostream &dump)
nav_type navPos() const
return the stack of sibling numbers which indicates the current position in the DDExpandedView ...
Compact representation of the geometrical detector hierarchy.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
static constexpr valType roundNeg0(valType value)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::string toString() const
Graph::const_adj_iterator adjl_iterator
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
const std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > & attachedSpecifics(void) const
adj_list::const_iterator const_adj_iterator
const Graph & graph() const
Provides read-only access to the data structure of the compact-view.
Provides an exploded view of the detector (tree-view)
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
std::vector< int > nav_type
std::vector of sibling numbers