#include "DetectorDescription/Core/interface/DDStreamer.h"
#include "DetectorDescription/Base/interface/Singleton.h"
#include "DetectorDescription/Core/interface/DDMaterial.h"
#include "DetectorDescription/Core/interface/DDSolid.h"
#include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDTransform.h"
#include "DetectorDescription/Core/interface/DDRoot.h"
#include "DetectorDescription/Core/interface/DDSpecifics.h"
#include "DetectorDescription/Core/interface/DDValue.h"
#include "DetectorDescription/Base/interface/DDdebug.h"
#include "DetectorDescription/Core/interface/DDConstant.h"
#include "DetectorDescription/Core/interface/DDPartSelection.h"
#include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iomanip>
Go to the source code of this file.
Classes | |
struct | double_binary |
Typedefs | |
typedef double_binary | B |
Functions | |
template<class T > | |
size_t | dd_count (const T &) |
void | dd_get_boolean_params (std::istream &is, DDRotation &r, DDTranslation &t, DDSolid &a, DDSolid &b) |
std::string | dd_get_delimit (std::istream &is, char d) |
DDName | dd_get_name (std::istream &is) |
DDName | dd_get_name_string (std::istream &is) |
void | dd_rot_bin_in (std::istream &is, DDRotationMatrix &r) |
void | dd_rot_bin_out (std::ostream &os, const DDRotationMatrix &rm) |
void | dd_rot_out (std::ostream &os, const DDRotation &r) |
void | dd_stream_booleans (std::ostream &os, DDSolid s, DDSolidShape) |
void | dd_stream_reflected (std::ostream &os, DDSolid s) |
void | nameout (std::ostream &o, const DDName &n) |
void | nameout_strings (std::ostream &o, const DDName &n) |
std::ostream & | operator<< (std::ostream &os, double_binary b) |
std::istream & | operator>> (std::istream &is, double_binary &b) |
typedef double_binary B |
Definition at line 234 of file DDStreamer.cc.
size_t dd_count | ( | const T & | ) |
Definition at line 214 of file DDStreamer.cc.
References begin, end, query::result, and svgfig::template().
Referenced by DDStreamer::materials_write(), DDStreamer::parts_write(), DDStreamer::rots_write(), DDStreamer::solids_write(), and DDStreamer::specs_write().
void dd_get_boolean_params | ( | std::istream & | is, |
DDRotation & | r, | ||
DDTranslation & | t, | ||
DDSolid & | a, | ||
DDSolid & | b | ||
) |
Definition at line 385 of file DDStreamer.cc.
References DCOUT, dd_get_name(), Exception, n, DDBase< N, C >::name(), x, detailsBasic3DVector::y, and z.
Referenced by DDStreamer::solids_read().
{ DDName n = dd_get_name(is); r = DDRotation(n); //double x(0), y(0), z(0); B x,y,z; char cr = is.get(); if(cr != ' ') throw cms::Exception("DDException") << "DDStreamer::get_boolean_param(): inconsistent sequence! no blank delimiter before trans!"; is >> x; is >> y; is >> z; t = DDTranslation(x.val_,y.val_,z.val_); n = dd_get_name(is); a = DDSolid(n); n = dd_get_name(is); b = DDSolid(n); DCOUT('y', "boolean-par: rot=" << r.name() << " t=" << t << " a=" << a.name() << " b=" << b.name()); }
std::string dd_get_delimit | ( | std::istream & | is, |
char | d | ||
) |
Definition at line 65 of file DDStreamer.cc.
References i.
Referenced by dd_get_name_string(), DDStreamer::names_read(), DDStreamer::specs_read(), and DDStreamer::vars_read().
DDName dd_get_name | ( | std::istream & | is | ) |
Definition at line 92 of file DDStreamer.cc.
References errorMatrix2Lands_multiChannel::id.
Referenced by dd_get_boolean_params(), DDStreamer::materials_read(), DDStreamer::parts_read(), DDStreamer::pos_read(), DDStreamer::rots_read(), DDStreamer::solids_read(), and DDStreamer::specs_read().
DDName dd_get_name_string | ( | std::istream & | is | ) |
Definition at line 76 of file DDStreamer.cc.
References dd_get_delimit().
{ std::string nm(dd_get_delimit(is,'"')) ; return DDName(nm, dd_get_delimit(is,'"')); /* char i; while ((i=is.get()) && i != '"') ; while ((i=is.get()) && i != '"') { nm = nm + i; } std::pair<std::string,std::string> p = DDSplit(nm); return DDName(p.first,p.second); */ }
void dd_rot_bin_in | ( | std::istream & | is, |
DDRotationMatrix & | r | ||
) |
void dd_rot_bin_out | ( | std::ostream & | os, |
const DDRotationMatrix & | rm | ||
) |
Definition at line 534 of file DDStreamer.cc.
Referenced by dd_rot_out(), and DDStreamer::pos_write().
void dd_rot_out | ( | std::ostream & | os, |
const DDRotation & | r | ||
) |
Definition at line 542 of file DDStreamer.cc.
References DCOUT, dd_rot_bin_out(), DDBase< N, C >::name(), nameout(), submit::rm, and DDRotation::rotation().
Referenced by DDStreamer::rots_write().
{ os << "--Rot: " << r.name() << " @ "; nameout(os,r.name()); os << ' '; const DDRotationMatrix & rm = *(r.rotation()); DCOUT('y', "write-rots=" << r.name()); /* os << ' ' << B(rep.xx_) << ' ' << B(rep.xy_) << ' ' << B(rep.xz_) << ' ' << B(rep.yx_) << ' ' << B(rep.yy_) << ' ' << B(rep.yz_) << ' ' << B(rep.zx_) << ' ' << B(rep.zy_) << ' ' << B(rep.zz_) << std::endl; */ dd_rot_bin_out(os,rm); os << std::endl; }
void dd_stream_booleans | ( | std::ostream & | os, |
DDSolid | s, | ||
DDSolidShape | |||
) |
Definition at line 321 of file DDStreamer.cc.
References b, DDBase< N, C >::isDefined(), DDBase< N, C >::name(), nameout(), DDBooleanSolid::rotation(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and DDBooleanSolid::translation().
Referenced by DDStreamer::solids_write().
{ DDBooleanSolid b(s); DDRotation temprot = b.rotation(); if(!temprot.isDefined().second) { temprot = DDRotation(); edm::LogError("DDStreamer") << "DDStreamer::dd_stream_booleans(): solid=" << s.name() << " has no rotation. Using unit-rot." << std::endl; } nameout(os,temprot.name()); // binary output of the translation std::vector os << ' ' << B(b.translation().x()) // << ' ' << B(b.translation().y()) // << ' ' << B(b.translation().z()) << ' '; nameout(os,b.solidA().name()); os << ' '; nameout(os,b.solidB().name()); }
void dd_stream_reflected | ( | std::ostream & | os, |
DDSolid | s | ||
) |
Definition at line 339 of file DDStreamer.cc.
References DDBase< N, C >::name(), nameout(), and DDReflectionSolid::unreflected().
Referenced by DDStreamer::solids_write().
{ DDReflectionSolid ref(s); nameout(os,ref.unreflected().name()); }
void nameout | ( | std::ostream & | o, |
const DDName & | n | ||
) |
Definition at line 104 of file DDStreamer.cc.
References DDName::id().
Referenced by dd_rot_out(), dd_stream_booleans(), dd_stream_reflected(), DDStreamer::materials_write(), DDStreamer::parts_write(), DDStreamer::pos_write(), DDStreamer::solids_write(), and DDStreamer::specs_write().
void nameout_strings | ( | std::ostream & | o, |
const DDName & | n | ||
) |
Definition at line 99 of file DDStreamer.cc.
References DDName::name(), and DDName::ns().
std::ostream& operator<< | ( | std::ostream & | os, |
double_binary | b | ||
) |
Definition at line 236 of file DDStreamer.cc.
References double_binary::val_.
{ const char * d = (const char *)(&(b.val_)); //size_t s(sizeof(double)), i(0); //os << '('; os.write(d,sizeof(double)); return os; }
std::istream& operator>> | ( | std::istream & | is, |
double_binary & | b | ||
) | [inline] |
Definition at line 246 of file DDStreamer.cc.
References double_binary::val_.
{ char * d = (char *)(&(b.val_)); //size_t s(sizeof(double)), i(0); is.read(d,sizeof(double)); return is; }