![]() |
TkN 2.7.1
Toolkit for Nuclei
|
The TkN data manager is key part of the TkN library. It reads the TkN sqlite3 database, builds the C++ structures in memory and makes the links between these structures and any object created by the user. This way, the level scheme of a nucleus is only built once, even if the user creates the corresponding nucleus millions of times.
It also allows the user to easily browse the full database via the use of the gmanager singleton. For example, we can loop on all the existing nuclei using:
The cache shares level schemes and measured properties. Copy a tkmeasure before editing it; copying a tknucleus does not deep-copy all its properties. Changing a cached scheme's selected dataset affects other callers for that nucleus. Concurrent read-only use excludes select_dataset, adding/editing levels or decays, and direct gdatabase cursors. Low-level named cursors share column cells: another next() overwrites them and end() clears them. Copy results before starting another cursor; nested/concurrent cursors are not supported in this API.
As seen previously with the levels and decays, we can also use a lambda expression to filter the list of nuclei, e.g. the carbon isotopes:
Some tools are also provided to easily loop on the Z or N known ranges: