gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::Printers Namespace Reference

Forward declaration of Printers::BasePrinter class for use in print functions. More...

Namespaces

 HDF5
 

Classes

class  asciiPrinter
 
class  asciiReader
 Derived EntryGetterInterface class for accessing asciiPrinter output points. More...
 
class  BaseBasePrinter
 
class  BaseBaseReader
 So, need: More...
 
class  BasePrinterManager
 Manager class for creating printer objects. More...
 
class  BaseReader
 BASE PRINTER CLASS. More...
 
struct  BuffPair
 
struct  BuffTags
 Struct for a collection of MPI tags belonging to a single buffer. More...
 
class  coutPrinter
 
class  DataSetInterfaceBase
 Wrapper object to manage a single dataset. More...
 
class  DataSetInterfaceScalar
 Derived dataset interface, with methods for writing scalar records (i.e. More...
 
struct  get_hdf5_data_type
 Base template is left undefined in order to raise a compile error if specialisation doesn't exist. More...
 
struct  get_hdf5_data_type< bool >
 
struct  get_hdf5_data_type< char >
 True types. More...
 
struct  get_hdf5_data_type< double >
 
struct  get_hdf5_data_type< float >
 
struct  get_hdf5_data_type< int >
 
struct  get_hdf5_data_type< long >
 
struct  get_hdf5_data_type< long double >
 
struct  get_hdf5_data_type< long long >
 
struct  get_hdf5_data_type< short >
 
struct  get_hdf5_data_type< unsigned char >
 
struct  get_hdf5_data_type< unsigned int >
 
struct  get_hdf5_data_type< unsigned long >
 
struct  get_hdf5_data_type< unsigned long long >
 
struct  get_hdf5_data_type< unsigned short >
 
class  H5P_LocalBufferManager
 Keeps track of vertex buffers local to a print function. More...
 
class  H5P_LocalReadBufferManager
 Keeps track of vertex buffers local to a retrieve function Similar to the buffer manager for HDF5Printer. More...
 
class  HDF5Buffer
 Class to manage buffer for a single output label. More...
 
class  HDF5BufferBase
 Base class for buffers. More...
 
struct  HDF5bufferchunk
 
class  HDF5DataSet
 Class for interfacing to a HDF5 dataset of fixed type. More...
 
class  HDF5DataSetBase
 Base class for interfacing to a HDF5 dataset. More...
 
class  HDF5DataSetBasic
 Constructable class for doing basic operations on a HDF5 dataset. More...
 
class  HDF5File
 
class  HDF5MasterBuffer
 Class to manage all buffers for a given printer object Also handles the file locking/access to the output file. More...
 
class  HDF5MasterBufferT
 Class to manage a set of buffers for a single output type. More...
 
class  HDF5Printer
 The main printer class for output to HDF5 format. More...
 
class  HDF5Printer2
 The main printer class for output to HDF5 format. More...
 
class  HDF5Reader
 
class  nonePrinter
 
struct  PPIDEqual
 
struct  PPIDHash
 
struct  PPIDpair
 pointID / process number pair Used to identify a single parameter space point More...
 
class  PrinterManager
 Manager class for creating printer objects. More...
 
struct  Record
 Structure to hold data for a single model point. More...
 
class  SQLiteBase
 SQLite base class for both reader and writer. More...
 
class  SQLitePrinter
 The main printer class for output to SQLite database. More...
 
class  SQLiteReader
 
struct  VBIDpair
 vertexID / sub-print index pair Identifies individual buffers (I call them VertexBuffer, but actually there can be more than one per vertex) More...
 
struct  VBIDtrip
 
class  VertexBufferBase
 VertexBuffer abstract interface base class. More...
 
class  VertexBufferNumeric1D
 VertexBuffer for simple numerical types. More...
 
class  VertexBufferNumeric1D_HDF5
 VertexBuffer for simple numerical types - derived version that handles output to hdf5. More...
 

Typedefs

typedef unsigned int uint
 
typedef unsigned long int ulong
 
typedef long long int longlong
 
typedef unsigned long long int ulonglong
 
typedef BaseReadercreate_reader_function(const Options &)
 
typedef std::map< int, std::vector< double > > LineBuf
 
typedef std::map< std::pair< int, int >, RecordBuffer
 
typedef int sql_callback_fptr(void *, int, char **, char **)
 
typedef long long int llint
 
typedef std::string str
 
typedef unsigned short int ushort
 

Enumerations

enum  Tags {
  TAG_REQ =0, INIT_PASS, PPFILES_PASS, FINAL_PASS,
  PPID_SEND, N_BUFFERS_SENT, RA_BUFFERS_SENT, FINAL_SYNC
}
 Reserved tags for MPI messages TAG_REQ - for messages registering/requesting a new tags INIT_PASS - for messages registering completion of initialisation PPFILES_PASS - for messages registering completion of preprocessing of existing files (combination/deletion) FINAL_PASS - for messages registering passing of checkpoint during finalise PPID_SEND - for messages transferring point ID information N_BUFFERS_SENT - for messages counting the number of buffer transfer messages being sent in one 'package' RA_BUFFERS_SENT - Contains no data, just indicates that RA buffer messages from some process are waiting to send. More...
 

Functions

template<class T >
std::size_t getTypeID (void)
 Helper template functions to retrieve type IDs for a type. More...
 
bool parse_label_for_ModelParameters (const std::string &fulllabel, const std::string &modelname, std::string &out, std::string &labelroot, bool case_sensitive)
 Helper function for the ModelParameters '_retrieve' functions Parses a printer label and checks if it contains a single model parameter. More...
 
bool parse_label_for_spectrum_entry (const std::string &fulllabel, const std::string &req_capability, const std::string &req_module, const std::string &req_function, std::string &outname, std::string &outtag, std::string &labelroot, bool case_sensitive=true)
 Helper function for parsing Spectrum label strings. More...
 
void printAllTypeIDs (void)
 For debugging; print to stdout all the typeIDs for all types. More...
 
EXPORT_SYMBOLS bool & auto_increment ()
 Global flag to indicate if auto-incrementing of the PointID by the likelihood container is allowed. More...
 
EXPORT_SYMBOLS unsigned long long intget_point_id ()
 Returns unigue pointid;. More...
 
EXPORT_SYMBOLS int get_param_id (const std::string &name, bool &is_new)
 Consolidated 'get id' function, for both main and aux. More...
 
EXPORT_SYMBOLS int get_param_id (const std::string &name)
 
EXPORT_SYMBOLS std::vector< std::string > get_all_params ()
 Get names of all parameters known to printer system (vector index corresponds to ID number) More...
 
EXPORT_SYMBOLS int get_main_param_id (const std::string &)
 Returns unique positive parameter id; just a thin wrapper for get_param_id. More...
 
EXPORT_SYMBOLS int get_main_param_id (const std::string &, bool &is_new)
 Extra argument returns true if new ID was assigned. More...
 
EXPORT_SYMBOLS int get_aux_param_id (const std::string &)
 Returns unique negative parameter id; just a thin wrapper for get_param_id. More...
 
EXPORT_SYMBOLS int get_aux_param_id (const std::string &, bool &is_new)
 Extra argument returns true if new ID was assigned. More...
 
template<typename P , typename T >
void _common_print (P &, T const &, const std::string &, const int, const unsigned int, const unsigned long)
 Common print overload template. More...
 
template<typename P >
void _common_print (P &printer, std::vector< double > const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 Vector-of-doubles print overload. More...
 
template<typename P >
void _common_print (P &printer, const map_str_dbl &map, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 String-to-double map print overload. More...
 
template<typename P >
void _common_print (P &printer, map_intpair_dbl const &map, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 Integer pair-to-double map print overload. More...
 
template<typename P >
void _common_print (P &printer, ModelParameters const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 ModelParameters print overload. More...
 
template<typename P >
void _common_print (P &printer, triplet< double > const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 Triplet print overload. More...
 
template<typename P >
void _common_print (P &printer, DM_nucleon_couplings const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 DM-nucleon coupling print overload. More...
 
template<typename P >
void _common_print (P &printer, DM_nucleon_couplings_fermionic_HP const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 DM-nucleon coupling print overload (For the fermionic HP) More...
 
template<typename P >
void _common_print (P &printer, Flav_KstarMuMu_obs const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 K*->mumu angular observables print overload. More...
 
template<typename P >
void _common_print (P &printer, BBN_container const &value, const std::string &label, const int vID, const unsigned int mpirank, const unsigned long pointID)
 BBN observables print overload. More...
 
template<class T >
H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 H5T_NATIVE_UINT32 H5T_NATIVE_UINT64 constexpr int h5v2_type ()
 
template<>
constexpr int h5v2_type< int > ()
 
template<>
constexpr int h5v2_type< unsigned int > ()
 
template<>
constexpr int h5v2_type< long > ()
 
template<>
constexpr int h5v2_type< unsigned long > ()
 
template<>
constexpr int h5v2_type< long long > ()
 
template<>
constexpr int h5v2_type< unsigned long long > ()
 
template<>
constexpr int h5v2_type< float > ()
 
template<>
constexpr int h5v2_type< double > ()
 
const int h5v2_bufname (10)
 MPI tags for HDF5 printer v2. More...
 
const int h5v2_bufdata_points (11)
 
const int h5v2_bufdata_ranks (12)
 
const int h5v2_bufdata_valid (13)
 
const int h5v2_bufdata_type (14)
 
const int h5v2_bufdata_values (15)
 
const int h5v2_BLOCK (30)
 
const int h5v2_BEGIN (31)
 
template<class T >
std::set< T > set_diff (const std::set< T > &set1, const std::set< T > &set2)
 
std::size_t pairfunc (const std::size_t i, const std::size_t j)
 
int col_name_callback (void *colmap_in, int, char **data, char **)
 
template<typename T >
std::string cpp2sql ()
 
template<>
std::string cpp2sql< long long int > ()
 
template<>
std::string cpp2sql< double > ()
 
template<>
std::string cpp2sql< std::string > ()
 
std::map< unsigned int, std::string > define_typecodes ()
 
std::map< std::string, std::string, Utils::ci_lessfill_SQLtype_to_basic ()
 
bool SQLite_equaltypes (const std::string &type1, const std::string &type2)
 
template<typename Iter >
Iter next_el (Iter iter)
 
template<typename Iter , typename Cont >
std::string comma_unless_last (Iter it, const Cont &c)
 
template<>
std::string SQLiteReader::get_sql_col< std::string > (const std::string &)
 
 BOOST_PP_SEQ_FOR_EACH_I (GETTYPEID, _, PRINTABLE_TYPES) void printAllTypeIDs(void)
 For debugging; print to stdout all the typeIDs for all types. More...
 
std::unordered_map< std::string, long long int > & get_param_id_map ()
 
void open_output_file (std::ofstream &output, std::string filename, std::ios_base::openmode mode)
 Open file stream with error checking. More...
 
uint safe_col_lookup (const std::string &key, const std::map< std::string, uint > &colmap, std::string fname)
 Helper function for map lookup. More...
 
void check_for_error_messages ()
 
 BOOST_PP_SEQ_FOR_EACH_I (externGETTYPEID, _, PRINTABLE_TYPES) hid_t openfile_read(std
 
std::vector< std::string > lsGroup_process (hid_t location_id)
 
const std::map< unsigned int, std::string > typecode2sql (define_typecodes())
 
const std::map< std::string, std::string, Utils::ci_lessSQLtype_to_basic (fill_SQLtype_to_basic())
 
bool operator< (const VBIDpair &l, const VBIDpair &r)
 
bool operator== (const VBIDpair &l, const VBIDpair &r)
 
bool operator!= (const VBIDpair &l, const VBIDpair &r)
 
bool operator< (const VBIDtrip &l, const VBIDtrip &r)
 
bool operator== (const VBIDtrip &l, const VBIDtrip &r)
 
bool operator!= (const VBIDtrip &l, const VBIDtrip &r)
 
EXPORT_SYMBOLS bool operator< (const PPIDpair &l, const PPIDpair &r)
 
EXPORT_SYMBOLS bool operator== (const PPIDpair &l, const PPIDpair &r)
 
EXPORT_SYMBOLS bool operator!= (const PPIDpair &l, const PPIDpair &r)
 
void define_mpiHDF5bufferchunk ()
 
EXPORT_SYMBOLS errorprinter_error ()
 Printer errors. More...
 
EXPORT_SYMBOLS warningprinter_warning ()
 Printer warnings. More...
 
std::ostream & operator<< (std::ostream &stream, const PPIDpair &ppid)
 Stream operator overloads. More...
 
void printAllH5Types (void)
 DEBUG: print to stdout all HDF5 type IDs. More...
 
 SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED (int8_t, H5T_NATIVE_INT8) SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED(uint8_t
 Typedef'd types; enabled only where they differ from the true types. More...
 
H5T_NATIVE_UINT8 SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED (int16_t, H5T_NATIVE_INT16) SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED(uint16_t
 
H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED (int32_t, H5T_NATIVE_INT32) SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED(uint32_t
 
H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 H5T_NATIVE_UINT32 SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED (int64_t, H5T_NATIVE_INT64) SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED(uint64_t
 
 ADD_ASCII_SIMPLE_PRINTS (SCANNER_SIMPLE_TYPES) ADD_ASCII_VECTOR_PRINTS(SCANNER_VECTOR_TYPES) void asciiPrinter
 
 USE_COMMON_PRINT_OVERLOAD (asciiPrinter, ModelParameters) USE_COMMON_PRINT_OVERLOAD(asciiPrinter
 
triplet< doubleUSE_COMMON_PRINT_OVERLOAD (asciiPrinter, DM_nucleon_couplings) USE_COMMON_PRINT_OVERLOAD(asciiPrinter
 
triplet< double > DM_nucleon_couplings_fermionic_HP USE_COMMON_PRINT_OVERLOAD (asciiPrinter, Flav_KstarMuMu_obs) USE_COMMON_PRINT_OVERLOAD(asciiPrinter
 
 USE_COMMON_PRINT_OVERLOAD (HDF5Printer, ModelParameters) USE_COMMON_PRINT_OVERLOAD(HDF5Printer
 
triplet< doubleUSE_COMMON_PRINT_OVERLOAD (HDF5Printer, DM_nucleon_couplings) USE_COMMON_PRINT_OVERLOAD(HDF5Printer
 
triplet< double > DM_nucleon_couplings_fermionic_HP USE_COMMON_PRINT_OVERLOAD (HDF5Printer, Flav_KstarMuMu_obs) USE_COMMON_PRINT_OVERLOAD(HDF5Printer
 
 USE_COMMON_PRINT_OVERLOAD (HDF5Printer2, std::vector< double >) USE_COMMON_PRINT_OVERLOAD(HDF5Printer2
 
map_str_dbl USE_COMMON_PRINT_OVERLOAD (HDF5Printer2, map_intpair_dbl) USE_COMMON_PRINT_OVERLOAD(HDF5Printer2
 
map_str_dbl ModelParameters USE_COMMON_PRINT_OVERLOAD (HDF5Printer2, triplet< double >) USE_COMMON_PRINT_OVERLOAD(HDF5Printer2
 
map_str_dbl ModelParameters DM_nucleon_couplings USE_COMMON_PRINT_OVERLOAD (HDF5Printer2, DM_nucleon_couplings_fermionic_HP) USE_COMMON_PRINT_OVERLOAD(HDF5Printer2
 

Variables

 gambit_registry
 Maps in which to keep factory functions for the printers (printer_creators) and readers (reader_creators) More...
 
reg_elem< create_printer_function > printer_creators
 
reg_elem< create_reader_functionreader_creators
 
const std::map< unsigned int, std::string > typecode2sql
 
const std::map< std::string, std::string, Utils::ci_lessSQLtype_to_basic
 
const int FIRST_EMPTY_TAG = FINAL_SYNC+1
 
EXPORT_SYMBOLS const PPIDpair nullpoint = PPIDpair()
 Define 'nullpoint' const. More...
 
typedef std::map< VBIDpair, VertexBufferBase * > BaseBufferMap
 Helpful typedefs. More...
 
template<class T , class U >
void error_if_key_exists (const std::map< T, U > &m, const T &key, const std::string &tag)
 Helper function to check if a VertexBuffer key already exists in a map. More...
 
 DEFINE_BUFFMAN_GETTER (int) DEFINE_BUFFMAN_GETTER(uint) DEFINE_BUFFMAN_GETTER(long) DEFINE_BUFFMAN_GETTER(ulong) DEFINE_BUFFMAN_GETTER(longlong) DEFINE_BUFFMAN_GETTER(ulonglong) DEFINE_BUFFMAN_GETTER(float) DEFINE_BUFFMAN_GETTER(double) template< class BuffType > void H5P_LocalBufferManager< BuffType >
 Templated H5P_LocalBufferManager member functions. More...
 

Detailed Description

Forward declaration of Printers::BasePrinter class for use in print functions.

Forward declaration.

Typedef Documentation

◆ BaseBufferMap

Helpful typedefs.

Type of the global buffer map

Definition at line 70 of file hdf5printer.hpp.

◆ Buffer

typedef std::map<std::pair<int,int>,Record> Gambit::Printers::Buffer

Definition at line 68 of file asciiprinter.hpp.

◆ create_reader_function

typedef BaseReader* Gambit::Printers::create_reader_function(const Options &)

Definition at line 239 of file baseprinter.hpp.

◆ LineBuf

typedef std::map<int, std::vector<double> > Gambit::Printers::LineBuf

Definition at line 51 of file asciiprinter.hpp.

◆ llint

typedef long long int Gambit::Printers::llint

Definition at line 51 of file sqlitebase.hpp.

◆ longlong

typedef long long Gambit::Printers::longlong

Definition at line 61 of file basebaseprinter.hpp.

◆ sql_callback_fptr

typedef int Gambit::Printers::sql_callback_fptr(void *, int, char **, char **)

Definition at line 45 of file sqlitebase.hpp.

◆ str

typedef std::string Gambit::Printers::str

Definition at line 52 of file sqlitebase.hpp.

◆ uint

typedef unsigned int Gambit::Printers::uint

Definition at line 59 of file basebaseprinter.hpp.

◆ ulong

typedef unsigned long Gambit::Printers::ulong

Definition at line 60 of file basebaseprinter.hpp.

◆ ulonglong

typedef unsigned long long Gambit::Printers::ulonglong

Definition at line 62 of file basebaseprinter.hpp.

◆ ushort

typedef unsigned short int Gambit::Printers::ushort

PRINT FUNCTIONS Need to define one of these for every type we want to print!

Definition at line 31 of file print_overloads.cpp.

Enumeration Type Documentation

◆ Tags

Reserved tags for MPI messages TAG_REQ - for messages registering/requesting a new tags INIT_PASS - for messages registering completion of initialisation PPFILES_PASS - for messages registering completion of preprocessing of existing files (combination/deletion) FINAL_PASS - for messages registering passing of checkpoint during finalise PPID_SEND - for messages transferring point ID information N_BUFFERS_SENT - for messages counting the number of buffer transfer messages being sent in one 'package' RA_BUFFERS_SENT - Contains no data, just indicates that RA buffer messages from some process are waiting to send.

FINAL_SYNC - Contains no data, used to trigger final buffer sends and receives.

Enumerator
TAG_REQ 
INIT_PASS 
PPFILES_PASS 
FINAL_PASS 
PPID_SEND 
N_BUFFERS_SENT 
RA_BUFFERS_SENT 
FINAL_SYNC 

Definition at line 35 of file VertexBuffer_mpitags.hpp.

Function Documentation

◆ _common_print() [1/10]

template<typename P , typename T >
void Gambit::Printers::_common_print ( P &  ,
T const &  ,
const std::string &  ,
const int  ,
const unsigned  int,
const unsigned  long 
)

Common print overload template.

◆ _common_print() [2/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
std::vector< double > const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

Vector-of-doubles print overload.

Definition at line 44 of file common_print_overloads.hpp.

45  {
46  for(unsigned int i=0;i<value.size();i++)
47  {
48  std::stringstream ss;
49  ss<<label<<"["<<i<<"]";
50  printer._print(value[i],ss.str(),vID,mpirank,pointID);
51  }
52  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [3/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
const map_str_dbl map,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

String-to-double map print overload.

Definition at line 56 of file common_print_overloads.hpp.

57  {
58  for (std::map<std::string, double>::const_iterator
59  it = map.begin(); it != map.end(); it++)
60  {
61  std::stringstream ss;
62  ss<<label<<"::"<<it->first;
63  printer._print(it->second,ss.str(),vID,mpirank,pointID);
64  }
65  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [4/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
map_intpair_dbl const &  map,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

Integer pair-to-double map print overload.

Definition at line 69 of file common_print_overloads.hpp.

70  {
71  for (std::map<std::pair<int,int>, double>::const_iterator it = map.begin(); it != map.end(); it++)
72  {
73  std::stringstream ss;
74  ss<<label<<"::"<<it->first;
75  printer._print(it->second,ss.str(),vID,mpirank,pointID);
76  }
77  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [5/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
ModelParameters const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

ModelParameters print overload.

Definition at line 81 of file common_print_overloads.hpp.

References Gambit::ModelParameters::getValues().

82  {
83  std::map<std::string, double> parameter_map = value.getValues();
84  printer._print(parameter_map, label, vID, mpirank, pointID);
85  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.
Here is the call graph for this function:

◆ _common_print() [6/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
triplet< double > const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

Triplet print overload.

Definition at line 89 of file common_print_overloads.hpp.

References Gambit::triplet< TYPE >::central, Gambit::triplet< TYPE >::lower, and Gambit::triplet< TYPE >::upper.

90  {
91  std::map<std::string, double> m;
92  m["central"] = value.central;
93  m["lower"] = value.lower;
94  m["upper"] = value.upper;
95  printer._print(m, label, vID, mpirank, pointID);
96  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [7/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
DM_nucleon_couplings const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

DM-nucleon coupling print overload.

Definition at line 102 of file common_print_overloads.hpp.

103  {
104  std::map<std::string, double> m;
105  m["Gp_SI"] = value.gps;
106  m["Gn_SI"] = value.gns;
107  m["Gp_SD"] = value.gpa;
108  m["Gn_SD"] = value.gna;
109  printer._print(m, label, vID, mpirank, pointID);
110  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [8/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
DM_nucleon_couplings_fermionic_HP const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

DM-nucleon coupling print overload (For the fermionic HP)

Definition at line 114 of file common_print_overloads.hpp.

115  {
116  std::map<std::string, double> m;
117  m["Gp_SI"] = value.gps;
118  m["Gn_SI"] = value.gns;
119  m["Gp_q2"] = value.gp_q2;
120  m["Gn_q2"] = value.gn_q2;
121  printer._print(m, label, vID, mpirank, pointID);
122  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [9/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
Flav_KstarMuMu_obs const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

K*->mumu angular observables print overload.

Definition at line 126 of file common_print_overloads.hpp.

127  {
128  std::map<std::string, double> m;
129  std::ostringstream bins;
130  bins << value.q2_min << "_" << value.q2_max;
131  m["BR_"+bins.str()] = value.BR;
132  m["AFB_"+bins.str()] = value.AFB;
133  m["FL_"+bins.str()] = value.FL;
134  m["S3_"+bins.str()] = value.S3;
135  m["S4_"+bins.str()] = value.S4;
136  m["S5_"+bins.str()] = value.S5;
137  m["S7_"+bins.str()] = value.S7;
138  m["S8_"+bins.str()] = value.S8;
139  m["S9_"+bins.str()] = value.S9;
140  printer._print(m, label, vID, mpirank, pointID);
141  }
Printers::BaseBasePrinter printer
Type of the printer objects.
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ _common_print() [10/10]

template<typename P >
void Gambit::Printers::_common_print ( P &  printer,
BBN_container const &  value,
const std::string &  label,
const int  vID,
const unsigned int  mpirank,
const unsigned long  pointID 
)

BBN observables print overload.

Definition at line 145 of file common_print_overloads.hpp.

References combine_hdf5::index.

146  {
147  std::map<std::string, double> m;
148  for (const str& i : value.get_active_isotopes())
149  {
150  int index = value.get_abund_map().at(i);
151  m[i] = value.get_BBN_abund(index);
152  m[i+"::1sigma_err"] = sqrt(value.get_BBN_covmat(index, index));
153  }
154  printer._print(m, label, vID, mpirank, pointID);
155  }
Printers::BaseBasePrinter printer
Type of the printer objects.
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
void _print(T const &, const std::string &label, const int vertexID, const uint, const ulong)
Default _print function.

◆ ADD_ASCII_SIMPLE_PRINTS()

Gambit::Printers::ADD_ASCII_SIMPLE_PRINTS ( SCANNER_SIMPLE_TYPES  )

Definition at line 85 of file print_overloads.cpp.

References Gambit::Printers::asciiPrinter::addtobuffer(), DM_nucleon_couplings, and USE_COMMON_PRINT_OVERLOAD().

89  {
90  std::vector<std::string> names;
91  std::vector<double> vdvalue;
92  names.reserve(value.size());
93  vdvalue.reserve(value.size());
94  for (map_str_dbl::const_iterator it = value.begin(); it != value.end(); it++)
95  {
96  std::stringstream ss;
97  ss<<label<<"::"<<it->first;
98  names.push_back( ss.str() );
99  vdvalue.push_back( it->second );
100  }
101  addtobuffer(vdvalue,names,IDcode,thread,pointID);
102  }
Here is the call graph for this function:

◆ auto_increment()

bool & Gambit::Printers::auto_increment ( )

Global flag to indicate if auto-incrementing of the PointID by the likelihood container is allowed.

Definition at line 20 of file printer_id_tools.cpp.

Referenced by Gambit::Scanner::Function_Base< ret(args...)>::operator()(), and Gambit::PostProcessor::PPDriver::run_main_loop().

21  {
22  static bool ai = true;
23  return ai;
24  }
Here is the caller graph for this function:

◆ BOOST_PP_SEQ_FOR_EACH_I() [1/2]

Gambit::Printers::BOOST_PP_SEQ_FOR_EACH_I ( externGETTYPEID  ,
,
PRINTABLE_TYPES   
)

Definition at line 33 of file hdf5reader.cpp.

References Gambit::Printers::HDF5::hid_t, LOCAL_INFO, Gambit::Printers::HDF5::openFile(), and printer_error().

37  {
38  hid_t file_id = HDF5::openFile(file);
39  if(file_id<0)
40  {
41  std::ostringstream errmsg;
42  errmsg << "Error opening HDF5 file '"<<file<<"' for reading! See HDF5 error (stderr) for further details.";
43  printer_error().raise(LOCAL_INFO, errmsg.str());
44  }
45  return file_id;
46  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
hid_t openFile(const std::string &fname, bool overwrite, bool &oldfile, const char access_type='r')
File and group manipulation.
Definition: hdf5tools.cpp:182
Here is the call graph for this function:

◆ BOOST_PP_SEQ_FOR_EACH_I() [2/2]

Gambit::Printers::BOOST_PP_SEQ_FOR_EACH_I ( GETTYPEID  ,
,
PRINTABLE_TYPES   
)

For debugging; print to stdout all the typeIDs for all types.

Definition at line 36 of file baseprinter.cpp.

References PRINTABLE_TYPES, and PRINTTYPEID.

41  {
42  std::cout << "Types known to getTypeID<T>() function:" << std::endl;
43  #define PRINTTYPEID(r,data,elem) \
44  std::cout << " Type: " << STRINGIFY(elem) << ", TypeID: " << getTypeID<elem>() << std::endl;
45  BOOST_PP_SEQ_FOR_EACH(PRINTTYPEID, _, PRINTABLE_TYPES)
46  #undef PRINTTYPEID
47  }
#define PRINTABLE_TYPES
#define PRINTTYPEID(r, data, elem)

◆ check_for_error_messages()

void Gambit::Printers::check_for_error_messages ( )

Definition at line 160 of file hdf5printer.cpp.

References Gambit::SignalData::check_if_shutdown_begun(), and Gambit::signaldata().

161  {
162  signaldata().check_if_shutdown_begun(); // Will throw a shutdown exception if an emergency shutdown command is received via MPI
163  }
EXPORT_SYMBOLS bool check_if_shutdown_begun()
Check for signals that early shutdown is required If an MPI message telling us to perform an emergenc...
EXPORT_SYMBOLS SignalData & signaldata()
Retrieve global instance of signal handler options struct.
Here is the call graph for this function:

◆ col_name_callback()

int Gambit::Printers::col_name_callback ( void colmap_in,
int  ,
char **  data,
char **   
)

Definition at line 43 of file sqlitebase.cpp.

Referenced by Gambit::Printers::SQLitePrinter::ensure_column_exists(), and Gambit::Printers::SQLiteBase::get_column_info().

44  {
45  typedef std::map<std::string, std::string, Utils::ci_less> mymaptype;
46  mymaptype *colmap = static_cast<mymaptype*>(colmap_in);
47 
48  // We know that the column name is the second column of the results set, and the
49  // type is the third column
50  std::string column_name(data[1]);
51  std::string column_type(data[2]);
52 
53  //std::cout<<"Reading existing columns: name: "<<column_name<<", type: "<<column_type<<std::endl;
54 
55  // Add to map
56  (*colmap)[column_name] = column_type;
57 
58  return 0;
59  }
greatScanData data
Definition: great.cpp:38
Here is the caller graph for this function:

◆ comma_unless_last()

template<typename Iter , typename Cont >
std::string Gambit::Printers::comma_unless_last ( Iter  it,
const Cont &  c 
)

Definition at line 82 of file sqlitebase.hpp.

References next_el().

Referenced by Gambit::Printers::SQLitePrinter::dump_buffer_as_UPDATE(), Gambit::Printers::SQLiteReader::reset(), Gambit::Printers::SQLitePrinter::reset(), and Gambit::Printers::SQLitePrinter::turn_buffer_into_insert().

83  {
84  std::string out("");
85  if((it == c.end()) || (next_el(it) == c.end()))
86  { /* this is the last element or end(), do nothing */ }
87  else
88  { out = ","; }
89  return out;
90  }
Iter next_el(Iter iter)
Definition: sqlitebase.hpp:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpp2sql()

template<typename T >
std::string Gambit::Printers::cpp2sql ( )

◆ cpp2sql< double >()

template<>
std::string Gambit::Printers::cpp2sql< double > ( )

Definition at line 63 of file sqlitebase.cpp.

63 {return "REAL";}

◆ cpp2sql< long long int >()

template<>
std::string Gambit::Printers::cpp2sql< long long int > ( )

Definition at line 62 of file sqlitebase.cpp.

62 {return "INTEGER";}

◆ cpp2sql< std::string >()

template<>
std::string Gambit::Printers::cpp2sql< std::string > ( )

Definition at line 64 of file sqlitebase.cpp.

64 {return "TEXT";}

◆ DEFINE_BUFFMAN_GETTER()

Gambit::Printers::DEFINE_BUFFMAN_GETTER ( int  )

Templated H5P_LocalBufferManager member functions.

Definition at line 437 of file hdf5printer.hpp.

References LOCAL_INFO, Gambit::Printers::H5P_LocalBufferManager< BuffType >::printer, printer_error(), Gambit::Printers::H5P_LocalBufferManager< BuffType >::ready(), and Gambit::Printers::H5P_LocalBufferManager< BuffType >::synchronised.

451  {
452  /* Set global behaviour flag */
453  synchronised = sync;
454 
455  /* Attempt to attach to printer */
456  if(p==NULL)
457  {
458  std::ostringstream errmsg;
459  errmsg << "Error! Tried to initialise a H5P_LocalBufferManager with a null pointer! Need an actual HDF5Printer object in order to work. This is a bug in the HDF5Printer class, please report it.";
460  printer_error().raise(LOCAL_INFO, errmsg.str());
461  }
462  if(not ready()) {
463  printer = p;
464  } else {
465  std::ostringstream errmsg;
466  errmsg << "Error! Tried to initialise a H5P_LocalBufferManager twice! This is a bug in the HDF5Printer class, please report it.";
467  printer_error().raise(LOCAL_INFO, errmsg.str());
468  }
469  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Printers::BaseBasePrinter printer
Type of the printer objects.
Here is the call graph for this function:

◆ define_mpiHDF5bufferchunk()

void Gambit::Printers::define_mpiHDF5bufferchunk ( )

Referenced by Gambit::Printers::HDF5Printer2::HDF5Printer2(), and operator!=().

Here is the caller graph for this function:

◆ define_typecodes()

std::map< unsigned int, std::string > Gambit::Printers::define_typecodes ( )

Definition at line 69 of file sqlitebase.cpp.

References typecode2sql.

70  {
71  std::map<unsigned int,std::string> out;
72  out[1] = "INTEGER";
73  out[2] = "FLOAT";
74  out[3] = "TEXT";
75  out[4] = "BLOB";
76  out[5] = "NULL";
77  return out;
78  }

◆ error_if_key_exists()

template<class T , class U >
void Gambit::Printers::error_if_key_exists ( const std::map< T, U > &  m,
const T &  key,
const std::string &  tag 
)

Helper function to check if a VertexBuffer key already exists in a map.

Definition at line 74 of file hdf5printer.hpp.

References LOCAL_INFO, and printer_error().

Referenced by Gambit::Printers::H5P_LocalReadBufferManager< uint >::get_buffer(), Gambit::Printers::H5P_LocalBufferManager< BT(int)>::get_buffer(), and Gambit::Printers::HDF5Printer::insert_buffer().

75  {
76  typename std::map<T,U>::const_iterator it = m.find(key);
77  if ( it == m.end() ) {
78  return;
79  }
80  else {
81  std::ostringstream errmsg;
82  errmsg << "Error! Supplied key for a VertexBuffer already exists in map (tag="<<tag<<")! This is a bug in the HDF5Printer (or Reader) class, please report it.";
83  printer_error().raise(LOCAL_INFO, errmsg.str());
84  }
85  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_SQLtype_to_basic()

std::map< std::string, std::string, Utils::ci_less > Gambit::Printers::fill_SQLtype_to_basic ( )

Definition at line 83 of file sqlitebase.cpp.

References SQLtype_to_basic.

84  {
85  std::map<std::string,std::string,Utils::ci_less> out;
86 
87  out["INT"] = "INTEGER";
88  out["INTEGER"] = "INTEGER";
89  out["TINYINT"] = "INTEGER";
90  out["SMALLINT"] = "INTEGER";
91  out["MEDIUMINT"] = "INTEGER";
92  out["BIGINT"] = "INTEGER";
93  out["UNSIGNED BIG INT"] = "INTEGER";
94  out["INT2"] = "INTEGER";
95  out["INT8"] = "INTEGER";
96 
97  out["CHARACTER(20)"] = "TEXT";
98  out["VARCHAR(255)"] = "TEXT";
99  out["VARYING CHARACTER(255)"] = "TEXT";
100  out["NCHAR(55)"] = "TEXT";
101  out["NATIVE CHARACTER(70)"] = "TEXT";
102  out["NVARCHAR(100)"] = "TEXT";
103  out["CLOB"] = "TEXT";
104  out["TEXT"] = "TEXT";
105 
106  out["BLOB"] = "NONE";
107  out["NONE"] = "NONE";
108 
109  out["DOUBLE"] = "REAL";
110  out["DOUBLE PRECISION"] = "REAL";
111  out["FLOAT"] = "REAL";
112  out["REAL"] = "REAL";
113 
114  out["DECIMAL(10,5)"] = "NUMERIC";
115  out["BOOLEAN"] = "NUMERIC";
116  out["DATE"] = "NUMERIC";
117  out["DATETIME"] = "NUMERIC";
118  out["NUMERIC"] = "NUMERIC";
119 
120  return out;
121  }

◆ get_all_params()

std::vector< std::string > Gambit::Printers::get_all_params ( )

Get names of all parameters known to printer system (vector index corresponds to ID number)

Get names of all parameters known to printer system (vector index corresponds to ID number) Assumes IDs were assigned starting at zero and incrementing upwards! This should be what is happening, but just keep note of this in case of future changes!

Definition at line 37 of file printer_id_tools.cpp.

References get_param_id_map().

38  {
39  std::vector<std::string> out(get_param_id_map().size());
40  std::cout <<"size? " << out.size() << std::endl;
41  for( auto it = get_param_id_map().begin(); it!=get_param_id_map().end(); ++it)
42  {
43  std::cout << it->second << ", " << it->first << std::endl;
44  out.at(it->second) = it->first;
45  }
46  return out;
47  }
std::unordered_map< std::string, long long int > & get_param_id_map()
Here is the call graph for this function:

◆ get_aux_param_id() [1/2]

int Gambit::Printers::get_aux_param_id ( const std::string &  name)

Returns unique negative parameter id; just a thin wrapper for get_param_id.

Definition at line 96 of file printer_id_tools.cpp.

Referenced by Gambit::Scanner::assign_aux_numbers().

97  {
98  bool is_new; // Dummy for optional return argument
99  return get_aux_param_id(name, is_new);
100  }
EXPORT_SYMBOLS int get_aux_param_id(const std::string &)
Returns unique negative parameter id; just a thin wrapper for get_param_id.
Here is the caller graph for this function:

◆ get_aux_param_id() [2/2]

int Gambit::Printers::get_aux_param_id ( const std::string &  name,
bool &  is_new 
)

Extra argument returns true if new ID was assigned.

Definition at line 91 of file printer_id_tools.cpp.

References get_param_id().

92  {
93  return get_param_id(name,is_new);
94  }
EXPORT_SYMBOLS int get_param_id(const std::string &name, bool &is_new)
Consolidated &#39;get id&#39; function, for both main and aux.
Here is the call graph for this function:

◆ get_main_param_id() [1/2]

int Gambit::Printers::get_main_param_id ( const std::string &  name)

Returns unique positive parameter id; just a thin wrapper for get_param_id.

Definition at line 85 of file printer_id_tools.cpp.

86  {
87  bool is_new; // Dummy for optional return argument
88  return get_main_param_id(name, is_new);
89  }
EXPORT_SYMBOLS int get_main_param_id(const std::string &)
Returns unique positive parameter id; just a thin wrapper for get_param_id.

◆ get_main_param_id() [2/2]

int Gambit::Printers::get_main_param_id ( const std::string &  name,
bool &  is_new 
)

Extra argument returns true if new ID was assigned.

Definition at line 80 of file printer_id_tools.cpp.

References get_param_id().

81  {
82  return get_param_id(name,is_new);
83  }
EXPORT_SYMBOLS int get_param_id(const std::string &name, bool &is_new)
Consolidated &#39;get id&#39; function, for both main and aux.
Here is the call graph for this function:

◆ get_param_id() [1/2]

int Gambit::Printers::get_param_id ( const std::string &  name,
bool &  is_new 
)

Consolidated 'get id' function, for both main and aux.

bjf> I think that there is actually no need or reason to maintain two separate lists of IDs.

I am changing this to now use only one list, although both old ways of accessing the IDs (main vs aux) will still exist for backwards compatibility.

Definition at line 54 of file printer_id_tools.cpp.

References Gambit::EOM, get_param_id_map(), Gambit::LogTags::info, Gambit::logger(), generate_raster_scan_settings::N, and Gambit::LogTags::printers.

Referenced by Gambit::Printers::HDF5Reader::_retrieve_template(), get_aux_param_id(), get_main_param_id(), get_param_id(), and Gambit::DRes::DependencyResolver::initialisePrinter().

55  {
56  static long long int N = 0; // Next unused index
57 
58  auto it = get_param_id_map().find(name);
59  if (it != get_param_id_map().end())
60  {
61  is_new = false;
62  return it->second;
63  }
64  else
65  {
66  get_param_id_map()[name] = N;
67  logger() << LogTags::printers << LogTags::info << "Assigned printer ID '"<<N<<"' to output quantity with label '"<<name<<"'" << EOM;
68  is_new = true;
69  N++;
70  return N-1;
71  }
72  }
std::unordered_map< std::string, long long int > & get_param_id_map()
const Logging::endofmessage EOM
Explicit const instance of the end of message struct in Gambit namespace.
Definition: logger.hpp:100
EXPORT_SYMBOLS Logging::LogMaster & logger()
Function to retrieve a reference to the Gambit global log object.
Definition: logger.cpp:95
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_param_id() [2/2]

int Gambit::Printers::get_param_id ( const std::string &  name)

Definition at line 74 of file printer_id_tools.cpp.

References get_param_id().

75  {
76  bool is_new; // Dummy for optional return argument
77  return get_param_id(name, is_new);
78  }
EXPORT_SYMBOLS int get_param_id(const std::string &name, bool &is_new)
Consolidated &#39;get id&#39; function, for both main and aux.
Here is the call graph for this function:

◆ get_param_id_map()

std::unordered_map<std::string, long long int>& Gambit::Printers::get_param_id_map ( )

Definition at line 28 of file printer_id_tools.cpp.

Referenced by get_all_params(), and get_param_id().

29  {
30  static std::unordered_map<std::string, long long int> map;
31  return map;
32  }
Here is the caller graph for this function:

◆ get_point_id()

unsigned long long int & Gambit::Printers::get_point_id ( )

◆ getTypeID()

template<class T >
template std::size_t Gambit::Printers::getTypeID< double > ( void  )

Helper template functions to retrieve type IDs for a type.

ID is just a unique integer for each printable type

Author
Ben Farmer (ben.f.nosp@m.arme.nosp@m.r@gma.nosp@m.il.c.nosp@m.om)
Date
2016 Mar, 2017 Jan, Feb, Mar

Definition at line 67 of file basebaseprinter.hpp.

References Gambit::LogTags::err, LOCAL_INFO, and printer_error().

68  {
69  std::ostringstream err;
70  err << "getTypeID failed! No typeID known for requested type! (with compiler name: "<<typeid(T).name()<<")";
71  printer_error().raise(LOCAL_INFO,err.str());
72  return 0;
73  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:

◆ h5v2_BEGIN()

const int Gambit::Printers::h5v2_BEGIN ( 31  )

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk().

Here is the caller graph for this function:

◆ h5v2_BLOCK()

const int Gambit::Printers::h5v2_BLOCK ( 30  )

◆ h5v2_bufdata_points()

const int Gambit::Printers::h5v2_bufdata_points ( 11  )

Referenced by Gambit::Printers::HDF5Buffer< uint >::N_items_in_buffer().

Here is the caller graph for this function:

◆ h5v2_bufdata_ranks()

const int Gambit::Printers::h5v2_bufdata_ranks ( 12  )

Referenced by Gambit::Printers::HDF5Buffer< uint >::N_items_in_buffer().

Here is the caller graph for this function:

◆ h5v2_bufdata_type()

const int Gambit::Printers::h5v2_bufdata_type ( 14  )

◆ h5v2_bufdata_valid()

const int Gambit::Printers::h5v2_bufdata_valid ( 13  )

Referenced by Gambit::Printers::HDF5Buffer< uint >::N_items_in_buffer().

Here is the caller graph for this function:

◆ h5v2_bufdata_values()

const int Gambit::Printers::h5v2_bufdata_values ( 15  )

◆ h5v2_bufname()

const int Gambit::Printers::h5v2_bufname ( 10  )

MPI tags for HDF5 printer v2.

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), and Gambit::Printers::HDF5Buffer< uint >::N_items_in_buffer().

Here is the caller graph for this function:

◆ h5v2_type()

template<class T >
H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 H5T_NATIVE_UINT32 H5T_NATIVE_UINT64 constexpr int Gambit::Printers::h5v2_type ( )

Definition at line 278 of file hdf5tools.hpp.

278 {return -1;}

◆ h5v2_type< double >()

template<>
constexpr int Gambit::Printers::h5v2_type< double > ( )

Definition at line 286 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), and Gambit::Printers::HDF5::is_float_type().

286 {return 7;}
Here is the caller graph for this function:

◆ h5v2_type< float >()

template<>
constexpr int Gambit::Printers::h5v2_type< float > ( )

Definition at line 285 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), and Gambit::Printers::HDF5::is_float_type().

285 {return 6;}
Here is the caller graph for this function:

◆ h5v2_type< int >()

template<>
constexpr int Gambit::Printers::h5v2_type< int > ( )

Definition at line 279 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), and Gambit::Printers::HDF5::is_float_type().

279 {return 0;}
Here is the caller graph for this function:

◆ h5v2_type< long >()

template<>
constexpr int Gambit::Printers::h5v2_type< long > ( )

Definition at line 281 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), and Gambit::Printers::HDF5::is_float_type().

281 {return 2;}
Here is the caller graph for this function:

◆ h5v2_type< long long >()

template<>
constexpr int Gambit::Printers::h5v2_type< long long > ( )

Definition at line 283 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5::is_float_type().

283 {return 4;}
Here is the caller graph for this function:

◆ h5v2_type< unsigned int >()

template<>
constexpr int Gambit::Printers::h5v2_type< unsigned int > ( )

Definition at line 280 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5::is_float_type().

280 {return 1;}
Here is the caller graph for this function:

◆ h5v2_type< unsigned long >()

template<>
constexpr int Gambit::Printers::h5v2_type< unsigned long > ( )

Definition at line 282 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5::is_float_type().

282 {return 3;}
Here is the caller graph for this function:

◆ h5v2_type< unsigned long long >()

template<>
constexpr int Gambit::Printers::h5v2_type< unsigned long long > ( )

Definition at line 284 of file hdf5tools.hpp.

Referenced by Gambit::Printers::HDF5::is_float_type().

284 {return 5;}
Here is the caller graph for this function:

◆ lsGroup_process()

std::vector<std::string> Gambit::Printers::lsGroup_process ( hid_t  location_id)

Definition at line 49 of file hdf5reader.cpp.

References Gambit::Utils::endsWith(), and Gambit::Printers::HDF5::lsGroup().

50  {
51  std::vector<std::string> ls_out;
52  std::vector<std::string> ls_all = HDF5::lsGroup(location_id);
53  for(std::vector<std::string>::iterator it = ls_all.begin();
54  it != ls_all.end(); ++it)
55  {
56  if(not Utils::endsWith(*it,"_isvalid")) ls_out.push_back(*it);
57  }
58  return ls_out;
59  }
EXPORT_SYMBOLS bool endsWith(const std::string &str, const std::string &suffix)
Checks whether `str&#39; ends with `suffix&#39;.
std::vector< std::string > lsGroup(hid_t group_id)
List object names in a group.
Definition: hdf5tools.cpp:593
Here is the call graph for this function:

◆ next_el()

template<typename Iter >
Iter Gambit::Printers::next_el ( Iter  iter)

Definition at line 74 of file sqlitebase.hpp.

Referenced by comma_unless_last().

75  {
76  return ++iter;
77  }
Here is the caller graph for this function:

◆ open_output_file()

void Gambit::Printers::open_output_file ( std::ofstream &  output,
std::string  filename,
std::ios_base::openmode  mode 
)

Open file stream with error checking.

Definition at line 61 of file asciiprinter.cpp.

Referenced by Gambit::Printers::asciiPrinter::common_constructor(), Gambit::Printers::asciiPrinter::dump_buffer(), and Gambit::Printers::asciiPrinter::reset().

62  {
63  // Pass in reference to externally created ofstream "output"
64  output.open(filename, std::ofstream::out | mode);
65 
66  if( output.fail() | output.bad() )
67  {
68  std::ostringstream ss;
69  ss << "IO error while opening file for writing! Tried to open ofstream to file \""<<filename<<"\", but encountered error bit in the created ostream.";
70  throw std::runtime_error( ss.str() );
71  }
72  }
Here is the caller graph for this function:

◆ operator!=() [1/3]

bool Gambit::Printers::operator!= ( const VBIDpair l,
const VBIDpair r 
)

Definition at line 43 of file new_mpi_datatypes.cpp.

References r.

Referenced by Gambit::Printers::PPIDpair::PPIDpair(), Gambit::Printers::VBIDpair::VBIDpair(), and Gambit::Printers::VBIDtrip::VBIDtrip().

43  {
44  return !( l == r );
45  }
START_MODEL dNur_CMB r
Here is the caller graph for this function:

◆ operator!=() [2/3]

bool Gambit::Printers::operator!= ( const VBIDtrip l,
const VBIDtrip r 
)

Definition at line 53 of file new_mpi_datatypes.cpp.

References r.

53  {
54  return !( l == r );
55  }
START_MODEL dNur_CMB r

◆ operator!=() [3/3]

bool Gambit::Printers::operator!= ( const PPIDpair l,
const PPIDpair r 
)

Definition at line 76 of file new_mpi_datatypes.cpp.

References define_mpiHDF5bufferchunk(), Gambit::Printers::HDF5bufferchunk::NBUFFERS, r, and Gambit::Printers::HDF5bufferchunk::SIZE.

76  {
77  return !( l == r );
78  }
START_MODEL dNur_CMB r
Here is the call graph for this function:

◆ operator<() [1/3]

bool Gambit::Printers::operator< ( const VBIDpair l,
const VBIDpair r 
)

Definition at line 37 of file new_mpi_datatypes.cpp.

References Gambit::Printers::VBIDpair::index, and Gambit::Printers::VBIDpair::vertexID.

Referenced by Gambit::Printers::PPIDpair::PPIDpair(), Gambit::Printers::VBIDpair::VBIDpair(), and Gambit::Printers::VBIDtrip::VBIDtrip().

37  {
38  return (l.vertexID<r.vertexID || (l.vertexID==r.vertexID && l.index<r.index));
39  }
START_MODEL dNur_CMB r
Here is the caller graph for this function:

◆ operator<() [2/3]

bool Gambit::Printers::operator< ( const VBIDtrip l,
const VBIDtrip r 
)

Definition at line 47 of file new_mpi_datatypes.cpp.

References Gambit::Printers::VBIDtrip::first_tag, Gambit::Printers::VBIDtrip::index, and Gambit::Printers::VBIDtrip::vertexID.

47  {
48  return (l.vertexID<r.vertexID || (l.vertexID==r.vertexID && l.index<r.index) || (l.vertexID==r.vertexID && l.index==r.index && l.first_tag<r.first_tag) );
49  }
START_MODEL dNur_CMB r

◆ operator<() [3/3]

bool Gambit::Printers::operator< ( const PPIDpair l,
const PPIDpair r 
)

Definition at line 57 of file new_mpi_datatypes.cpp.

References LOCAL_INFO, Gambit::Printers::PPIDpair::pointID, Gambit::Printers::PPIDpair::rank, Gambit::utils_error(), and Gambit::Printers::PPIDpair::valid.

57  {
58  // Raise error if either l or r flagged as invalid
59  if(l.valid==0)
60  {
61  std::ostringstream errmsg;
62  errmsg << "Error comparing PPIDpairs; the LHS object is flagged as invalid!";
63  utils_error().raise(LOCAL_INFO, errmsg.str());
64  }
65  if(r.valid==0)
66  {
67  std::ostringstream errmsg;
68  errmsg << "Error comparing PPIDpairs; the LHS object is flagged as invalid!";
69  utils_error().raise(LOCAL_INFO, errmsg.str());
70  }
71  return (l.pointID<r.pointID || (l.pointID==r.pointID && l.rank<r.rank));
72  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
START_MODEL dNur_CMB r
Here is the call graph for this function:

◆ operator<<()

std::ostream& Gambit::Printers::operator<< ( std::ostream &  stream,
const PPIDpair ppid 
)

Stream operator overloads.

Definition at line 178 of file new_mpi_datatypes.cpp.

References Gambit::Printers::PPIDpair::pointID, and Gambit::Printers::PPIDpair::rank.

Referenced by Gambit::Printers::PPIDpair::PPIDpair().

179  {
180  stream << "(" << ppid.pointID << ", " << ppid.rank << ")";
181  return stream;
182  }
Here is the caller graph for this function:

◆ operator==() [1/3]

bool Gambit::Printers::operator== ( const VBIDpair l,
const VBIDpair r 
)

Definition at line 40 of file new_mpi_datatypes.cpp.

References Gambit::Printers::VBIDpair::index, and Gambit::Printers::VBIDpair::vertexID.

Referenced by Gambit::Printers::PPIDpair::PPIDpair(), Gambit::Printers::VBIDpair::VBIDpair(), and Gambit::Printers::VBIDtrip::VBIDtrip().

40  {
41  return l.vertexID==r.vertexID && l.index==r.index;
42  }
START_MODEL dNur_CMB r
Here is the caller graph for this function:

◆ operator==() [2/3]

bool Gambit::Printers::operator== ( const VBIDtrip l,
const VBIDtrip r 
)

Definition at line 50 of file new_mpi_datatypes.cpp.

References Gambit::Printers::VBIDtrip::first_tag, Gambit::Printers::VBIDtrip::index, and Gambit::Printers::VBIDtrip::vertexID.

50  {
51  return l.vertexID==r.vertexID && l.index==r.index && l.first_tag==r.first_tag;
52  }
START_MODEL dNur_CMB r

◆ operator==() [3/3]

bool Gambit::Printers::operator== ( const PPIDpair l,
const PPIDpair r 
)

Definition at line 73 of file new_mpi_datatypes.cpp.

References Gambit::Printers::PPIDpair::pointID, Gambit::Printers::PPIDpair::rank, and Gambit::Printers::PPIDpair::valid.

73  {
74  return l.pointID==r.pointID && l.rank==r.rank && l.valid==r.valid;
75  }
START_MODEL dNur_CMB r

◆ pairfunc()

std::size_t Gambit::Printers::pairfunc ( const std::size_t  i,
const std::size_t  j 
)
inline

Definition at line 36 of file sqlitebase.hpp.

Referenced by Gambit::Printers::SQLitePrinter::insert_data().

37  {
38  // The Cantor pairing function should be good enough for this purpose I think
39  // If we exceed the maximum size of size_t then we'll have to use a more space-efficient pairing function
40  return ((i+j)*(i+j+1))/2 + j;
41  }
Here is the caller graph for this function:

◆ parse_label_for_ModelParameters()

bool Gambit::Printers::parse_label_for_ModelParameters ( const std::string &  fulllabel,
const std::string &  modelname,
std::string &  out,
std::string &  labelroot,
bool  case_sensitive 
)

Helper function for the ModelParameters '_retrieve' functions Parses a printer label and checks if it contains a single model parameter.

"out" is a memory location to store the parameter name, if found. "labelroot" is a memory location to store the rest of the label (i.e. minus the parameter name)

Definition at line 81 of file baseprinter.cpp.

References Gambit::Utils::delimiterSplit(), Gambit::Utils::iequals(), and Gambit::Utils::startsWith().

82  {
83  bool result = false;
84  std::istringstream iss(fulllabel);
85  std::string capability;
86  std::string rest;
87  iss >> capability;
88  iss >> rest;
89  if(!iss)
90  {
91  // Weren't two elements to the label, so this can't be a match
92  result = false; // failed to match
93  }
94  else
95  {
96  //capability is "#NormalDist_parameters", for example
97  capability.erase(0,1); // cut off the first character (hash, in all potentially matching cases)
98  if(Utils::startsWith(capability,modelname,case_sensitive))
99  {
100  // Cut off the modelname which matched
101  capability.erase(0,modelname.size());
102  if(Utils::startsWith(capability,"_parameters",case_sensitive))
103  {
104  // Still good so far, check 'rest', should be something like @NormalDist::primary_parameters::mu
105  rest.erase(0,1); // cut off the first character (@, in all potentially matching cases)
106  std::vector<str> split_rest = Utils::delimiterSplit(rest, "::");
107  if(Utils::iequals(split_rest[0],modelname,case_sensitive) and split_rest.size()==3)
108  {
109  // Ok! We have a match!
110  out = split_rest[2];
111  result = true;
112  // Get the rest of the full label
113  labelroot = fulllabel;
114  // Erase the "::parameter_name" part
115  labelroot.erase(fulllabel.size() - out.size() - 2, out.size()+2);
116  } else { result = false; }
117  } else { result = false; }
118  } else { result = false; }
119  }
120  return result;
121  }
EXPORT_SYMBOLS bool startsWith(const std::string &str, const std::string &prefix, bool case_sensitive=true)
Checks whether `str&#39; begins with `prefix&#39;.
EXPORT_SYMBOLS bool iequals(const std::string &a, const std::string &b, bool case_sensitive=false)
Perform a (possibly) case-insensitive string comparison.
EXPORT_SYMBOLS std::vector< str > delimiterSplit(str s, str delim)
Split a string into a vector of strings, using a delimiter, and removing any whitespace around the de...
Here is the call graph for this function:

◆ parse_label_for_spectrum_entry()

bool Gambit::Printers::parse_label_for_spectrum_entry ( const std::string &  fulllabel,
const std::string &  req_capability,
const std::string &  req_module,
const std::string &  req_function,
std::string &  outname,
std::string &  outtag,
std::string &  labelroot,
bool  case_sensitive 
)

Helper function for parsing Spectrum label strings.

Helper function for the Spectrum '_retrieve' functions Parses a printer label and checks if it contains a single Spectrum entry.

"out" is a memory location to store the spectrum entry name, if found. "labelroot" is a memory location to store the rest of the label (i.e. minus the entry name)

Definition at line 129 of file baseprinter.cpp.

References Gambit::Utils::delimiterSplit(), and Gambit::Utils::iequals().

130  {
131  bool result = false;
132  std::istringstream iss(fulllabel);
133  std::string capability;
134  std::string rest;
135  iss >> capability;
136  iss >> rest;
137  iss >> outtag; // Last element is that spectrum 'tag', e.g. dimensionless, Pole_Mixing, etc.
138  if(!iss)
139  {
140  // Weren't three elements to the label, so this can't be a match
141  result = false; // failed to match
142  }
143  else
144  {
145  //capability is "#MSSM_spectrum", for example
146  capability.erase(0,1); // cut off the first character (hash, in all potentially matching cases)
147  if(Utils::iequals(capability,req_capability,case_sensitive))
148  {
149  // Check 'rest', should be something like @SpecBit::get_MSSM_spectrum_as_map::~u_(6,6)
150  rest.erase(0,1); // cut off the first character (@, in all potentially matching cases)
151  std::vector<str> split_rest = Utils::delimiterSplit(rest, "::");
152  if( Utils::iequals(split_rest[0],req_module,case_sensitive)
153  and Utils::iequals(split_rest[1],req_function,case_sensitive)
154  and split_rest.size()==3)
155  {
156  // Ok! We have a match!
157  outname = split_rest[2];
158  result = true;
159  // Get the rest of the full label
160  labelroot = fulllabel;
161  // Erase the "::entryname tag" part
162  std::size_t offset = outname.size() + outtag.size() + 3; // Names plus :: plus space
163  labelroot.erase(fulllabel.size() - offset, offset);
164  } else { result = false; }
165  } else { result = false; }
166  }
167  return result;
168  }
EXPORT_SYMBOLS bool iequals(const std::string &a, const std::string &b, bool case_sensitive=false)
Perform a (possibly) case-insensitive string comparison.
EXPORT_SYMBOLS std::vector< str > delimiterSplit(str s, str delim)
Split a string into a vector of strings, using a delimiter, and removing any whitespace around the de...
Here is the call graph for this function:

◆ printAllH5Types()

void Gambit::Printers::printAllH5Types ( void  )

DEBUG: print to stdout all HDF5 type IDs.

Definition at line 834 of file hdf5tools.cpp.

References H5_OUTPUT_TYPES, and PRINTTYPEID.

835  {
836  std::cout << "Types known to get_hdf5_data_type<T>::type() function:" << std::endl;
837  #define PRINTTYPEID(r,data,elem) \
838  std::cout << " Type: " << STRINGIFY(elem) << ", H5 type code: " << get_hdf5_data_type<elem>::type() << std::endl;
839  BOOST_PP_SEQ_FOR_EACH(PRINTTYPEID, _, H5_OUTPUT_TYPES)
840  #undef PRINTTYPEID
841  }
#define PRINTTYPEID(r, data, elem)
#define H5_OUTPUT_TYPES
Definition: hdf5tools.hpp:244

◆ printAllTypeIDs()

void Gambit::Printers::printAllTypeIDs ( void  )

For debugging; print to stdout all the typeIDs for all types.

◆ printer_error()

error & Gambit::Printers::printer_error ( )

Printer errors.

Definition at line 93 of file standalone_error_handlers.cpp.

References Gambit::LogTags::printers.

Referenced by Gambit::Printers::HDF5::_checkDatasetReadable_helper(), Gambit::Printers::BaseBasePrinter::_print(), Gambit::Printers::BaseBaseReader::_retrieve(), Gambit::Printers::SQLiteReader::_retrieve_template(), Gambit::Printers::HDF5Printer2::add_aux_buffer(), Gambit::Printers::HDF5Printer::add_PPID_to_list(), Gambit::Printers::asciiPrinter::addtobuffer(), Gambit::Printers::asciiReader::advance_to_point(), Gambit::Printers::VertexBufferNumeric1D< T, CHUNKLENGTH >::append(), Gambit::Printers::asciiReader::asciiReader(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::attempt_postponed_RA_write_to_disk(), Gambit::Printers::HDF5Buffer< uint >::block_flush(), BOOST_PP_SEQ_FOR_EACH_I(), Gambit::Printers::BuffTags::BuffTags(), Gambit::Printers::HDF5Printer2::check_consistency(), Gambit::Printers::HDF5Printer::check_for_new_point(), Gambit::Printers::HDF5Printer::check_sync(), Gambit::Printers::SQLiteBase::check_table_exists(), Gambit::Printers::HDF5::checkDatasetReadable(), Gambit::Printers::HDF5::checkFileReadable(), Gambit::Printers::HDF5::checkGroupReadable(), Gambit::Printers::HDF5MasterBuffer::close_and_unlock_file(), Gambit::Printers::HDF5DataSetBase::close_dataset(), Gambit::Printers::DataSetInterfaceBase< uint, 0, CHUNKLENGTH >::closeDataSet(), Gambit::Printers::HDF5::closeFile(), Gambit::Printers::HDF5Printer::combine_output(), Gambit::Printers::HDF5Printer::combine_output_py(), Gambit::Printers::HDF5Printer::common_constructor(), Gambit::Printers::HDF5DataSetBasic::create_dataset(), Gambit::Printers::HDF5DataSet< uint >::create_dataset(), Gambit::Printers::HDF5::createFile(), Gambit::Printers::HDF5::createGroup(), Gambit::Printers::HDF5DataSetBase::dataset_exists(), DEFINE_BUFFMAN_GETTER(), Gambit::Printers::PrinterManager::delete_reader(), Gambit::Printers::PrinterManager::delete_stream(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::dsetdata(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::dsetvalid(), Gambit::Printers::asciiPrinter::dump_buffer(), Gambit::Printers::HDF5Printer::empty_sync_buffers(), Gambit::Printers::SQLitePrinter::ensure_column_exists(), Gambit::Printers::HDF5DataSetBase::ensure_dataset_is_open(), Gambit::Printers::HDF5MasterBuffer::ensure_file_is_open(), Gambit::Printers::HDF5::hdf5_stuff::Enter_Aux_Parameters(), Gambit::Printers::HDF5::Enter_HDF5(), Gambit::Printers::VertexBufferBase::error_if_done(), error_if_key_exists(), Gambit::Printers::HDF5DataSetBase::extend_dset_to(), Gambit::Printers::VertexBufferBase::fast_forward(), Gambit::Printers::HDF5Printer::finalise(), Gambit::Printers::HDF5Printer::find_temporary_files(), Gambit::Printers::HDF5MasterBuffer::flush(), Gambit::Printers::HDF5MasterBuffer::get_all_dset_names_on_disk(), Gambit::Printers::H5P_LocalReadBufferManager< uint >::get_buffer(), Gambit::Printers::H5P_LocalBufferManager< BT(int)>::get_buffer(), Gambit::Printers::HDF5Printer2::get_buffer_length(), Gambit::Printers::DataSetInterfaceScalar< double, CHUNKLENGTH >::get_chunk(), Gambit::Printers::HDF5DataSet< uint >::get_chunk(), Gambit::Printers::SQLiteReader::get_col_i(), Gambit::Printers::asciiReader::get_column_info(), Gambit::Printers::SQLiteBase::get_column_info(), Gambit::Printers::SQLiteReader::get_dataset_length(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::get_dataset_length(), Gambit::Printers::SQLiteBase::get_db(), Gambit::Printers::DataSetInterfaceBase< uint, 0, CHUNKLENGTH >::get_dset_id(), Gambit::Printers::VertexBufferNumeric1D< T, CHUNKLENGTH >::get_entry(), Gambit::Printers::HDF5Printer2::get_filename(), Gambit::Printers::PrinterManager::get_full_reader(), Gambit::Printers::HDF5Printer::get_global_index(), Gambit::Printers::HDF5Printer2::get_HDF5_primary_printer(), Gambit::Printers::HDF5Printer::get_highest_PPID_from_HDF5(), Gambit::Printers::HDF5MasterBuffer::get_highest_PPIDs(), Gambit::Printers::HDF5Reader::get_index_from_PPID(), Gambit::Printers::HDF5Printer::get_location(), Gambit::Printers::HDF5MasterBuffer::get_next_free_position(), Gambit::Printers::HDF5MasterBuffer::get_position_map(), Gambit::get_pp_reader(), Gambit::Printers::HDF5Printer::get_RA_location(), Gambit::Printers::HDF5::get_RA_write_hash(), Gambit::Printers::PrinterManager::get_stream(), Gambit::Printers::SQLiteReader::get_type(), Gambit::Printers::HDF5Reader::get_type(), Gambit::Printers::HDF5::getChunk(), Gambit::Printers::HDF5::getH5DatasetType(), getTypeID(), Gambit::Printers::HDF5::hdf5_stuff::hdf5_stuff(), Gambit::Printers::HDF5Printer2::HDF5Printer2(), Gambit::Printers::HDF5Reader::HDF5Reader(), Gambit::Printers::SQLitePrinter::insert_data(), Gambit::Printers::HDF5::inttype_from_h5type(), Gambit::Printers::HDF5::isDataSet(), Gambit::Printers::HDF5MasterBuffer::lock_and_open_file(), Gambit::Printers::HDF5::lsGroup(), Gambit::Printers::SQLiteReader::move_to_next_point(), Gambit::Printers::VertexBufferBase::MPImode_only(), Gambit::Printers::HDF5Buffer< uint >::N_items_in_buffer(), Gambit::Printers::PrinterManager::new_reader(), Gambit::Printers::asciiReader::next_row(), Gambit::Printers::HDF5DataSetBase::open_dataset(), Gambit::Printers::SQLiteBase::open_db(), Gambit::Printers::HDF5::openDataset(), Gambit::Printers::HDF5::openFile(), Gambit::Printers::HDF5::openGroup(), Gambit::Printers::HDF5Printer::prepare_and_combine_tmp_files(), Gambit::Printers::PrinterManager::PrinterManager(), Gambit::Printers::VertexBufferNumeric1D< T, CHUNKLENGTH >::RA_flush(), Gambit::Printers::VertexBufferNumeric1D< T, CHUNKLENGTH >::RA_write(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::RA_write_to_disk(), Gambit::Printers::HDF5Buffer< uint >::random_flush(), Gambit::Printers::SQLiteBase::require_output_ready(), Gambit::Printers::asciiReader::reset(), Gambit::Printers::SQLiteReader::reset(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::reset(), Gambit::Printers::HDF5Printer::reset(), Gambit::Printers::HDF5Buffer< uint >::reset(), Gambit::Printers::coutPrinter::resume_reader_options(), Gambit::Printers::nonePrinter::resume_reader_options(), Gambit::Printers::asciiPrinter::resume_reader_options(), Gambit::Printers::HDF5Printer2::resume_reader_options(), Gambit::Printers::HDF5Reader::retrieve_and_add_to_SLHAea(), Gambit::Printers::BaseReader::retrieve_and_print(), Gambit::Printers::HDF5::copy_hdf5::run(), Gambit::Printers::HDF5::ra_copy_hdf5::run(), safe_col_lookup(), Gambit::Printers::HDF5MasterBuffer::schedule_print(), Gambit::Printers::DataSetInterfaceScalar< double, CHUNKLENGTH >::select_chunk(), Gambit::Printers::HDF5DataSetBase::select_hyperslab(), Gambit::Printers::HDF5::selectChunk(), Gambit::Printers::HDF5::setup_hdf5_points(), Gambit::Printers::VertexBufferNumeric1D< T, CHUNKLENGTH >::skip_append(), SQLite_equaltypes(), Gambit::Printers::SQLitePrinter::SQLitePrinter(), SQLiteReader::get_sql_col< std::string >(), Gambit::Printers::SQLiteBase::submit_sql(), Gambit::Printers::HDF5Printer::synchronise_buffers(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::synchronise_output_to_position(), Gambit::Printers::HDF5MasterBuffer::untrack_points(), Gambit::Printers::HDF5MasterBuffer::update_buffer_map(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::update_dset_head_pos(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::VertexBufferNumeric1D_HDF5(), Gambit::Printers::HDF5DataSet< uint >::write_buffer(), Gambit::Printers::HDF5DataSet< uint >::write_RA_buffer(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::write_to_disk(), and Gambit::Printers::HDF5DataSetBase::~HDF5DataSetBase().

94  {
95  static error local("A problem has occurred in the printer utilities.","printer_error", printers);
96  return local;
97  }
Here is the caller graph for this function:

◆ printer_warning()

warning & Gambit::Printers::printer_warning ( )

Printer warnings.

Definition at line 100 of file standalone_error_handlers.cpp.

References Gambit::LogTags::printers.

Referenced by Gambit::Printers::HDF5Printer2::check_consistency(), Gambit::Printers::HDF5Printer2::finalise(), Gambit::Printers::HDF5Printer2::HDF5Printer2(), and Gambit::Printers::HDF5MasterBuffer::schedule_print().

101  {
102  static warning local("A problem has occurred in the printer utilities.","printer_warning", printers);
103  return local;
104  }
Here is the caller graph for this function:

◆ safe_col_lookup()

uint Gambit::Printers::safe_col_lookup ( const std::string &  key,
const std::map< std::string, uint > &  colmap,
std::string  fname 
)

Helper function for map lookup.

Definition at line 28 of file asciireader.cpp.

References Gambit::LogTags::err, LOCAL_INFO, and printer_error().

29  {
30  auto it = colmap.find(key);
31  if(it==colmap.end())
32  {
33  std::ostringstream err;
34  err << "Error! asciiReader could not locate the required entry '"<<key<<"' in the info file '"<<fname<<"'. Please check that the supplied filename is a valid 'info' file produced by asciiPrinter in a previous scan." << std::endl;
35  printer_error().raise(LOCAL_INFO,err.str());
36  }
37  return it->second;
38  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:

◆ set_diff()

template<class T >
std::set<T> Gambit::Printers::set_diff ( const std::set< T > &  set1,
const std::set< T > &  set2 
)

Definition at line 101 of file hdf5printer_v2.hpp.

Referenced by Gambit::Printers::HDF5Buffer< uint >::block_flush(), and Gambit::Printers::HDF5MasterBuffer::flush().

102  {
103  std::set<T> result;
104  std::set_difference(set1.begin(), set1.end(), set2.begin(), set2.end(),
105  std::inserter(result, result.end()));
106  return result;
107  }
Here is the caller graph for this function:

◆ SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED() [1/4]

Gambit::Printers::SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED ( int8_t  ,
H5T_NATIVE_INT8   
)

Typedef'd types; enabled only where they differ from the true types.

◆ SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED() [2/4]

H5T_NATIVE_UINT8 Gambit::Printers::SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED ( int16_t  ,
H5T_NATIVE_INT16   
)

◆ SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED() [3/4]

H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 Gambit::Printers::SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED ( int32_t  ,
H5T_NATIVE_INT32   
)

◆ SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED() [4/4]

H5T_NATIVE_UINT8 H5T_NATIVE_UINT16 H5T_NATIVE_UINT32 Gambit::Printers::SPECIALISE_HDF5_DATA_TYPE_IF_NEEDED ( int64_t  ,
H5T_NATIVE_INT64   
)

◆ SQLite_equaltypes()

bool Gambit::Printers::SQLite_equaltypes ( const std::string &  type1,
const std::string &  type2 
)

Definition at line 125 of file sqlitebase.cpp.

References Gambit::LogTags::err, LOCAL_INFO, and printer_error().

Referenced by Gambit::Printers::SQLiteReader::_retrieve_template().

126  {
127  // There are five "basic" types in SQLite, but many
128  // "aliases" for them. We will need to map each input string
129  // to its "basic" type, and then check if those are the same
130  // for each input type.
131  auto it1 = SQLtype_to_basic.find(type1);
132  auto it2 = SQLtype_to_basic.find(type2);
133  if(it1==SQLtype_to_basic.end())
134  {
135  std::stringstream err;
136  err<<"Could not determine a basic SQLite 'affinity' type for data type named '"<<type1<<"' (first argument to this type checking dunction)";
137  printer_error().raise(LOCAL_INFO,err.str());
138  }
139  if(it2==SQLtype_to_basic.end())
140  {
141  std::stringstream err;
142  err<<"Could not determine a basic SQLite 'affinity' type for data type named '"<<type2<<"' (second argument to this type checking dunction)";
143  printer_error().raise(LOCAL_INFO,err.str());
144  }
145  return (it1->second) == (it2->second);
146  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
const std::map< std::string, std::string, Utils::ci_less > SQLtype_to_basic(fill_SQLtype_to_basic())
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SQLiteReader::get_sql_col< std::string >()

template<>
std::string Gambit::Printers::SQLiteReader::get_sql_col< std::string > ( const std::string &  col_name)

Definition at line 79 of file sqlitereader.cpp.

References Gambit::LogTags::err, Gambit::Printers::SQLiteReader::get_col_i(), LOCAL_INFO, printer_error(), and Gambit::Printers::SQLiteReader::stmt.

80  {
81  char* p = (char*)sqlite3_column_text(stmt, get_col_i(col_name));
82  if(p==NULL)
83  {
84  std::stringstream err;
85  err<<"Pointer returned by sqlite3_column_text was NULL!";
86  printer_error().raise(LOCAL_INFO, err.str());
87  }
88  return std::string(p);
89  }
EXPORT_SYMBOLS error & printer_error()
Printer errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:

◆ SQLtype_to_basic()

const std::map<std::string,std::string,Utils::ci_less> Gambit::Printers::SQLtype_to_basic ( fill_SQLtype_to_basic()  )

◆ typecode2sql()

const std::map<unsigned int,std::string> Gambit::Printers::typecode2sql ( define_typecodes()  )

◆ USE_COMMON_PRINT_OVERLOAD() [1/10]

Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer2  ,
std::vector< double  
)

◆ USE_COMMON_PRINT_OVERLOAD() [2/10]

map_str_dbl Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer2  ,
map_intpair_dbl   
)

◆ USE_COMMON_PRINT_OVERLOAD() [3/10]

map_str_dbl ModelParameters Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer2  ,
triplet< double  
)

◆ USE_COMMON_PRINT_OVERLOAD() [4/10]

map_str_dbl ModelParameters DM_nucleon_couplings Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer2  ,
DM_nucleon_couplings_fermionic_HP   
)

◆ USE_COMMON_PRINT_OVERLOAD() [5/10]

Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( asciiPrinter  ,
ModelParameters   
)

Referenced by ADD_ASCII_SIMPLE_PRINTS().

Here is the caller graph for this function:

◆ USE_COMMON_PRINT_OVERLOAD() [6/10]

triplet<double> Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( asciiPrinter  ,
DM_nucleon_couplings   
)

◆ USE_COMMON_PRINT_OVERLOAD() [7/10]

triplet<double> DM_nucleon_couplings_fermionic_HP Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( asciiPrinter  ,
Flav_KstarMuMu_obs   
)

◆ USE_COMMON_PRINT_OVERLOAD() [8/10]

Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer  ,
ModelParameters   
)

◆ USE_COMMON_PRINT_OVERLOAD() [9/10]

triplet<double> Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer  ,
DM_nucleon_couplings   
)

◆ USE_COMMON_PRINT_OVERLOAD() [10/10]

triplet<double> DM_nucleon_couplings_fermionic_HP Gambit::Printers::USE_COMMON_PRINT_OVERLOAD ( HDF5Printer  ,
Flav_KstarMuMu_obs   
)

Variable Documentation

◆ FIRST_EMPTY_TAG

const int Gambit::Printers::FIRST_EMPTY_TAG = FINAL_SYNC+1

Definition at line 36 of file VertexBuffer_mpitags.hpp.

Referenced by Gambit::Printers::BuffTags::BuffTags().

◆ gambit_registry

Gambit::Printers::gambit_registry
Initial value:
{
typedef BasePrinter* create_printer_function(const Options&, BasePrinter* const&)

Maps in which to keep factory functions for the printers (printer_creators) and readers (reader_creators)

Definition at line 235 of file baseprinter.hpp.

Referenced by Gambit::Printers::BaseReader::retrieve().

◆ nullpoint

◆ printer_creators

reg_elem<create_printer_function> Gambit::Printers::printer_creators

◆ reader_creators

reg_elem<create_reader_function> Gambit::Printers::reader_creators

Definition at line 240 of file baseprinter.hpp.

Referenced by Gambit::Printers::PrinterManager::new_reader().

◆ SQLtype_to_basic

const std::map<std::string,std::string, Utils::ci_less> Gambit::Printers::SQLtype_to_basic

◆ typecode2sql

const std::map<unsigned int,std::string> Gambit::Printers::typecode2sql