TkN 2.1
Toolkit for Nuclei
tklevel_scheme.cpp
1/********************************************************************************
2 * Copyright (c) : Université de Lyon 1, CNRS/IN2P3, UMR5822, *
3 * IP2I, F-69622 Villeurbanne Cedex, France *
4 * Normandie Université, ENSICAEN, UNICAEN, CNRS/IN2P3, *
5 * LPC Caen, F-14000 Caen, France *
6 * Contibutor(s) : *
7 * Jérémie Dudouet jeremie.dudouet@cnrs.fr [2020] *
8 * Diego Gruyer diego.gruyer@cnrs.fr [2020] *
9 * *
10 * This software is governed by the CeCILL-B license under French law and *
11 * abiding by the rules of distribution of free software. You can use, *
12 * modify and/ or redistribute the software under the terms of the *
13 * CeCILL-B license as circulated by CEA, CNRS and INRIA at the following *
14 * URL \"http://www.cecill.info\". *
15 * *
16 * As a counterpart to the access to the source code and rights to copy, *
17 * modify and redistribute granted by the license, users are provided *
18 * only with a limited warranty and the software's author, the holder of *
19 * the economic rights, and the successive licensors have only limited *
20 * liability. *
21 * *
22 * In this respect, the user's attention is drawn to the risks associated *
23 * with loading, using, modifying and/or developing or reproducing the *
24 * software by the user in light of its specific status of free software, *
25 * that may mean that it is complicated to manipulate, and that also *
26 * therefore means that it is reserved for developers and experienced *
27 * professionals having in-depth computer knowledge. Users are therefore *
28 * encouraged to load and test the software's suitability as regards *
29 * their requirements in conditions enabling the security of their *
30 * systems and/or data to be ensured and, more generally, to use and *
31 * operate it in the same conditions as regards security. *
32 * *
33 * The fact that you are presently reading this means that you have had *
34 * knowledge of the CeCILL-B license and that you accept its terms. *
35 ********************************************************************************/
36
37#ifdef HAS_DEBUG
38#include <chrono>
39#endif
40
41#include "tkdb_table.h"
42#include "tklevel_scheme.h"
43#include "tkstring.h"
44#include "tklog.h"
45#include "tkdatabase.h"
46#include "tkmanager.h"
47
48namespace tkn {
66}
67
68using namespace tkn;
69
70tklevel_scheme::tklevel_scheme(const tkstring &_nuc, int _zz, int _aa):fnucleus(_nuc), fA(_aa), fZ(_zz)
71{
72 if(fA<0||fZ<0) return;
73 init();
74}
75
93std::vector<shared_ptr<tklevel>> tklevel_scheme::get_levels(const std::function<bool (shared_ptr<tklevel>)> &_selection)
94{
95 vector<shared_ptr<tklevel>> res;
96 for(const auto &lvl : get_levels()) if(_selection(lvl)) res.push_back(lvl);
97 return res;
98}
99
114std::vector<shared_ptr<tkdecay>> tklevel_scheme::get_decays(const std::function<bool (shared_ptr<tkdecay>)> &_selection)
115{
116 vector<shared_ptr<tkdecay>> res;
117 for(const auto &dec : get_decays()) if(_selection(dec)) res.push_back(dec);
118 return res;
119}
120
121
143void tklevel_scheme::print(const tkstring &_data, const tkstring &_option)
144{
145 if(_data.is_empty()) {
146 glog << info << " Level scheme of " << fnucleus << do_endl;
147 glog << info << " Options : 'dataset', 'level', 'decay'" << do_endl;
148 }
149 if(_data.contains("dataset")){
150 glog << info << "Available datasets are : " << do_endl;
151 for(auto &dts : fmap_of_dataset) glog << info << dts.second->get_name() << " (" << dts.first << ")" << do_endl;
152 glog << comment << "Current dataset is '" << get_dataset()->get_name() << "'" << " (" << get_dataset()->get_id() << ")" << do_endl;
153 }
154 if(_data.contains("level")||_data.contains("decay")){
155 fmap_of_dataset[fdatasetid]->print(_data, _option);
156 }
157 if(_data == "*") {
158 int _current_data_set = fdatasetid;
159 for(auto &dataset: fmap_of_dataset) {
160 glog << info << "dataset : " << dataset.second->get_name() << do_endl;
161 select_dataset(dataset.first);
162 dataset.second->print("leveldecay");
163 }
164 // to select back the current dataset
165 select_dataset(_current_data_set);
166 }
167}
168
173bool tklevel_scheme::select_dataset(const tkstring &_dataset_name)
174{
175 if(fmap_of_dataset_name_id.count(_dataset_name)==0) {
176 glog << warning << "dataset '" << _dataset_name << "' do not exist for " << fnucleus << do_endl;
177 print("dataset");
178 return false;
179 }
180 fdatasetid = fmap_of_dataset_name_id[_dataset_name];
181 return select_dataset(fdatasetid);
182}
183
189{
190 if(fmap_of_dataset.count(_dataset_id)==0) {
191 glog << warning << "dataset with id '" << _dataset_id << "' do not exist for " << fnucleus << do_endl;
192 print("dataset");
193 return false;
194 }
195
196 fdatasetid = _dataset_id;
197 fmap_of_dataset[fdatasetid]->load_dataset();
198 return true;
199}
200
213shared_ptr<tklevel> tklevel_scheme::get_level(const tkstring &_name, bool _exact)
214{
215 // get a specific level [spin][parity][rank] (ex: 0+1 for the first 0+ state)
216 string spin;
217 int rank;
218
219 const char* sep = "";
220 if(_name.contains("+")) {sep = "+";}
221 else if(_name.contains("-")) {sep = "-";}
222
223 auto array = _name.tokenize(sep);
224 if(array.size()!=2) {
225 glog << error << " <nuclear_level_scheme::get_level_energy()> invalid argument '" << _name << "'. Syntax: '[spin][parity][rank]'." << do_endl;
226 return nullptr;
227 }
228
229 spin = array.at(0);
230 rank = array.at(1).atoi();
231
232 int idx = 0;
233 for(const auto &lvlp : get_levels([](auto lvl) {return (lvl->get_spin_parity()!=nullptr);})) {
234 auto jpistr = lvlp->get_spin_parity()->get_jpi_str();
235 bool ok=false;
236 if(!_exact) {
237 if(jpistr.equal_to(tkstring::form("%s%s",spin.data(),sep)) ||
238 jpistr.equal_to(tkstring::form("(%s%s)",spin.data(),sep)) ||
239 jpistr.equal_to(tkstring::form("(%s)%s",spin.data(),sep)) ||
240 jpistr.equal_to(tkstring::form("%s(%s)",spin.data(),sep))) {
241 ok = true;
242 }
243 }
244 else if(jpistr.equal_to(tkstring::form("%s%s",spin.data(),sep))) {
245 ok = true;
246 }
247 if(ok) {
248 idx++;
249 if(idx==rank) return lvlp;
250 }
251 }
252 return nullptr;
253}
254
263shared_ptr<tklevel> tklevel_scheme::get_level(double _energy, tkstring _offset)
264{
265 shared_ptr<tklevel> clostest_lev;
266 double best_ediff=1e6;
267 for(const auto &lev: get_levels()) {
268 if(!_offset.is_empty() && !_offset.contains("*")) {
269 if(_offset != lev->get_offset_bandhead()) continue;
270 }
271 if(_offset.is_empty() && !lev->get_offset_bandhead().is_empty()) continue;
272 if(_offset.contains("dec") && lev->get_decays_down().size()==0) continue;
273 double ediff = abs(lev->get_energy(tkunit_manager::units_keys::keV,true)-_energy);
274 if(ediff<best_ediff) {
275 best_ediff=ediff;
276 clostest_lev = lev;
277 }
278 }
279 return clostest_lev;
280}
281
282void tklevel_scheme::init()
283{
284 gdatabase->begin("DISTINCT dataset.dataset_id, dataset.dataset_name","level INNER JOIN dataset on level.dataset_id=dataset.dataset_id INNER JOIN isotope on level.isotope_id=isotope.isotope_id INNER JOIN element on isotope.element_id=element.element_id",tkstring::form("element.charge=%d AND isotope.mass=%d",fZ,fA), tkstring::form("read_dataset_%s",fnucleus.data()));
285
286 while(gdatabase->next(tkstring::form("read_dataset_%s",fnucleus.data()))) {
287 tkdb_table& datasets = (*gdatabase)["DATASET"];
288 fmap_of_dataset_name_id[datasets["dataset_name"].get_value()] = datasets["dataset_id"].get_value().atoi();
289 fmap_of_dataset[datasets["dataset_id"].get_value().atoi()] = make_shared<tkdataset>(tkdataset(fnucleus,fZ,fA,datasets["dataset_name"].get_value(),datasets["dataset_id"].get_value().atoi()));
290 }
291 tkstring default_dataset = fnucleus.data();
292 default_dataset += " : ADOPTED LEVELS, GAMMAS";
293 gdebug << "looking for dataset : " << default_dataset << do_endl;
294 bool found = (fmap_of_dataset_name_id.count(default_dataset)>0);
295 gdebug << (found?"":"not ") << "found " << (found?fmap_of_dataset_name_id[default_dataset.data()]:-1) << do_endl;
296
297 if(found) select_dataset(fmap_of_dataset_name_id[default_dataset.data()]);
298 else{
299 for(const auto &dts : fmap_of_dataset) {
300 glog << warning << tkstring::form("%5s",fnucleus.data()) << " -- no 'ADOPTED LEVELS' dataset : '" << dts.second->get_name() << "' used instead." << do_endl;
301 select_dataset(dts.first);
302 break;
303 }
304 }
305 if(fmap_of_dataset.empty()) {
306 tkstring datasetname = "EMPTY";
307 fdatasetid = 0;
308 fmap_of_dataset_name_id[datasetname] = fdatasetid;
309 fmap_of_dataset[fdatasetid] = make_shared<tkdataset>(tkdataset(fnucleus,fZ,fA,datasetname,fdatasetid));
310 }
311
312 floaded = true;
313}
314
315void tkdataset::check_yrast(shared_ptr<tklevel> _lvl)
316{
317 // check Yrast
318 if(_lvl->get_spin_parity()->get_spin().is_known()) {
319 int TwoJ = (int)(_lvl->get_spin_parity()->get_spin().get_value()*2+0.5);
320 if(!fyrastmap_exact.count(TwoJ)) {
321 fyrastmap_exact[TwoJ] = _lvl;
322 _lvl->fisYrast_exact = true;
323 // cout<<"exact yrast: 2J:"<<TwoJ<<" "<<lvl->get_spin_parity_str()<<" "<<lvl->get_energy()<<endl;
324 }
325 if(!fyrastmap_uncertain.count(TwoJ)) {
326 fyrastmap_uncertain[TwoJ] = _lvl;
327 _lvl->fisYrast_uncertain = true;
328 // cout<<"uncertain yrast: 2J:"<<TwoJ<<" "<<lvl->get_spin_parity_str()<<" "<<lvl->get_energy()<<endl;
329 }
330 }
331 else if(!_lvl->get_spin_parity_str().is_empty() && !_lvl->get_spin_parity_str().contains(",")) {
332 tkstring tmp = _lvl->get_spin_parity_str().copy().remove_all("(").remove_all(")").remove_all("+").remove_all("-");
333 int TwoJ;
334 if(tmp.contains("/2")) TwoJ = tmp.remove_all("/2").atoi();
335 else TwoJ = tmp.atoi()*2;
336 if(!fyrastmap_uncertain.count(TwoJ)) {
337 fyrastmap_uncertain[TwoJ] = _lvl;
338 _lvl->fisYrast_uncertain = true;
339 // cout<<"uncertain yrast: 2J:"<<TwoJ<<" "<<lvl->get_spin_parity_str()<<" "<<lvl->get_energy()<<endl;
340 }
341 }
342}
343
344void tkdataset::load_dataset()
345{
346 if(floaded) return;
347
348#ifdef HAS_DEBUG
349 auto t_0 = std::chrono::high_resolution_clock::now();
350 gdebug << "loading levels for dataset '" << fname << "' of " << fnucleus << do_endl;
351#endif
352
353 gdatabase->begin("DISTINCT level.*","level",tkstring::form("dataset_id=%d",fid));
354
355 while(gdatabase->next()) {
356 tkdb_table *levels = &(*gdatabase)["LEVEL"];
357 tkdb_column *col = &(*levels)["level_id"];
358 int id = col->get_value().atoi();
359
360 gmanager->set_max_level_id(id);
361
363 levels->read_measure(energy_struc, "level_energy");
364
365 shared_ptr<tklevel> lvl = make_shared<tklevel>(id,energy_struc);
366 lvl->fbelongs_to_nucleus = fnucleus;
367
368 double spin = -1.;
369 int parity = -1.;
370 tkstring spin_parity_str = "";
371
372 col = &(*levels)["level_spin_parity"];
373 if(!col->is_empty()) spin_parity_str = col->get_value();
374 col = &(*levels)["level_spin"];
375 if(!col->is_empty()) spin = col->get_value().atof();
376 col = &(*levels)["level_parity"];
377 if(!col->is_empty()) parity = col->get_value().atoi();
378
379 if(!spin_parity_str.is_empty()) lvl->set_jpi(spin,parity,spin_parity_str);
380
381 tkdb_table::measure_data_struct lifetime_struc;
382 levels->read_measure(lifetime_struc, "level_lifetime");
383 if(lifetime_struc.filled) lvl->set_lifetime(lifetime_struc);
384
385 col = &(*levels)["level_comment"];
386 if(!col->is_empty()) lvl->set_comment(col->get_value());
387 col = &(*levels)["level_uncertain"];
388 if(!col->is_empty()) lvl->set_uncertain_level(col->get_value());
389
390 flevels.push_back(lvl);
391
392 check_yrast(lvl);
393 }
394 for(const auto &lvl: flevels) {
395 fmapoflevels[lvl->get_id()] = lvl;
396 }
397
398#ifdef HAS_DEBUG
399 auto t_1 = std::chrono::high_resolution_clock::now();
400 gdebug << "loading decays for dataset '" << fname << "' of " << fnucleus << do_endl;
401#endif
402
403 gdatabase->begin("DISTINCT decay.*","decay INNER JOIN level on decay.level_from_id=level.level_id ",tkstring::form("dataset_id=%d",fid));
404
405 while(gdatabase->next()) {
406 int dectype=-1;
407 int level_from = -1.;
408 int level_to = -1.;
409
410 tkdb_table *decay = &(*gdatabase)["DECAY"];
411 tkdb_column *col = &(*decay)["decay_id"];
412 int id = col->get_value().atoi();
413
414 gmanager->set_max_decay_id(id);
415
416 col = &(*decay)["decay_type"];
417 if(!col->is_empty()) dectype = col->get_value().atoi();
418 col = &(*decay)["level_from_id"];
419 if(!col->is_empty()) level_from = col->get_value().atoi();
420 col = &(*decay)["level_to_id"];
421 if(!col->is_empty()) level_to = col->get_value().atoi();
422
423 shared_ptr<tkdecay> dec = nullptr;
424
426 decay->read_measure(energy_struc, "decay_energy");
427
428 if(dectype == tkdecay::kgamma) {
429 dec = make_shared<tkgammadecay>(id, level_from, level_to, energy_struc);
430 shared_ptr<tkgammadecay> gamma = dynamic_pointer_cast<tkgammadecay>(dec);
431
432 tkdb_table::measure_data_struct relative_intensity_struc;
433 decay->read_measure(relative_intensity_struc, "decay_relative_intensity");
434 if(relative_intensity_struc.filled) gamma->set_relative_intensity(relative_intensity_struc);
435
436 col = &(*decay)["decay_multipolarity"];
437 if(!col->is_empty()) gamma->set_multipolarity(col->get_value());
438
439 tkdb_table::measure_data_struct mixing_ratio_struc;
440 decay->read_measure(mixing_ratio_struc, "decay_mixing_ratio");
441 if(mixing_ratio_struc.filled) gamma->set_mixing_ratio(mixing_ratio_struc);
442
443 tkdb_table::measure_data_struct conv_coeff_struc;
444 decay->read_measure(conv_coeff_struc, "decay_conv_coeff");
445 if(conv_coeff_struc.filled) gamma->set_conv_coeff(conv_coeff_struc);
446
447 // transition probabilities
448 tkdb_table::measure_data_struct transprob_struc;
449 decay->read_measure(transprob_struc, "decay_BE");
450 if(transprob_struc.filled) gamma->set_transition_probability(transprob_struc);
451 transprob_struc.clear();
452 decay->read_measure(transprob_struc, "decay_BEW");
453 if(transprob_struc.filled) gamma->set_transition_probability(transprob_struc);
454 transprob_struc.clear();
455 decay->read_measure(transprob_struc, "decay_BM");
456 if(transprob_struc.filled) gamma->set_transition_probability(transprob_struc);
457 transprob_struc.clear();
458 decay->read_measure(transprob_struc, "decay_BMW");
459 if(transprob_struc.filled) gamma->set_transition_probability(transprob_struc);
460 }
461 else continue;
462
463 col = &(*decay)["decay_comment"];
464 if(!col->is_empty()) dec->set_comment(col->get_value());
465 col = &(*decay)["decay_uncertain"];
466 if(!col->is_empty()) dec->set_uncertain_decay(col->get_value());
467
468 fdecays.push_back(dec);
469 fdecays.back()->set_levels(fmapoflevels.at(level_from),fmapoflevels.at(level_to));
470 }
471 for(auto &dec: fdecays) {
472 fmapoflevels.at(dec->get_level_from_id())->add_decay_down(dec);
473 fmapoflevels.at(dec->get_level_to_id())->add_decay_up(dec);
474 }
475
476
477#ifdef HAS_DEBUG
478 auto t_2 = std::chrono::high_resolution_clock::now();
479
480 auto dt01 = std::chrono::duration<double, std::milli>(t_1-t_0).count() * 0.001; // open db time
481 auto dt12 = std::chrono::duration<double, std::milli>(t_2-t_1).count() * 0.001; // first read loop with views
482
483 gdebug << std::fixed << std::setprecision(4) << "time level: "
484 << dt01
485 << " s" << do_endl;
486
487 gdebug << std::fixed << std::setprecision(4) << "time decays: "
488 <<dt12
489 << " s" << do_endl;
490#endif
491
492 floaded = true;
493}
494
499void tkdataset::print(const tkstring &_data, const tkstring &_option)
500{
501 if(_data.contains("level") && _data.contains("decay")) {
502 glog << info << "dataset '" << fname << "' contains " << flevels.size() << " levels" << do_endl;
503 glog << info << "dataset '" << fname << "' contains " << fdecays.size() << " decays" << do_endl;
504 for(auto &lev : flevels) {
505 if(_option.contains("yrastt") && !lev->is_yrast(true)) continue;
506 else if(_option.contains("yrast") && !_option.contains("yrastt") && !lev->is_yrast()) continue;
507 lev->print(_option);
508 for(auto &dec : lev->get_decays_down()) {
509 cout<<setw(13)<<""<<"-> ";dec->print("quiet;levto");
510 }
511 }
512 }
513 else if(_data.contains("level")) {
514 if(_option.contains("tab")){
515 std::cout << std::setw(15) << left << "symbol" << std::setw(15) << "levelid"
516 << std::setw(15) << left << "energy (keV)"
517 << std::setw(15) << left << "energy error"
518 << std::setw(15) << left << "spin parity"
519 << std::setw(15) << left << "t1/2"
520 << std::setw(15) << left << "t1/2 error"
521 << std::setw(15) << left << "t1/2 unit" << std::endl;}
522 else glog << info << "dataset '" << fname << "' contains " << flevels.size() << " levels:" << do_endl;
523 for(auto &lev : flevels) {
524 if(_option.contains("yrastt") && !lev->is_yrast(true)) continue;
525 else if(_option.contains("yrast") && !_option.contains("yrastt") && !lev->is_yrast()) continue;
526 if(_option.contains("tab")) std::cout << std::setw(15)<< left << fnucleus;
527 lev->print(_option);
528 }
529 }
530 else if(_data.contains("decay")) {
531 if(_option.contains("tab")) std::cout << std::setw(15) << left << "symbol" << std::setw(15) << left << "decayid" << std::setw(15) << left << "energy (keV)" << std::setw(15) << left << "energy error (keV)" << std::endl;
532 else glog << info << "dataset '" << fname << "' contains " << fdecays.size() << " decays:" << do_endl;
533 for(auto &dec : fdecays) {
534 if(_option.contains("tab")) std::cout << std::setw(15) << left << fnucleus;
535 dec->print(_option);
536 }
537 }
538}
539
540shared_ptr<tklevel> tkdataset::add_level(double _ener, double _unc, tkstring _unit, tkstring _jpistr)
541{
542 tkspin spin;
543 tkparity parity;
544 double spin_val = -1.;
545 int parity_val = -1.;
546
547 tkdb_table::measure_data_struct lvl_properties{_ener,_unc,0,0,_unit};
548 shared_ptr<tklevel> lvl = make_shared<tklevel>(gmanager->get_new_level_id(),lvl_properties);
549
550 spin.set(_jpistr);parity.set(_jpistr);
551 if(spin.is_known()) spin_val = spin.get_value();
552 if(parity.is_known()) parity_val = (parity.is_parity(tkparity::eparity::kParityMinus));
553
554 lvl->set_jpi(spin_val,parity_val,_jpistr);
555
556 // needs to generate a unique id for the level
557 lvl->fbelongs_to_nucleus = fnucleus;
558
559 // find the good position in the vector to be sorted by energy
560 auto it = std::lower_bound(flevels.begin(), flevels.end(), lvl,
561 [](const std::shared_ptr<tklevel>& a, const std::shared_ptr<tklevel>& b) {
562 return a->get_energy() < b->get_energy();
563 });
564 flevels.insert(it, lvl);
565
566 check_yrast(lvl);
567 fmapoflevels[lvl->get_id()] = lvl;
568
569 return lvl;
570}
571
572shared_ptr<tkgammadecay> tkdataset::add_gamma_decay(shared_ptr<tklevel> _lvlfrom, shared_ptr<tklevel> _lvlto, double _ener, double _unc)
573{
574 if(_ener==0.) _ener = _lvlfrom->get_energy() - _lvlto->get_energy();
575
576 tkdb_table::measure_data_struct energy_struc{_ener,_unc,0.,0.,"keV"};
577
578 shared_ptr<tkgammadecay> decay = make_shared<tkgammadecay>(gmanager->get_new_decay_id(), _lvlfrom->get_id(), _lvlto->get_id(), energy_struc);
579 decay->set_levels(_lvlfrom,_lvlto);
580 fdecays.push_back(decay);
581 _lvlfrom->add_decay_down(decay);
582 _lvlto->add_decay_up(decay);
583
584 return decay;
585}
586
587
588#ifdef HAS_ROOT
589ClassImp(tklevel_scheme);
590#endif
Stores information on a specific dataset.
shared_ptr< tklevel > add_level(double _ener, double _unc, tkstring _unit, tkstring _jpistr)
manually add a new level to the dataset
shared_ptr< tkgammadecay > add_gamma_decay(shared_ptr< tklevel > _lvlfrom, shared_ptr< tklevel > _lvlto, double _ener=0., double _unc=0.)
add a new decay between two levels to the dataset
Simple structure to store a table column.
Definition: tkdb_column.h:49
tkstring get_value() const
Definition: tkdb_column.h:61
Representaiton of a sqlite data table.
Definition: tkdb_table.h:52
void read_measure(measure_data_struct &_struct, const tkstring &_col_base_name)
Definition: tkdb_table.cpp:304
Collection of levels and decay.
void print(const tkstring &_data="", const tkstring &_option="")
print the level scheme information
const std::vector< shared_ptr< tklevel > > & get_levels()
get the vector containing all the levels
bool select_dataset(const tkstring &_dataset_name)
select a dataset using its name
const shared_ptr< tkdataset > & get_dataset()
returns the current dataset
shared_ptr< tklevel > get_level(const tkstring &_name, bool _exact=true)
get the level corresponding to the given name
const std::vector< shared_ptr< tkdecay > > & get_decays()
get the vector containing all the decays
Nuclear excited state parity.
Definition: tkspin_parity.h:85
virtual bool is_parity(tkparity::eparity _parity)
test the parity value
Definition: tkspin_parity.h:98
virtual void set(const tkstring &_st)
define the parity from a string
bool is_known() const
to get some information about this data
Definition: tkproperty.h:91
Nuclear excited state spin.
Definition: tkspin_parity.h:49
double get_value()
To get the spin as a double.
Definition: tkspin_parity.h:66
void set(int n, int d=1)
define the spin value
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
Definition: tkstring.h:54
tkstring copy() const
Returns a copy of this string.
Definition: tkstring.cpp:370
static const char * form(const char *_format,...)
Definition: tkstring.cpp:431
std::vector< tkstring > tokenize(const tkstring &_delim=" ") const
Create a vector of string separated by at least one delimiter.
Definition: tkstring.cpp:254
bool is_empty() const
Definition: tkstring.h:163
tkstring & remove_all(const tkstring &_s1)
Definition: tkstring.h:215
int atoi() const
Converts a string to integer value.
Definition: tkstring.cpp:175
bool contains(const char *_pat, ECaseCompare _cmp=kExact) const
Definition: tkstring.h:197
double atof() const
Converts a string to double value.
Definition: tkstring.cpp:191
Definition: tklog.cpp:39
tklog & info(tklog &log)
Definition: tklog.h:336
tklog & error(tklog &log)
Definition: tklog.h:367
tklog & do_endl(tklog &log)
Definition: tklog.h:235
tklog & warning(tklog &log)
Definition: tklog.h:354
tklog & comment(tklog &log)
Definition: tklog.h:342
data structure used to fill a tkmeasure object from the sqlite database
Definition: tkdb_table.h:72