104 std::cout <<
"OutputDDToDDL::beginRun" << std::endl;
111 const auto& gra = pDD->
graph();
113 std::set<DDLogicalPart> lpStore;
114 std::set<DDMaterial> matStore;
115 std::set<DDSolid> solStore;
119 std::map<const DDsvalues_type, std::set<const DDPartSelection*>, ddsvaluesCmp> specStore;
120 std::set<DDRotation> rotStore;
125 size_t foundLastDot = rn.find_last_of(
'.');
126 size_t foundLastSlash = rn.find_last_of(
'/');
127 if (foundLastSlash > foundLastDot && foundLastSlash != std::string::npos) {
128 std::cout <<
"What? last . before last / in path for filename... this should die..." << std::endl;
130 if (foundLastDot != std::string::npos && foundLastSlash != std::string::npos) {
131 out.ns_ = rn.substr(foundLastSlash, foundLastDot);
132 }
else if (foundLastDot != std::string::npos) {
133 out.ns_ = rn.substr(0, foundLastDot);
135 std::cout <<
"What? no file name? Attempt at namespace =\"" <<
out.ns_ <<
"\" filename was " <<
m_fname 141 (*m_xos) <<
std::fixed << std::setprecision(18);
146 (*m_xos) <<
"<PosPartSection label=\"" << ns_ <<
"\">" << std::endl;
148 for (; git != gend; ++git) {
150 if (lpStore.find(ddLP) != lpStore.end()) {
153 lpStore.insert(ddLP);
158 auto cit = git->begin();
159 auto cend = git->end();
160 for (; cit != cend; ++cit) {
162 if (lpStore.find(ddcurLP) != lpStore.end()) {
165 lpStore.insert(ddcurLP);
168 rotStore.insert(gra.edgeData(cit->second)->ddrot());
174 (*m_xos) <<
"</PosPartSection>" << std::endl;
176 (*m_xos) << std::scientific << std::setprecision(18);
178 (*m_xos) <<
"<MaterialSection label=\"" << ns_ <<
"\">" << std::endl;
179 for (
const auto&
it : matStore) {
180 if (!
it.isDefined().second)
184 (*m_xos) <<
"</MaterialSection>" << std::endl;
185 (*m_xos) <<
"<RotationSection label=\"" << ns_ <<
"\">" << std::endl;
186 (*m_xos) <<
std::fixed << std::setprecision(18);
187 std::set<DDRotation>::iterator rit(rotStore.begin()),
red(rotStore.end());
188 for (; rit !=
red; ++rit) {
189 if (!rit->isDefined().second)
191 if (rit->toString() !=
":") {
196 (*m_xos) <<
"</RotationSection>" << std::endl;
198 (*m_xos) <<
std::fixed << std::setprecision(18);
199 std::set<DDSolid>::const_iterator sit(solStore.begin()), sed(solStore.end());
200 (*m_xos) <<
"<SolidSection label=\"" << ns_ <<
"\">" << std::endl;
201 for (; sit != sed; ++sit) {
202 if (!sit->isDefined().second)
206 (*m_xos) <<
"</SolidSection>" << std::endl;
208 std::set<DDLogicalPart>::iterator lpit(lpStore.begin()), lped(lpStore.end());
209 (*m_xos) <<
"<LogicalPartSection label=\"" << ns_ <<
"\">" << std::endl;
210 for (; lpit != lped; ++lpit) {
211 if (!lpit->isDefined().first)
216 (*m_xos) <<
"</LogicalPartSection>" << std::endl;
218 (*m_xos) <<
std::fixed << std::setprecision(18);
219 std::map<DDsvalues_type, std::set<const DDPartSelection*> >::const_iterator mit(specStore.begin()),
220 mend(specStore.end());
221 (*m_xos) <<
"<SpecParSection label=\"" << ns_ <<
"\">" << std::endl;
222 for (; mit != mend; ++mit) {
225 (*m_xos) <<
"</SpecParSection>" << std::endl;
math::Graph< DDLogicalPart, DDPosData * > Graph
void addToMatStore(const DDMaterial &mat, std::set< DDMaterial > &matStore)
void addToSpecStore(const DDLogicalPart &lp, std::map< const DDsvalues_type, std::set< const DDPartSelection *>, ddsvaluesCmp > &specStore)
void addToSolStore(const DDSolid &sol, std::set< DDSolid > &solStore, std::set< DDRotation > &rotStore)
Represents a uniquely identifyable rotation matrix.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Graph::const_adj_iterator adjl_iterator
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
edm::ESGetToken< DDCompactView, IdealGeometryRecord > ddToken_
adj_list::const_iterator const_adj_iterator
const Graph & graph() const
Provides read-only access to the data structure of the compact-view.