CVS Log for src/RATDB.cc,v



head 1.7;

Version 1.7
@Miscellaneous fixes to allow RATDB to be accessed from the ROOT interpreter: - #ifdefs in STL+ header for textio to make rootcint happy - Comment out clear_unique() method from smart pointer template class that was causing linker problems with the ROOT dictionary. - Add RATDB classes to the makefile which generates the ROOT shared library - Fix lingering warning about RATTrackNode not having ROOT ClassDef of its own, despite inheriting from a class (RAT_MCTrackStep) which does have a ClassDef. - Add LoadDefaults() method to RATDB for easing reading of standard tables. Bottom line, now you can do this from ROOT: RATDB *db = RATDB::Get(); db->LoadDefaults(); RATDBLinkPtr l = db->GetLink("DAQ"); double sampling_time = l->GetD("sampling_time"); Warning--ROOT 4 has issues with STL vectors, so this won't work: const vector &x = lpmtlocation->GetFArray("x"); You have to use ROOT 5 for vectors.
date 2006.03.13.22.35.03; author volsung; state Exp;

Version 1.6
@Add Clear() method to erase existing tables. Should only be used by unit testing functions.
date 2005.11.05.03.19.16; author volsung; state Exp;

Version 1.5
@RATDB index is now a string (actually identifier syntax, no spaces, etc) instead of an integer, which isn't very useful in practice, unless your language doesn't have a good string datatype.
date 2005.11.03.21.47.39; author volsung; state Exp;

Version 1.4
@Add method to get all tables with the same name (and different indices). Closes ticket #1.
date 2005.09.20.15.51.11; author volsung; state Exp;

Version 1.3
@Slight modification to the RATDB API. Instead of directly receiving RATDBLink pointers, users get a RATDBLinkPtr, which is a "smart pointer." The smart pointer will free the link object when there are no more references to it. No one else has to worry about it. Also fixed the destructor interaction between RATDBLink and RATDB objects. Bug existed before where crashes could occur if the database object was destroyed before the associated link objects. Now they can be deleted in any order.
date 2005.09.20.12.03.55; author volsung; state Exp;

Version 1.2
@- All *.ratdb files in the data directory (none yet) are automatically loaded into RATDB on startup. - Added GEANT4 UI commands to control RATDB: /rat/db/load [filename] -- Load a RATDB file /rat/db/set [table] [field] [value] -- Sets a field on the user plane - Unit tests to exercise the UI commands and verify they work.
date 2005.09.18.18.42.22; author volsung; state Exp;

Version 1.1
@Initial implementation of RATDB, a database of parameters. (To be used for holding all the physical constants, switches, tunable parameters, etc. in RAT.) Advantages over GLG4param: * Split parameter namespace into two levels, tables and fields, for easier organization of large amounts of data. * Parameters can be integers, floats, doubles, strings, and arbitrary length arrays of the same types. Integers can be input in hexadecimal notation. * Ability for users to override some default parameters by loading their own files or setting individual parameters. * API designed with the intention of growing the implementation into a more complete database system with data validity ranges (parameters that change over time) and a SQL backend if the need should arise someday. This version includes the text backend, which allows parameters to be stored in a human-readable text file format inspired by, but not compliant with, JSON. The in-memory storage uses a hash table implementation from STL+ 2.3 and a string hashing algorithm from Python 2.4.1. (Why wasn't STL designed with this in the first place?!) Lots of STL+ classes came along for the ride, and they may be useful in the future. Also included are unit tests for the text parser and database API. All tests pass on Mac OS X+gcc 4.0, Linux+gcc 3.4/2.96, and Sun CC 5.3.
date 2005.09.18.04.11.58; author volsung; state Exp;


Back to files page.

Matthew Worcester
Last modified: Mon Mar 13 16:36:00 CST 2006