Gambit::Printers::BaseBaseReader Class Referenceabstract So, need: More...
Inheritance diagram for Gambit::Printers::BaseBaseReader:
![]()
Detailed DescriptionSo, need: Printer READ interface For reading data back into Gambit from a printer output file. This is mainly designed for performing "reweighting" of scans, e.g. loading up previously scanned points in order to recompute some new observables or likelihoods. It is pretty hard to permit generic read-in of ALL data, so for now I will focus on just getting the parameter data. If we read in other data we will have to do some gnarly stuff like automatically wrap it into functors, and to appropriate capabilities etc, in order for it to be usable in other in other calculations. So for now, the idea will simply be to take the parameter values and recompute everything anew that is needed for calculating the new likelihoods or whatever. Otherwise it is kind of a nightmare to e.g. reconstruct a Spectrum object from printer data, would need special module functions and so on that know how to put all the data back together. I guess it is possible if we give module writers access to the printer read interface so that they can do this task themselves... but will leave this aside for now. 1. some way to iterate through printer output
Definition at line 277 of file basebaseprinter.hpp. Constructor & Destructor Documentation◆ ~BaseBaseReader()
Definition at line 280 of file basebaseprinter.hpp. References Gambit::Printers::BaseBasePrinter::reset().
Here is the call graph for this function:
![]() Member Function Documentation◆ _retrieve()
template<typename T >
Default _retrieve function. Throws an error if no virtual function matching the type of the attempted retrieval is found. Definition at line 381 of file basebaseprinter.hpp. References Gambit::LogTags::err, LOCAL_INFO, Gambit::Printers::printer_error(), and STRINGIFY. Referenced by Gambit::Printers::asciiReader::get_type(), Gambit::Printers::BaseReader::retrieve(), and Gambit::Printers::HDF5Reader::retrieve_and_add_to_SLHAea(). Definition: log_tags.hpp:38
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ eoi()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::get_done_points().
Here is the caller graph for this function:
![]() ◆ get_all_labels()
Get list of output labels that can be retrieved by this printer. Needs to be implemented in each complete derived Reader class Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by scanner_plugin().
Here is the caller graph for this function:
![]() ◆ get_current_index()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ get_current_point()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ get_dataset_length()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ get_next_point()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::get_done_points(), and Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ get_type()
Get type information for a data entry, i.e. defines the C++ type which this should be retrieved as, not what it is necessarily literally stored as in the output. It isn't human readable, it is just for matching retrieved data to a print type, mainly for the 'retrieve_and_print' function. Needs to be implemented in each complete derived Reader class Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::PPDriver::check_settings(), Gambit::PostProcessor::get_done_points(), and Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ reset()
Implemented in Gambit::Printers::HDF5Reader, Gambit::Printers::SQLiteReader, and Gambit::Printers::asciiReader. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop().
Here is the caller graph for this function:
![]() ◆ retrieve() [1/2]
template<typename T >
Printer-retrieve dispatch function. If a virtual function override exists for the retrieve type, info is passed on, otherwise the function call is resolved to a default function which raises an informative runtime error explaining that the type is not retrievable. Note; this is not quite enough because the entries in the printer output need not be one-to-one with the printed object, e.g. vectors currently go into a series of indexed output slots. Hard for e.g. scanner plugins to know the label that they need to ask for... Perhaps return a map of results matching the label? Or vector? Perhaps both in different cases... Note, cannot overload based on return type, so need to use an "out" parameter In addition, there may not be a valid result printed for a given entry, so an extra output flag "out_valid" must be set to indicate whether the entry was marked invalid in the old output. Use the return value for this. Definition at line 307 of file basebaseprinter.hpp. Referenced by Gambit::PostProcessor::get_done_points(), Gambit::PostProcessor::PPDriver::get_ModelParameters(), and Gambit::PostProcessor::PPDriver::run_main_loop(). bool _retrieve(T &, const std::string &label, const uint, const ulong) Default _retrieve function. Definition: basebaseprinter.hpp:381
Here is the caller graph for this function:
![]() ◆ retrieve() [2/2]
template<typename T >
Overload for 'retrieve' that uses the current point as the input for rank/pointID. Definition at line 314 of file basebaseprinter.hpp. References Gambit::Printers::nullpoint, Gambit::Printers::PPIDpair::pointID, and Gambit::Printers::PPIDpair::rank. virtual PPIDpair get_current_point()=0 bool retrieve(T &out, const std::string &label, const uint rank, const ulong pointID) Printer-retrieve dispatch function. Definition: basebaseprinter.hpp:307 EXPORT_SYMBOLS const PPIDpair nullpoint Define 'nullpoint' const. Definition: new_mpi_datatypes.cpp:185 ◆ retrieve_and_print() [1/4]
Retrieve and directly print data to new output. Just use the same label for input and output Definition at line 331 of file basebaseprinter.hpp. References Gambit::Printers::BaseBasePrinter::rank. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop(). bool retrieve_and_print(const std::string &label, BaseBasePrinter &printer, const uint rank, const ulong pointID) Retrieve and directly print data to new output. Definition: basebaseprinter.hpp:331
Here is the caller graph for this function:
![]() ◆ retrieve_and_print() [2/4]
Retrieve and directly print data to new output, renaming the output to something new Implemented in BasePrinter where complete type info is available. Implemented in Gambit::Printers::BaseReader. ◆ retrieve_and_print() [3/4]
Overload for 'retrieve_and_print' that uses the current point as the input for rank/pointID. Uses same label for input and output Definition at line 342 of file basebaseprinter.hpp. bool retrieve_and_print(const std::string &label, BaseBasePrinter &printer, const uint rank, const ulong pointID) Retrieve and directly print data to new output. Definition: basebaseprinter.hpp:331 ◆ retrieve_and_print() [4/4]
As above, but allows for different input/output labels. Definition at line 349 of file basebaseprinter.hpp. References Gambit::Printers::nullpoint, Gambit::Printers::PPIDpair::pointID, and Gambit::Printers::PPIDpair::rank. virtual PPIDpair get_current_point()=0 EXPORT_SYMBOLS const PPIDpair nullpoint Define 'nullpoint' const. Definition: new_mpi_datatypes.cpp:185 bool retrieve_and_print(const std::string &label, BaseBasePrinter &printer, const uint rank, const ulong pointID) Retrieve and directly print data to new output. Definition: basebaseprinter.hpp:331 The documentation for this class was generated from the following file:
|