37#include "tkdb_builder.h"
53tkdb_builder::tkdb_builder(
tkdatabase *_database,
const char *_table_name):
55 fTableName(_table_name)
61void tkdb_builder::add_measure(
const tkstring &_measure_name,
bool _with_dbname)
64 if(!_with_dbname) db_name =
"";
79 if(!_with_dbname) db_name =
"";
80 (*fTable)[
tkstring::form(
"%s%s",db_name.data(),_measure_name.data())].set_value(_mes.
value);
81 (*fTable)[
tkstring::form(
"%s%s_unit",db_name.data(),_measure_name.data())].set_value(_mes.
unit);
82 if(_mes.
value==0.) (*fTable)[
tkstring::form(
"%s%s_unc",db_name.data(),_measure_name.data())].set_value(0.);
83 if(_mes.
err>0.) (*fTable)[
tkstring::form(
"%s%s_unc",db_name.data(),_measure_name.data())].set_value(_mes.
err);
Interface to the sqlite database.
Mother class used to fill the sqlite database.
void add_column(const char *_colname, const char *_coltype)
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
tkstring copy() const
Returns a copy of this string.
tkstring & to_lower()
Change all letters to lower case.
static const char * form(const char *_format,...)
data structure used to fill a tkmeasure object from the sqlite database