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 41 of file DDStreamer.h.
DDStreamer::DDStreamer | ( | ) |
constructs a streamer object with yet undefined std::istream and std::ostream
Definition at line 21 of file DDStreamer.cc.
DDStreamer::DDStreamer | ( | std::istream & | readFrom | ) |
creates a streamer object for reading
Definition at line 37 of file DDStreamer.cc.
DDStreamer::DDStreamer | ( | std::ostream & | writeTo | ) |
creates a streamer object for writing
Definition at line 26 of file DDStreamer.cc.
|
virtual |
does nothing; usefull only if another streamer derives from DDStreamer
Definition at line 48 of file DDStreamer.cc.
|
protected |
read all instances of DDMaterial
Definition at line 284 of file DDStreamer.cc.
References a, DDMaterial::addMaterial(), AlCaHLTBitMon_QueryRunRegistry::comp, ztail::d, DCOUT, dd_get_name(), i, i_, j, visualization-live-secondInstance_cfg::m, gen::n, DDBase< N, C >::name(), and z.
Referenced by read().
|
protected |
write all instances of DDMaterial
Definition at line 255 of file DDStreamer.cc.
References DDMaterial::a(), DDBase< DDName, DDI::Material * >::begin(), DDMaterial::constituent(), DCOUT, dd_count(), DDMaterial::density(), DDBase< DDName, DDI::Material * >::end(), j, visualization-live-secondInstance_cfg::m, DDBase< N, C >::name(), nameout(), DDMaterial::noOfConstituents(), o_, and DDMaterial::z().
Referenced by write().
|
protected |
read all instances of DDName
Definition at line 189 of file DDStreamer.cc.
References DCOUT, dd_get_delimit(), DDName::defineId(), i, i_, DDI::Singleton< I >::instance(), alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by read().
|
protected |
write all instances of DDName
Definition at line 170 of file DDStreamer.cc.
References KineDebug3::count(), DCOUT, DDI::Singleton< I >::instance(), and o_.
Referenced by write().
|
protected |
read all instances of DDLogicalPart
Definition at line 513 of file DDStreamer.cc.
References eostools::cat(), DCOUT, dd_get_name(), i, i_, and gen::n.
Referenced by read().
|
protected |
write all instances of DDLogicalPart
Definition at line 492 of file DDStreamer.cc.
References DDBase< DDName, DDI::LogicalPart * >::begin(), DDLogicalPart::category(), DCOUT, dd_count(), DDBase< DDName, DDI::LogicalPart * >::end(), DDLogicalPart::material(), DDBase< N, C >::name(), nameout(), o_, and DDLogicalPart::solid().
Referenced by write().
|
protected |
read the graph structure for DDCompactView::graph()
Definition at line 675 of file DDStreamer.cc.
References CommonMethods::cp(), DCOUT, dd_get_name(), dd_rot_bin_in(), DDanonymousRot(), Exception, g, DDCompactView::graph(), i, i_, DDI::Singleton< I >::instance(), makeMuonMisalignmentScenario::matrix, python.rootplot.argparse::message, gen::n, DDBase< N, C >::name(), DDCompactView::position(), pyrootRender::root, makeMuonMisalignmentScenario::rot, graph< N, E >::size(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, x, y, and z.
Referenced by read().
|
protected |
write the graph structure of DDCompactView::graph()
Definition at line 609 of file DDStreamer.cc.
References graph< N, E >::begin_iter(), KineDebug3::count(), DCOUT, 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 write().
void DDStreamer::read | ( | ) |
populate DDD transient objects from the std::istream refetrred to by member i_
Definition at line 120 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 153 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 586 of file DDStreamer.cc.
References EnergyCorrector::c, DCOUT, dd_get_name(), dd_rot_bin_in(), Exception, i, i_, gen::n, DDBase< N, C >::name(), and submit::rm.
Referenced by read().
|
protected |
write all instances of DDRotation
Definition at line 557 of file DDStreamer.cc.
References DDBase< DDName, DDRotationMatrix * >::begin(), DCOUT, dd_count(), dd_rot_out(), DDBase< DDName, DDRotationMatrix * >::end(), o_, and alignCSCRings::r.
Referenced by write().
|
inline |
|
inline |
set the std::ostream for DDStreamer::write()
Definition at line 72 of file DDStreamer.h.
References connectstrParser::o, and o_.
|
protected |
read all instances of DDSolid
Definition at line 405 of file DDStreamer.cc.
References a, b, EnergyCorrector::c, DCOUT, dd_get_boolean_params(), dd_get_name(), ddbox, ddcons, ddintersection, ddpolycone_rrz, ddpolycone_rz, ddpolyhedra_rrz, ddpolyhedra_rz, ddpseudotrap, ddreflected, ddshapeless, ddsubtraction, ddtrap, ddtubs, ddunion, Exception, i, i_, DDSolidFactory::intersection(), gen::n, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, DDSolidFactory::reflection(), DDSolidFactory::subtraction(), lumiQTWidget::t, and DDSolidFactory::unionSolid().
Referenced by read().
|
protected |
write all instances of DDSolid
Definition at line 345 of file DDStreamer.cc.
References DDBase< DDName, DDI::Solid * >::begin(), DCOUT, 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 write().
|
protected |
read all instances of
Definition at line 823 of file DDStreamer.cc.
References DCOUT, dd_get_delimit(), dd_get_name(), i, i_, cuy::ii, gen::n, mergeVDriftHistosByStation::name, query::result, alignCSCRings::s, DDValue::setEvalState(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by read().
|
protected |
write all instances of DDSpecifics
Definition at line 773 of file DDStreamer.cc.
References DDBase< DDName, DDI::Specific * >::begin(), DCOUT, dd_count(), DDBase< DDName, DDI::Specific * >::end(), 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 write().
|
protected |
read the dictionlary of ClhepEvaluator
Definition at line 911 of file DDStreamer.cc.
References DDConstant::createConstantsFromEvaluator(), DCOUT, dd_get_delimit(), ev, Exception, i, i_, DDI::Singleton< I >::instance(), gen::n, mergeVDriftHistosByStation::name, ClhepEvaluator::set(), AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
Referenced by read().
|
protected |
write the dictionary of ClhepEvaluator
Definition at line 887 of file DDStreamer.cc.
References ev, Exception, i, DDI::Singleton< I >::instance(), o_, alignCSCRings::s, create_public_pileup_plots::vals, ClhepEvaluator::values(), and ClhepEvaluator::variables().
Referenced by write().
void DDStreamer::write | ( | ) |
stream all DDD transient objects to the std::ostream referred to by member o_
Definition at line 110 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 130 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 125 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 124 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().