Public Methods |
| | MultipleReporter () |
| | ~MultipleReporter () |
| virtual bool | ok () const |
| virtual void | open () |
| virtual void | open (const String &filename) |
| virtual MultipleReporter& | header (const String &title, const String &author, bool fullpage=true, bool singlefile=true, const char *purpose=NULL) |
| virtual MultipleReporter& | trailer () |
| virtual String | getSectionRef () |
| virtual MultipleReporter& | section (const String &txt) |
| virtual MultipleReporter& | subsection (const String &txt) |
| virtual MultipleReporter& | section (const String &txt, const String &label) |
| virtual MultipleReporter& | subsection (const String &txt, const String &label) |
| virtual MultipleReporter& | subsubsection (const String &txt) |
| virtual MultipleReporter& | subsubsection (const String &txt, const String &label) |
| virtual MultipleReporter& | multipleLoopSection (int run_no, const char *heading=NULL) |
| virtual MultipleReporter& | multipleLoopSection (int run_no, MenuSystem &menu, const char *heading=NULL) |
| virtual MultipleReporter& | pagebreak () |
| virtual MultipleReporter& | linebreak () |
| virtual MultipleReporter& | eject (int n=1) |
| virtual MultipleReporter& | drawline () |
| virtual MultipleReporter& | putLabel (const String &label) |
| virtual MultipleReporter& | putReference (const String &label) |
| virtual MultipleReporter& | putReference (const String &label, const String &document) |
| virtual MultipleReporter& | flush () |
| virtual MultipleReporter& | beginGroup (TextStyle style) |
| virtual MultipleReporter& | endGroup () |
| virtual String | getGroup (const String &txt, TextStyle style) |
| virtual String | cellpad (const String &s) |
| virtual String | adaptString (const String &txt) |
| virtual MultipleReporter& | insert (const String &txt) |
| virtual MultipleReporter& | put (const String &txt) |
| virtual MultipleReporter& | putmathline (const String &txt) |
| virtual MultipleReporter& | centerline (const String &txt) |
| virtual MultipleReporter& | insertDocument (const String &basename) |
| virtual MultipleReporter& | insertVerbatim (const String &file) |
| virtual MultipleReporter& | put (ArrayGenSimple(String) &tb) |
| virtual MultipleReporter& | put (ArrayGenSimple(real) &tb) |
| virtual MultipleReporter& | put (ArrayGenSimple(real) &tb, const String &cell_format) |
| virtual MultipleReporter& | put (ArrayGenSimple(real) &tb, ArrayGenSimple(String) &cell_format) |
| virtual MultipleReporter& | beginCenter () |
| virtual MultipleReporter& | endCenter () |
| virtual MultipleReporter& | beginTabular (int ncols, const String &col_format) |
| virtual MultipleReporter& | endTabular () |
| virtual MultipleReporter& | beginTable (int ncols, const String &col_format) |
| virtual MultipleReporter& | endTable (const String &caption, const String &label) |
| virtual MultipleReporter& | beginItemize () |
| virtual MultipleReporter& | endItemize () |
| virtual MultipleReporter& | beginEnumerate () |
| virtual MultipleReporter& | endEnumerate () |
| virtual MultipleReporter& | beginFigure (const String &psfilename, real cmWidth=10.0) |
| virtual MultipleReporter& | endFigure (const String &caption, const String &label) |
| virtual MultipleReporter& | beginDispmath () |
| virtual MultipleReporter& | endDispmath () |
| virtual String | makeLabelRef (const String &label) |
| virtual String | getCurrPlotDir () |
| virtual MultipleReporter& | figure (const String &psfilename, const String &caption, const String &label, real cmWidth=10.0) |
| virtual MultipleReporter& | figure (const Strings &psfilename, const Strings &caption, const String &common_caption, const Strings &label, real cmWidth=10.0) |
| virtual MultipleReporter& | setFigureCollectMode (bool mode) |
| virtual MultipleReporter& | dumpMultipleFigures () |
| virtual MultipleReporter& | dumpPlotCmd (const StringList &command) |
| virtual MultipleReporter& | displaymath (const String &txt) |
| virtual void | specialTextASCII (const String &txt) |
| virtual void | specialTextLaTeX (const String &txt) |
| virtual void | specialTextHTML (const String &txt) |
| virtual void | process (bool postscript=true) |
| virtual void | print (bool postscript=true) |
| virtual void | preview (bool postscript=true) |
| virtual void | setSummaryTableLineLength (int max_chars) |
| virtual void | putSummaryTable (ArrayGenSimple(String) &table) |
| virtual void | putSummaryHeading (const String &title, const String &author, const Strings &headings, bool fullpage=true, bool singlefile=true) |
| virtual void | putSummary4oneSim (const Strings &results, int icomb) |
| virtual void | endSummary () |
Public Attributes |
| Handle(Reporter) | full_latex |
| Handle(Reporter) | full_ascii |
| Handle(Reporter) | full_html |
| Handle(Reporter) | sum_latex |
| Handle(Reporter) | sum_ascii |
| Handle(Reporter) | sum_html |
| Os | sum_data |
Protected Attributes |
| String | filename |
| int | max_char_pr_summary_line |
| bool | open_files |
| String | purpose |
| bool | figure_collect_mode |
| StringList | psfilename_list |
| StringList | caption_list |
| StringList | label_list |
| real | max_cmWidth |
| int | psfilename_counter |
| ArrayGenSimple(String) | summary_page |
| int | i_summary_column |
| Strings | summary_heading |
NAME: MultipleReporter - automatic generation of 7 report formats in simulators
This type of reports are normally generated when the menu system is used for executing a large number of simulations (the so called "multiple loop" feature). Therefore the reports tend to be very long, and it may be very difficult to extract the most important information. To solve this practical problem, class "MultipleReporter" is equipped with an additional feature, namely the generation of a summary report. The summary is essentially compact tables where each column corresponds to a single execution of the simulator (or in other words, one single input parameter combination). The summary is also written in various formats: ASCII, `\`LaTeX, HTML and table. The latter format is aimed at input files for post-processing procedures like curve fitting in statistical software etc.
The normal use of class "MultipleReporter" thus results in seven reports: Three so called full reports and four summary reports. The user will study the summaries for general trends and look up in the full reports to investigate the details of particularly interesting runs. `\`LaTeX`\` summary reports are the easiest to read on paper, HTML reports are useful for moving around in the report -- using Mosaic one can find an interesting run in the summary, click on that table column and then move directly into the full report for more information, including figures, on that particular execution.
The example in class "CDFEM2" presented in Report NO:97-11, "Diffpack Tools for Automatic Generation of Result Reports" by A.M. Bruaset, should be sufficient to see how the "MultipleReporter" is used in a practical problem. Together with the documentation of all the member functions (this documentation is given in class "Reporter" and the cited document), this is a good starting point for developing automatic report generation in other applications.
In case one has a class hierarchy with the simulator as base class, it may be advantageous to let the items in the summary report differ among the subclasses. The simulator base class can then declare virtual functions "defineSummaryHeading" and "resultSummary". The former adds names of the subclass' result or input items to the summary, and the latter adds the class' results to the summary. In "openReport" in the simulator class, one writes the header of the "MultipleReporter", defines some general summary items and then calls the virtual function "defineSummaryHeading" such that the subclass can add its names of the table headings. In "resultReport" one reports the general results, e.g., convergence and efficiency of equation solvers, and calls "resultSummary" so that the simulator in question can report its special results.
If one has a mathematical model and its numerical solution implemented as a class X, it is a Diffpack standard to derive a class ReportX where the "MultipleReporter" details are implemented. There is a convenient script "MkReport" that can be run to automatically generate a definition of the new class. Just write "MkReport X". The file "ReportX.cpp" will contain several examples on how to write to the report, how to let other classes write to the report and how to produce and include plots in the report.