Streaming the DDD transient store from/into a std::istream/std::ostream */. More...
#include <DDStreamer.h>
Public Member Functions | |
DDStreamer () | |
constructs a streamer object with yet undefined std::istream and std::ostream More... | |
DDStreamer (std::istream &readFrom) | |
creates a streamer object for reading More... | |
DDStreamer (std::ostream &writeTo) | |
creates a streamer object for writing More... | |
void | read () |
populate DDD transient objects from the std::istream refetrred to by member i_ More... | |
void | read (std::istream &is) |
populate DDD transient objects from the given std::istream is More... | |
void | setInput (std::istream &i) |
set the istream for DDStreamer::read() More... | |
void | setOutput (std::ostream &o) |
set the std::ostream for DDStreamer::write() More... | |
void | write () |
stream all DDD transient objects to the std::ostream referred to by member o_ More... | |
void | write (std::ostream &os) |
stream all DDD transient objects to the given std::ostream os More... | |
virtual | ~DDStreamer () |
does nothing; usefull only if another streamer derives from DDStreamer More... | |
Protected Member Functions | |
void | materials_read () |
read all instances of DDMaterial More... | |
void | materials_write () |
write all instances of DDMaterial More... | |
void | names_read () |
read all instances of DDName More... | |
void | names_write () |
write all instances of DDName More... | |
void | parts_read () |
read all instances of DDLogicalPart More... | |
void | parts_write () |
write all instances of DDLogicalPart More... | |
void | pos_read () |
read the graph structure for DDCompactView::graph() More... | |
void | pos_write () |
write the graph structure of DDCompactView::graph() More... | |
void | rots_read () |
read all instances of DDRotation More... | |
void | rots_write () |
write all instances of DDRotation More... | |
void | solids_read () |
read all instances of DDSolid More... | |
void | solids_write () |
write all instances of DDSolid More... | |
void | specs_read () |
read all instances of More... | |
void | specs_write () |
write all instances of DDSpecifics More... | |
void | vars_read () |
read the dictionlary of ClhepEvaluator More... | |
void | vars_write () |
write the dictionary of ClhepEvaluator More... | |
Private Attributes | |
std::istream * | i_ |
std::ostream * | o_ |
Streaming the DDD transient store from/into a std::istream/std::ostream */.
DDStreamer can be used to write the DDD transient object into a std::ostram and to retrieve them again via an std::istream.
The streamer can also be used together with DDLParser. Once possible usage scenario would be to load most of the geometrical DDD information via the streamer and parse some addional DDD XML documents containing SpecPar-information using DDLParser.
If DDStreamer is used together with DDLParser, the user has to ensure that reading in via DDStreamer::read() is done BEFORE invoking DDLParser to guarantee internal consistensies of the DDD objects.
Definition at line 42 of file DDStreamer.h.
DDStreamer::DDStreamer | ( | ) |
constructs a streamer object with yet undefined std::istream and std::ostream
Definition at line 37 of file DDStreamer.cc.
DDStreamer::DDStreamer | ( | std::istream & | readFrom | ) |
creates a streamer object for reading
Definition at line 53 of file DDStreamer.cc.
DDStreamer::DDStreamer | ( | std::ostream & | writeTo | ) |
creates a streamer object for writing
Definition at line 42 of file DDStreamer.cc.
|
virtual |
does nothing; usefull only if another streamer derives from DDStreamer
Definition at line 64 of file DDStreamer.cc.
|
protected |
read all instances of DDMaterial
Definition at line 295 of file DDStreamer.cc.
References a, DDMaterial::addMaterial(), AlCaHLTBitMon_QueryRunRegistry::comp, edmIntegrityCheck::d, dd_get_name(), mps_fire::i, i_, funct::m, gen::n, and z.
Referenced by read(), and setOutput().
|
protected |
write all instances of DDMaterial
Definition at line 269 of file DDStreamer.cc.
References DDMaterial::a(), DDBase< DDName, DDI::Material * >::begin(), DDMaterial::constituent(), dd_count(), DDMaterial::density(), DDBase< DDName, DDI::Material * >::end(), funct::m, DDBase< N, C >::name(), nameout(), DDMaterial::noOfConstituents(), o_, and DDMaterial::z().
Referenced by setOutput(), and write().
|
protected |
read all instances of DDName
Definition at line 204 of file DDStreamer.cc.
References dd_get_delimit(), DDName::defineId(), mps_fire::i, i_, hcalTTPDigis_cfi::id, DDI::Singleton< I >::instance(), alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by read(), and setOutput().
|
protected |
write all instances of DDName
Definition at line 186 of file DDStreamer.cc.
References KineDebug3::count(), DDI::Singleton< I >::instance(), and o_.
Referenced by setOutput(), and write().
|
protected |
read all instances of DDLogicalPart
Definition at line 515 of file DDStreamer.cc.
References eostools::cat(), dd_get_name(), mps_fire::i, i_, and gen::n.
Referenced by read(), and setOutput().
|
protected |
write all instances of DDLogicalPart
Definition at line 495 of file DDStreamer.cc.
References DDBase< DDName, DDI::LogicalPart * >::begin(), DDLogicalPart::category(), dd_count(), DDBase< DDName, DDI::LogicalPart * >::end(), DDLogicalPart::material(), DDBase< N, C >::name(), nameout(), o_, and DDLogicalPart::solid().
Referenced by setOutput(), and write().
|
protected |
read the graph structure for DDCompactView::graph()
Definition at line 670 of file DDStreamer.cc.
References SimDataFormats::CaloAnalysis::cp, dd_get_name(), dd_rot_bin_in(), DDanonymousRot(), Exception, g, DDCompactView::graph(), mps_fire::i, i_, DDI::Singleton< I >::instance(), makeMuonMisalignmentScenario::matrix, python.rootplot.argparse::message, gen::n, DDCompactView::position(), pyrootRender::root, makeMuonMisalignmentScenario::rot, graph< N, E >::size(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, x, y, and z.
Referenced by read(), and setOutput().
|
protected |
write the graph structure of DDCompactView::graph()
Definition at line 605 of file DDStreamer.cc.
References graph< N, E >::begin_iter(), KineDebug3::count(), dd_rot_bin_out(), graph< N, E >::end_iter(), g, DDCompactView::graph(), DDI::Singleton< I >::instance(), DDBase< N, C >::name(), nameout(), and o_.
Referenced by setOutput(), and write().
void DDStreamer::read | ( | ) |
populate DDD transient objects from the std::istream refetrred to by member i_
Definition at line 136 of file DDStreamer.cc.
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().
void DDStreamer::read | ( | std::istream & | is | ) |
populate DDD transient objects from the given std::istream is
Definition at line 169 of file DDStreamer.cc.
References i_, materials_read(), names_read(), parts_read(), pos_read(), rots_read(), solids_read(), specs_read(), and vars_read().
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().
|
protected |
read all instances of DDRotation
Definition at line 584 of file DDStreamer.cc.
References EnergyCorrector::c, dd_get_name(), dd_rot_bin_in(), Exception, mps_fire::i, i_, gen::n, and submit::rm.
Referenced by read(), and setOutput().
|
protected |
write all instances of DDRotation
Definition at line 556 of file DDStreamer.cc.
References DDBase< DDName, DDRotationMatrix * >::begin(), dd_count(), dd_rot_out(), DDBase< DDName, DDRotationMatrix * >::end(), o_, and alignCSCRings::r.
Referenced by setOutput(), and write().
|
inline |
set the istream for DDStreamer::read()
Definition at line 70 of file DDStreamer.h.
References mps_fire::i, and i_.
|
inline |
set the std::ostream for DDStreamer::write()
Definition at line 73 of file DDStreamer.h.
References materials_read(), materials_write(), names_read(), names_write(), connectstrParser::o, o_, parts_read(), parts_write(), pos_read(), pos_write(), rots_read(), rots_write(), solids_read(), solids_write(), specs_read(), specs_write(), vars_read(), and vars_write().
|
protected |
read all instances of DDSolid
Definition at line 409 of file DDStreamer.cc.
References a, b, EnergyCorrector::c, dd_get_boolean_params(), dd_get_name(), ddbox, ddcons, ddcuttubs, ddintersection, ddpolycone_rrz, ddpolycone_rz, ddpolyhedra_rrz, ddpolyhedra_rz, ddpseudotrap, ddreflected, ddshapeless, ddsubtraction, ddtrap, ddtubs, ddunion, Exception, mps_fire::i, i_, DDSolidFactory::intersection(), gen::n, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, DDSolidFactory::reflection(), DDSolidFactory::subtraction(), lumiQTWidget::t, and DDSolidFactory::unionSolid().
Referenced by read(), and setOutput().
|
protected |
write all instances of DDSolid
Definition at line 352 of file DDStreamer.cc.
References DDBase< DDName, DDI::Solid * >::begin(), dd_count(), dd_stream_booleans(), dd_stream_reflected(), ddintersection, ddreflected, ddsubtraction, ddunion, DDBase< DDName, DDI::Solid * >::end(), DDSolidShapesName::name(), DDBase< N, C >::name(), nameout(), o_, AlCaHLTBitMon_ParallelJobs::p, DDSolid::parameters(), alignCSCRings::s, and DDSolid::shape().
Referenced by setOutput(), and write().
|
protected |
read all instances of
Definition at line 813 of file DDStreamer.cc.
References dd_get_delimit(), dd_get_name(), mps_fire::i, i_, cuy::ii, gen::n, dataset::name, mps_fire::result, alignCSCRings::s, DDValue::setEvalState(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by read(), and setOutput().
|
protected |
write all instances of DDSpecifics
Definition at line 764 of file DDStreamer.cc.
References DDBase< DDName, DDI::Specific * >::begin(), dd_count(), DDBase< DDName, DDI::Specific * >::end(), mps_fire::i, DDValue::isEvaluated(), DDValue::name(), DDBase< N, C >::name(), nameout(), o_, alignCSCRings::s, DDSpecifics::selection(), DDValue::size(), DDSpecifics::specifics(), DDValue::strings(), and findQualityFiles::v.
Referenced by setOutput(), and write().
|
protected |
read the dictionlary of ClhepEvaluator
Definition at line 898 of file DDStreamer.cc.
References DDConstant::createConstantsFromEvaluator(), dd_get_delimit(), ev, Exception, mps_fire::i, i_, DDI::Singleton< I >::instance(), gen::n, dataset::name, ClhepEvaluator::set(), AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
Referenced by read(), and setOutput().
|
protected |
write the dictionary of ClhepEvaluator
Definition at line 874 of file DDStreamer.cc.
References ev, Exception, mps_fire::i, DDI::Singleton< I >::instance(), o_, alignCSCRings::s, create_public_pileup_plots::vals, ClhepEvaluator::values(), and ClhepEvaluator::variables().
Referenced by setOutput(), and write().
void DDStreamer::write | ( | ) |
stream all DDD transient objects to the std::ostream referred to by member o_
Definition at line 126 of file DDStreamer.cc.
Referenced by pkg.AbstractPkg::generate().
void DDStreamer::write | ( | std::ostream & | os | ) |
stream all DDD transient objects to the given std::ostream os
Definition at line 146 of file DDStreamer.cc.
References materials_write(), names_write(), o_, parts_write(), pos_write(), rots_write(), solids_write(), specs_write(), and vars_write().
Referenced by pkg.AbstractPkg::generate().
|
private |
istream target for reading DDD objects
Definition at line 126 of file DDStreamer.h.
Referenced by DDStreamer(), materials_read(), names_read(), parts_read(), pos_read(), read(), rots_read(), setInput(), solids_read(), specs_read(), and vars_read().
|
private |
std::ostream target for writing DDD objects
Definition at line 125 of file DDStreamer.h.
Referenced by DDStreamer(), materials_write(), names_write(), parts_write(), pos_write(), rots_write(), setOutput(), solids_write(), specs_write(), vars_write(), and write().