|
YODA - Yet more Objects for Data Analysis
1.3.1
|
Persistency writer for AIDA XML format.
More...
#include <WriterAIDA.h>
|
static Writer & | create () |
| Singleton creation function. More...
|
|
|
static void | write (std::ostream &stream, const AnalysisObject &ao) |
| Write out object ao to output stream stream. More...
|
|
static void | write (const std::string &filename, const AnalysisObject &ao) |
| Write out object ao to file filename. More...
|
|
|
static void | write (std::ostream &stream, const std::vector< AnalysisObject * > &aos) |
| Write out a collection of objects objs to output stream stream. More...
|
|
static void | write (const std::string &filename, const std::vector< AnalysisObject * > &aos) |
| Write out a collection of objects objs to file filename. More...
|
|
static void | write (std::ostream &stream, const std::list< AnalysisObject * > &aos) |
| Write out a collection of objects objs to output stream stream. More...
|
|
static void | write (const std::string &filename, const std::list< AnalysisObject * > &aos) |
| Write out a collection of objects objs to file filename. More...
|
|
static void | write (std::ostream &stream, const std::set< AnalysisObject * > &aos) |
| Write out a collection of objects objs to output stream stream. More...
|
|
static void | write (const std::string &filename, const std::set< AnalysisObject * > &aos) |
| Write out a collection of objects objs to file filename. More...
|
|
static void | write (std::ostream &stream, const std::deque< AnalysisObject * > &aos) |
| Write out a collection of objects objs to output stream stream. More...
|
|
static void | write (const std::string &filename, const std::deque< AnalysisObject * > &aos) |
| Write out a collection of objects objs to file filename. More...
|
|
|
template<typename AOITER > |
static void | write (std::ostream &stream, const AOITER &begin, const AOITER &end) |
|
template<typename AOITER > |
static void | write (const std::string &filename, const AOITER &begin, const AOITER &end) |
|
|
virtual | ~Writer () |
| Virtual destructor. More...
|
|
void | setPrecision (int precision) |
| Set precision of numerical quantities in this writer's output. More...
|
|
void | write (std::ostream &stream, const AnalysisObject &ao) |
| Write out object ao to output stream stream. More...
|
|
void | write (const std::string &filename, const AnalysisObject &ao) |
| Write out object ao to file filename. More...
|
|
template<typename RANGE > |
void | write (std::ostream &stream, const RANGE &aos) |
| Write out a collection of objects objs to output stream stream. More...
|
|
template<typename RANGE > |
void | write (const std::string &filename, const RANGE &aos) |
| Write out a collection of objects objs to file filename. More...
|
|
template<typename AOITER > |
void | write (std::ostream &stream, const AOITER &begin, const AOITER &end) |
|
template<typename AOITER > |
void | write (const std::string &filename, const AOITER &begin, const AOITER &end) |
|
Persistency writer for AIDA XML format.
Definition at line 21 of file WriterAIDA.h.
static Writer& YODA::WriterAIDA::create |
( |
| ) |
|
|
inlinestatic |
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const AnalysisObject & |
ao |
|
) |
| |
|
inlinestatic |
Write out object ao to output stream stream.
Definition at line 12 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const AnalysisObject & |
ao |
|
) |
| |
|
inlinestatic |
Write out object ao to file filename.
Definition at line 17 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const std::vector< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to output stream stream.
Definition at line 28 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const std::vector< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to file filename.
Definition at line 32 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const std::list< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to output stream stream.
Definition at line 38 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const std::list< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to file filename.
Definition at line 42 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const std::set< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to output stream stream.
Definition at line 48 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const std::set< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to file filename.
Definition at line 52 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const std::deque< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to output stream stream.
Definition at line 58 of file WriterAIDA.h.
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const std::deque< AnalysisObject * > & |
aos |
|
) |
| |
|
inlinestatic |
Write out a collection of objects objs to file filename.
Definition at line 62 of file WriterAIDA.h.
template<typename AOITER >
static void YODA::WriterAIDA::write |
( |
std::ostream & |
stream, |
|
|
const AOITER & |
begin, |
|
|
const AOITER & |
end |
|
) |
| |
|
inlinestatic |
Write out the objects specified by start iterator begin and end iterator end to output stream stream.
Definition at line 75 of file WriterAIDA.h.
template<typename AOITER >
static void YODA::WriterAIDA::write |
( |
const std::string & |
filename, |
|
|
const AOITER & |
begin, |
|
|
const AOITER & |
end |
|
) |
| |
|
inlinestatic |
Write out the objects specified by start iterator begin and end iterator end to file filename.
Definition at line 83 of file WriterAIDA.h.
void YODA::WriterAIDA::writeCounter |
( |
std::ostream & |
stream, |
|
|
const Counter & |
c |
|
) |
| |
|
protectedvirtual |
Specific AO type writer implementations.
Implements YODA::Writer.
Definition at line 30 of file WriterAIDA.cc.
31 os << endl << "<!-- COUNTER WRITING TO AIDA IS CURRENTLY UNSUPPORTED! -->" << endl << endl;
void YODA::WriterAIDA::writeFooter |
( |
std::ostream & |
stream | ) |
|
|
protectedvirtual |
void YODA::WriterAIDA::writeHeader |
( |
std::ostream & |
stream | ) |
|
|
protectedvirtual |
Main writer elements.
Implements YODA::Writer.
Definition at line 17 of file WriterAIDA.cc.
18 stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
19 stream << "<!DOCTYPE aida SYSTEM \"http://aida.freehep.org/schemas/3.0/aida.dtd\">\n";
21 stream << " <implementation version=\"1.0\" package=\"YODA\"/>\n";
void YODA::WriterAIDA::writeHisto1D |
( |
std::ostream & |
stream, |
|
|
const Histo1D & |
h |
|
) |
| |
|
protectedvirtual |
void YODA::WriterAIDA::writeHisto2D |
( |
std::ostream & |
stream, |
|
|
const Histo2D & |
h |
|
) |
| |
|
protectedvirtual |
Implements YODA::Writer.
Definition at line 42 of file WriterAIDA.cc.
43 os << endl << "<!-- HISTO2D WRITING TO AIDA IS CURRENTLY UNSUPPORTED! -->" << endl << endl;
void YODA::WriterAIDA::writeProfile1D |
( |
std::ostream & |
stream, |
|
|
const Profile1D & |
p |
|
) |
| |
|
protectedvirtual |
void YODA::WriterAIDA::writeProfile2D |
( |
std::ostream & |
stream, |
|
|
const Profile2D & |
p |
|
) |
| |
|
protectedvirtual |
Implements YODA::Writer.
Definition at line 57 of file WriterAIDA.cc.
58 os << endl << "<!-- PROFILE2D WRITING TO AIDA IS CURRENTLY UNSUPPORTED! -->" << endl << endl;
void YODA::WriterAIDA::writeScatter1D |
( |
std::ostream & |
stream, |
|
|
const Scatter1D & |
s |
|
) |
| |
|
protectedvirtual |
Implements YODA::Writer.
Definition at line 65 of file WriterAIDA.cc.
66 os << endl << "<!-- SCATTER1D WRITING TO AIDA IS CURRENTLY UNSUPPORTED! -->" << endl << endl;
void YODA::WriterAIDA::writeScatter2D |
( |
std::ostream & |
stream, |
|
|
const Scatter2D & |
s |
|
) |
| |
|
protectedvirtual |
Implements YODA::Writer.
Definition at line 70 of file WriterAIDA.cc.
References YODA::AnalysisObject::annotation(), YODA::AnalysisObject::annotations(), YODA::AnalysisObject::hasAnnotation(), YODA::AnalysisObject::path(), YODA::Scatter2D::points(), YODA::AnalysisObject::title(), YODA::Point2D::x(), YODA::Point2D::xErrMinus(), YODA::Point2D::xErrPlus(), YODA::Point2D::y(), YODA::Point2D::yErrMinus(), and YODA::Point2D::yErrPlus().
71 ios_base::fmtflags oldflags = os.flags();
73 os << scientific << showpoint << setprecision(_precision);
77 const size_t slashpos = s.path().rfind( "/");
78 if (slashpos != string::npos) {
79 name = s.path().substr(slashpos+1, s.path().length() - slashpos - 1);
80 if (slashpos > 0) path = s.path().substr(0, slashpos);
82 os << " <dataPointSet name=\"" << Utils::encodeForXML(name) << "\"\n"
83 << " title=\"" << Utils::encodeForXML(s.title()) << "\""
84 << " path=\"" << Utils::encodeForXML(path) << "\" dimension=\"2\">\n";
85 os << " <dimension dim=\"0\" title=\"\" />\n";
86 os << " <dimension dim=\"1\" title=\"\" />\n";
87 os << " <annotation>\n";
88 BOOST_FOREACH ( const string& a, s.annotations()) {
89 if (a.empty()) continue;
90 os << " <item key=\"" << Utils::encodeForXML(a)
91 << "\" value=\"" << Utils::encodeForXML(s.annotation(a)) << "\" />\n";
93 if (!s.hasAnnotation( "Type")) {
94 os << " <item key=\"Type\" value=\"Scatter2D\" />\n";
96 os << " </annotation>\n";
97 BOOST_FOREACH ( const Point2D& pt, s.points()) {
98 os << " <dataPoint>\n";
99 os << " <measurement value=\"" << pt.x()
100 << "\" errorPlus=\"" << pt.xErrPlus()
101 << "\" errorMinus=\"" << pt.xErrMinus()
103 os << " <measurement value=\"" << pt.y()
104 << "\" errorPlus=\"" << pt.yErrPlus()
105 << "\" errorMinus=\"" << pt.yErrMinus()
107 os << " </dataPoint>\n";
109 os << " </dataPointSet>\n";
void YODA::WriterAIDA::writeScatter3D |
( |
std::ostream & |
stream, |
|
|
const Scatter3D & |
s |
|
) |
| |
|
protectedvirtual |
Implements YODA::Writer.
Definition at line 116 of file WriterAIDA.cc.
117 os << endl << "<!-- SCATTER3D WRITING TO AIDA IS CURRENTLY UNSUPPORTED! -->" << endl << endl;
The documentation for this class was generated from the following files:
|