![]() |
KaliVeda
Toolkit for HIC analysis
|
Manage database of simulations ,.
models
| id | name | ... |
|---|---|---|
INTEGER | TEXT | ... |
Each model can add arbitrary number of columns to this table to hold all necessary parameters used to describe a particular use of the model. Different parameter sets for the same model will have different id.
reactions
| id | nuc1 | nuc2 | energy | spin_hbar | impact_parameter | ip_units |
|---|---|---|---|---|---|---|
INTEGER | TEXT | TEXT | REAL | INTEGER | REAL | TEXT |
nuc1: "129Xe", projectile nucleus for reactions, or compound nucleus for decay calculation;nuc2: "119Sn", target nucleus for reactions, or NULLenergy: total projectile lab energy in MeV for reactions, or total compound excitation energy for decay calculation;spin_hbar: fixed spin of compound in \(\hbar\) units or NULL;impact_parameter: impact parameter of reaction if a fixed value was used, or NULL;ip_units: units for impact parameter if given, either "rel" ( \(b/b_{max}\) units ) or "fm" (or NULL).repositories
| id | root_dir | type | Xrdsrv | Xrdroot |
|---|---|---|---|---|
INTEGER | TEXT | TEXT | TEXT | TEXT |
root_dir: root directory of repository;type: "local" or "irods";Xrdsrv: URL of xrootd server if one available, or NULL;Xrdroot: root directory to use with xrootd server if one available, or NULL;datasets
Dataset = a collection of files produced by a given model and set of parameters.
| id | user | description | model_id |
|---|---|---|---|
INTEGER | TEXT | TEXT | INTEGER |
Each dataset is associated with a username and a short description. model_id links to the model and parameter set used in table models.
unfiltered_files
All files produced by simulations without being filtered with detector geometry, acceptance, etc.
| id | name | path | repository_id | original_name | original_path | events | type | dataset_id | reaction_id |
|---|---|---|---|---|---|---|---|---|---|
INTEGER | TEXT | TEXT | INTEGER | TEXT | TEXT | INTEGER | TEXT | INTEGER | INTEGER |
name: filename without paths;path: full path to file;repository_id: if file is in a data repository, the relevant id, or NULL;original_name: original name of file if it has been imported to the repository, or NULL;original_path: original full path to file if it has been imported to the repository, or NULL;events: total number of events in filetype: "primary" or "secondary", i.e. events before or after secondary decay;dataset_id: dataset this file belongs to;reaction_id: reaction this file simulates.filters
Descriptions of how events were filtered.
| id | kinematics | geometry | run_number | filter_type | data_quality_audit | random_phi | gemini | gem_add_erot |
|---|---|---|---|---|---|---|---|---|
INTEGER | INTEGER | TEXT | INTEGER | TEXT | TEXT | TEXT | INTEGER | TEXT |
kinematics: id of a reaction in reactions table: definition of kinematics used, e.g. lab->CM transformation;geometry: experimental dataset used to define geometry of multidetector;run_number: specific run number used to define experimental conditions, if used, or NULL;filter_type: type of filter = "Geo" or "GeoThresh";data_quality_audit: name of data quality audit defining identification performances, if used, or NULL;random_phi: = "yes" if phi randomized for each event, NULL otherwise;gemini: if KaliVeda Gemini++ used to perform secondary decay just before filter, number of decays per primary event, or NULL.gem_add_erot: if KaliVeda Gemini++ used, "yes" if rotational (Yrast) energy added to E*, or NULL.filtered_files
All files produced by filtering simulation results in table unfiltered_files
| id | name | path | repository_id | original_name | original_path | events | unfiltered_file_id | dataset_id | reaction_id | filter_id | |---—|-----—|---—|---------------—|------------—|------------—|-----------------—|---------—|----------—|--------—| | INTEGER | TEXT | TEXT | INTEGER | TEXT | TEXT |INTEGER | INTEGER | INTEGER | INTEGER | INTEGER |
name: filename without paths;path: full path to file;repository_id: if file is in a data repository, the relevant id, or NULL;original_name: original name of file if it has been imported to the repository, or NULL;original_path: original full path to file if it has been imported to the repository, or NULL;events: total number of events in fileunfiltered_file_id: link to simulated file processed to produce this one, i.e. id from unfiltered_files table;dataset_id: dataset this file belongs to in table datasets;reaction_id: reaction this file simulates in table reactions;filter_id: details of filtering in table filters;Given an existing directory containing some primary & secondary unfiltered files, and a filtered file:
let us create a local on-disk data repository
and import the simulated data both into the database and into the repository:
(adding second argument "irods" to AddDataRepository() with optional xrootd specifications would do the same thing with a data repository behind an iRODS server).
Output looks like:
and after import, data repository contains:
and database tables contain:
Definition at line 211 of file KVSimDataManager.h.
#include <KVSimDataManager.h>

Public Types | |
| using | dataset_id = int |
| using | file_id = int |
| using | filter_id = int |
| using | model_id = int |
| enum class | primary_or_secondary { primary , secondary } |
| using | reaction_id = int |
| using | repository_id = int |
Public Types inherited from KVBase | |
| enum | EKaliVedaBits { kIsKaliVedaObject = BIT(23) } |
Public Types inherited from TObject | |
| enum | EDeprecatedStatusBits |
| enum | EStatusBits |
Public Member Functions | |
| KVSimDataManager ()=default | |
| repository_id | AddDataRepository (const TString &root_dir, const TString &access="local", std::optional< TString > xrdsrv=std::nullopt, std::optional< TString > xrdroot=std::nullopt) |
| dataset_id | AddDataSet (const TString &short_description, const TString &model, const KVNameValueList &model_params) |
| dataset_id | AddDataSet (const TString &short_description, model_id modid) |
| void | AddFilesFromDirectory (dataset_id dataset, reaction_id reaction, const TString &dirpath) |
| Use KVSimDir to analyse files in directory, all supposed to correspond to the same reaction, and add them to the given dataset. More... | |
| filter_id | AddFilter (reaction_id kinematics, const TString &geometry, const TString &filter_type, bool random_phi, std::optional< int > run_number={}, std::optional< TString > data_quality_audit={}, std::optional< int > gem_decay_per_event={}, std::optional< bool > gem_add_rot_energy={}) |
| void | AddFilteredSimulation (const KVSimFile &f, dataset_id dataset, reaction_id reaction) |
| model_id | AddModel (const TString &, const KVNameValueList &) |
| reaction_id | AddReaction (const KV2Body &, std::optional< double >=std::nullopt, const TString &ip_units="fm") |
| void | AddUnfilteredSimulation (const TString &filepath, Int_t events, primary_or_secondary P, dataset_id dataset, reaction_id reaction) |
| std::optional< model_id > | GetModelId (const TString &, const KVNameValueList &) const |
| TString | GetModelName (model_id id) const |
| std::optional< reaction_id > | GetReactionId (const KV2Body &, std::optional< double >=std::nullopt, const TString &ip_units="fm") const |
| TString | GetReactionName (reaction_id id) const |
| void | ImportFilesToRepository (repository_id=0) |
| void | OpenDataBase (const TString &) |
Public Member Functions inherited from KVBase | |
| KVBase () | |
| Default constructor. More... | |
| KVBase (const Char_t *name, const Char_t *title="") | |
| Ctor for object with given name and type. More... | |
| KVBase (const KVBase &) | |
| copy ctor More... | |
| void | Clear (Option_t *opt="") override |
| Clear object properties : name, type/title, number, label. More... | |
| void | Copy (TObject &) const override |
| Make a copy of this object. More... | |
| void | Error (const char *method, const char *msgfmt,...) const override |
| colourised errors (red) ! More... | |
| const Char_t * | GetLabel () const |
| UInt_t | GetNumber () const |
| virtual TObject * | GetObject () const |
| virtual const Char_t * | GetType () const |
| Bool_t | HasLabel () const |
| virtual Bool_t | IsCalled (const Char_t *name) const |
| Bool_t | IsLabelled (const Char_t *l) const |
| virtual Bool_t | IsType (const Char_t *typ) const |
| virtual void | List () |
| KVBase & | operator= (const KVBase &) |
| copy assignment operator More... | |
| void | Print (Option_t *option="") const override |
| void | SetLabel (const Char_t *lab) |
| virtual void | SetNumber (UInt_t num) |
| virtual void | SetType (const Char_t *str) |
| void | Warning (const char *method, const char *msgfmt,...) const override |
| colourised warnings (orange) ! More... | |
Public Member Functions inherited from TNamed | |
| TNamed () | |
| TNamed (const char *name, const char *title) | |
| TNamed (const TNamed &named) | |
| TNamed (const TString &name, const TString &title) | |
| virtual | ~TNamed () |
| TObject * | Clone (const char *newname="") const override |
| Int_t | Compare (const TObject *obj) const override |
| virtual void | FillBuffer (char *&buffer) |
| const char * | GetName () const override |
| const char * | GetTitle () const override |
| ULong_t | Hash () const override |
| TClass * | IsA () const override |
| Bool_t | IsSortable () const override |
| void | ls (Option_t *option="") const override |
| TNamed & | operator= (const TNamed &rhs) |
| virtual void | SetName (const char *name) |
| virtual void | SetNameTitle (const char *name, const char *title) |
| virtual void | SetTitle (const char *title="") |
| virtual Int_t | Sizeof () const |
| void | Streamer (TBuffer &) override |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TObject | |
| TObject () | |
| TObject (const TObject &object) | |
| virtual | ~TObject () |
| void | AbstractMethod (const char *method) const |
| virtual void | AppendPad (Option_t *option="") |
| virtual void | Browse (TBrowser *b) |
| ULong_t | CheckedHash () |
| virtual const char * | ClassName () const |
| virtual void | Delete (Option_t *option="") |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| virtual void | Draw (Option_t *option="") |
| virtual void | DrawClass () const |
| virtual TObject * | DrawClone (Option_t *option="") const |
| virtual void | Dump () const |
| virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
| virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
| virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
| virtual void | Fatal (const char *method, const char *msgfmt,...) const |
| virtual TObject * | FindObject (const char *name) const |
| virtual TObject * | FindObject (const TObject *obj) const |
| virtual Option_t * | GetDrawOption () const |
| virtual const char * | GetIconName () const |
| virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
| virtual Option_t * | GetOption () const |
| virtual UInt_t | GetUniqueID () const |
| virtual Bool_t | HandleTimer (TTimer *timer) |
| Bool_t | HasInconsistentHash () const |
| virtual void | Info (const char *method, const char *msgfmt,...) const |
| virtual Bool_t | InheritsFrom (const char *classname) const |
| virtual Bool_t | InheritsFrom (const TClass *cl) const |
| virtual void | Inspect () const |
| void | InvertBit (UInt_t f) |
| Bool_t | IsDestructed () const |
| virtual Bool_t | IsEqual (const TObject *obj) const |
| virtual Bool_t | IsFolder () const |
| R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
| R__ALWAYS_INLINE Bool_t | IsZombie () const |
| void | MayNotUse (const char *method) const |
| virtual Bool_t | Notify () |
| void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
| void | operator delete (void *ptr) |
| void | operator delete (void *ptr, void *vp) |
| void | operator delete[] (void *ptr) |
| void | operator delete[] (void *ptr, void *vp) |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *vp) |
| void * | operator new[] (size_t sz) |
| void * | operator new[] (size_t sz, void *vp) |
| TObject & | operator= (const TObject &rhs) |
| virtual void | Paint (Option_t *option="") |
| virtual void | Pop () |
| virtual Int_t | Read (const char *name) |
| virtual void | RecursiveRemove (TObject *obj) |
| void | ResetBit (UInt_t f) |
| virtual void | SaveAs (const char *filename="", Option_t *option="") const |
| virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
| void | SetBit (UInt_t f) |
| void | SetBit (UInt_t f, Bool_t set) |
| virtual void | SetDrawOption (Option_t *option="") |
| virtual void | SetUniqueID (UInt_t uid) |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| virtual void | SysError (const char *method, const char *msgfmt,...) const |
| R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
| Int_t | TestBits (UInt_t f) const |
| virtual void | UseCurrentStyle () |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
Private Member Functions | |
| void | add_file_to_collection (const TString &method_name, const TString &table_name, KVNameValueList ¶ms, const TString &filepath, dataset_id dataset, reaction_id reaction, std::optional< filter_id > filt_id={}) |
| void | enter_data_row (const TString &table_name, const KVNameValueList ¶ms) |
| std::optional< int > | find_index_in_table (const TString &table_name, const KVNameValueList ¶ms) const |
| KVNameValueList | get_data_for_unique_index (const TString &table_name, int id) const |
| const KVDataRepository & | get_data_repository (repository_id id) |
| KVNameValueList | get_params_for_reaction (std::optional< double > opt, bool reaction, const KV2Body &R, const TString &ip_units) const |
| std::pair< TString, TString > | import_file_to_repository (const TString &filepath, repository_id repo, dataset_id dset, reaction_id reac, std::optional< filter_id > filt_id={}) |
| void | initialize_repository (repository_id id, const TString &root_dir, const TString &access="local", std::optional< TString > xrdsrv=std::nullopt, std::optional< TString > xrdroot=std::nullopt) |
| Initialize a new data repository with the given informations. More... | |
Private Attributes | |
| KVSQLite::database | fDB |
| std::map< int, std::unique_ptr< KVDataRepository > > | fRepos |
| Bool_t | import_data_into_repository = false |
| repository_id | import_repo = 0 |
Additional Inherited Members | |
Static Public Member Functions inherited from KVBase | |
| static std::optional< TString > | AbsoluteUnixPath (const TString &) |
| static Bool_t | AreEqual (Double_t x, Double_t y, Long64_t maxdif=1) |
| Comparison between two 64-bit floating-point values. More... | |
| static void | BackupFileWithDate (const Char_t *path) |
| static void | CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE) |
| static void | Deprecated (const char *method, const char *advice) |
| static Bool_t | FindClassSourceFiles (const KVString &class_name, KVString &imp_file, KVString &dec_file, const KVString &dir_name=".") |
| static Bool_t | FindExecutable (TString &exec, const Char_t *path="$(PATH)") |
| static const Char_t * | FindFile (const Char_t *search, TString &wfil) |
| static const Char_t * | GetBINDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | GetDATABASEFilePath () |
| static const Char_t * | GetDATADIRFilePath (const Char_t *namefile="") |
| static KVString | GetDataSetEnv (const KVString &dataset, const KVString &type, const char *defval) |
| template<typename ValType > | |
| static ValType | GetDataSetEnv (const KVString &dataset, const KVString &type, const ValType &defval) |
| static const Char_t * | GetETCDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | GetExampleFilePath (const Char_t *library, const Char_t *namefile) |
| Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) More... | |
| static const Char_t * | GetINCDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | GetKVBuildDate () |
| Returns KaliVeda build date. More... | |
| static const Char_t * | GetKVBuildDir () |
| Returns top-level directory used for build. More... | |
| static const Char_t * | GetKVBuildTime () |
| Returns KaliVeda build time. More... | |
| static const Char_t * | GetKVBuildType () |
| Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) More... | |
| static const Char_t * | GetKVBuildUser () |
| Returns username of person who performed build. More... | |
| static int | GetKVMajorVersion () |
| static int | GetKVMinorVersion () |
| static int | GetKVPatchVersion () |
| static const Char_t * | GetKVSourceDir () |
| Returns top-level directory of source tree used for build. More... | |
| static const Char_t * | GetKVVersion () |
| Returns KaliVeda version string. More... | |
| static const Char_t * | GetLIBDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | GetListOfPlugins (const Char_t *base) |
| static const Char_t * | GetListOfPluginURIs (const Char_t *base) |
| static const Char_t * | GetPluginURI (const Char_t *base, const Char_t *plugin) |
| static void | GetTempFileName (TString &base) |
| static const Char_t * | GetTEMPLATEDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | GetWORKDIRFilePath (const Char_t *namefile="") |
| static const Char_t * | gitBranch () |
| Returns git branch of sources. More... | |
| static const Char_t * | gitCommit () |
| Returns last git commit of sources. More... | |
| static void | InitEnvironment () |
| static bool | is_gnuinstall () |
| static Bool_t | IsEnvInit () |
| static Bool_t | IsThisAPlugin (const TString &uri, TString &base) |
| static TPluginHandler * | LoadPlugin (const Char_t *base, const Char_t *uri="0") |
| static Bool_t | OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="") |
| static void | OpenTempFile (TString &base, std::ofstream &fp) |
| static void | PrintSplashScreen () |
| Prints welcome message and infos on version etc. More... | |
| static Double_t | ProtectedGetX (const TF1 &func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) |
| static Double_t | ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) |
| static Bool_t | SearchAndOpenKVFile (const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="") |
| static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
| static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
| static Bool_t | SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="") |
| static const Char_t * | WorkingDirectory () |
Static Public Member Functions inherited from TNamed | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
| static Longptr_t | GetDtorOnly () |
| static Bool_t | GetObjectStat () |
| static void | SetDtorOnly (void *obj) |
| static void | SetObjectStat (Bool_t stat) |
Public Attributes inherited from TObject | |
| kBitMask | |
| kCanDelete | |
| kCannotPick | |
| kHasUUID | |
| kInconsistent | |
| kInvalidObject | |
| kIsOnHeap | |
| kIsReferenced | |
| kMustCleanup | |
| kNoContextMenu | |
| kNotDeleted | |
| kObjInCanvas | |
| kOverwrite | |
| kSingleKey | |
| kWriteDelete | |
| kZombie | |
Protected Member Functions inherited from TObject | |
| virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
| void | MakeZombie () |
Protected Attributes inherited from TNamed | |
| TString | fName |
| TString | fTitle |
Protected Attributes inherited from TObject | |
| kOnlyPrepStep | |
| using KVSimDataManager::dataset_id = int |
Definition at line 213 of file KVSimDataManager.h.
| using KVSimDataManager::file_id = int |
Definition at line 216 of file KVSimDataManager.h.
| using KVSimDataManager::filter_id = int |
Definition at line 218 of file KVSimDataManager.h.
| using KVSimDataManager::model_id = int |
Definition at line 214 of file KVSimDataManager.h.
| using KVSimDataManager::reaction_id = int |
Definition at line 215 of file KVSimDataManager.h.
| using KVSimDataManager::repository_id = int |
Definition at line 217 of file KVSimDataManager.h.
|
strong |
| Enumerator | |
|---|---|
| primary | |
| secondary | |
Definition at line 220 of file KVSimDataManager.h.
|
default |
|
private |
Definition at line 317 of file KVSimDataManager.cpp.
| KVSimDataManager::repository_id KVSimDataManager::AddDataRepository | ( | const TString & | root_dir, |
| const TString & | access = "local", |
||
| std::optional< TString > | xrdsrv = std::nullopt, |
||
| std::optional< TString > | xrdroot = std::nullopt |
||
| ) |
Initialize a (possibly new) data repository and return its id
If the same repository is not already in the database, it is added
If the repository is not in the list of currently active repositories, it is initialized and added to the list
Definition at line 232 of file KVSimDataManager.cpp.
| KVSimDataManager::dataset_id KVSimDataManager::AddDataSet | ( | const TString & | short_description, |
| const TString & | model, | ||
| const KVNameValueList & | model_params | ||
| ) |
Add a new dataset for given model with a short description
| [in] | short_description | short description (1 phrase) of dataset |
| [in] | model | (short) name of model |
| [in] | model_params | arbitrary list of key-value pairs giving full description of model parameters used in dataset |
Definition at line 745 of file KVSimDataManager.cpp.
| KVSimDataManager::dataset_id KVSimDataManager::AddDataSet | ( | const TString & | short_description, |
| model_id | modid | ||
| ) |
Add a new dataset for given model with a short description
| [in] | modid | index of model with a given set of parameters in the database |
| [in] | short_description | short description (1 phrase) of dataset |
Definition at line 715 of file KVSimDataManager.cpp.
| void KVSimDataManager::AddFilesFromDirectory | ( | dataset_id | dataset, |
| reaction_id | reaction, | ||
| const TString & | dirpath | ||
| ) |
Use KVSimDir to analyse files in directory, all supposed to correspond to the same reaction, and add them to the given dataset.
Definition at line 410 of file KVSimDataManager.cpp.
| KVSimDataManager::filter_id KVSimDataManager::AddFilter | ( | reaction_id | kinematics, |
| const TString & | geometry, | ||
| const TString & | filter_type, | ||
| bool | random_phi, | ||
| std::optional< int > | run_number = {}, |
||
| std::optional< TString > | data_quality_audit = {}, |
||
| std::optional< int > | gem_decay_per_event = {}, |
||
| std::optional< bool > | gem_add_rot_energy = {} |
||
| ) |
Add a set of filtering conditions to the database and return the corresponding index
| [in] | kinematics | index of reaction used to define lab->CM transform |
| [in] | geometry | name of experimental dataset used to define multidetector array geometry |
| [in] | filter_type | can be "Geo" or "GeoThresh" (or "Full" for old filtered simulations before KaliVeda v1.15) |
| [in] | random_phi | [default=true] whether each event underwent a random azimuthal rotation before filtering |
| [in] | run_number | [optional] specific run number of dataset used to define experimental conditions |
| [in] | data_quality_audit | [optional] name of audit used to define identification performances |
| [in] | gem_decay_per_event | [optional] if Gemini++ used to perform secondary decay just before filtering, number of decays per primary event |
| [in] | gem_add_rot_energy | [optional] if Gemini++ used, was rotational (Yrast) energy added to E* before decay? |
Definition at line 132 of file KVSimDataManager.cpp.
| void KVSimDataManager::AddFilteredSimulation | ( | const KVSimFile & | f, |
| dataset_id | dataset, | ||
| reaction_id | reaction | ||
| ) |
Add a filtered simulation to the collection get kinematics used for transform lab<->CM. if the system name contains '@' it is an ad hoc kinematics if not, we have to look for it in the experimental dataset database
Definition at line 355 of file KVSimDataManager.cpp.
| KVSimDataManager::model_id KVSimDataManager::AddModel | ( | const TString & | name, |
| const KVNameValueList & | params | ||
| ) |
Add model with given name and parameter values to database.
| [in] | name | (short) name of model |
| [in] | params | arbitrary list of key-value pairs giving full description of model parameters |
Definition at line 655 of file KVSimDataManager.cpp.
| KVSimDataManager::reaction_id KVSimDataManager::AddReaction | ( | const KV2Body & | R, |
| std::optional< double > | opt = std::nullopt, |
||
| const TString & | ip_units = "fm" |
||
| ) |
Add new reaction to database
| [in] | R | two-body reaction or compound nucleus definition (KV2Body) |
| [in] | opt | if given:
|
| [in] | ip_units | for impact parameter given in opt, either "fm" (default) or "rel" (=> b/bmax) |
Definition at line 591 of file KVSimDataManager.cpp.
| void KVSimDataManager::AddUnfilteredSimulation | ( | const TString & | filepath, |
| Int_t | events, | ||
| primary_or_secondary | P, | ||
| dataset_id | dataset, | ||
| reaction_id | reaction | ||
| ) |
Add a file containing data from an unfiltered simulation
| [in] | filepath | full path to file |
| [in] | events | number of events in file |
| [in] | P | whether events are primary or secondary (before or after secondary decay) |
| [in] | dataset | index of dataset file is part of |
| [in] | reaction | index of reaction file corresponds to |
if ImportFilesToRepository() has been called with a valid data repository id, the file will be copied to the repository, and any future access to the file will be via the data repository
Definition at line 287 of file KVSimDataManager.cpp.
|
inlineprivate |
Definition at line 240 of file KVSimDataManager.h.
|
inlineprivate |
Definition at line 232 of file KVSimDataManager.h.
|
inlineprivate |
fill list with all columns in row corresponding to the unique value of "id"
Definition at line 247 of file KVSimDataManager.h.
|
private |
Return reference to repository corresponding to an entry in the repositories table
If not already initialized, the repository is initialized using the infos in the table
If the repository can not be initialized because it is not in the database, throw a std::runtime_error()
Definition at line 551 of file KVSimDataManager.cpp.
|
private |
Definition at line 520 of file KVSimDataManager.cpp.
| std::optional< KVSimDataManager::model_id > KVSimDataManager::GetModelId | ( | const TString & | name, |
| const KVNameValueList & | params | ||
| ) | const |
Look for model with given name and parameter values in database
| [in] | name | (short) name of model |
| [in] | params | arbitrary list of key-value pairs giving full description of model parameters |
Definition at line 687 of file KVSimDataManager.cpp.
for given model, return name as "AMD_1", "HIPSE_11", etc., where "_N" is the index which can be different for different parameter sets of the model
Definition at line 507 of file KVSimDataManager.cpp.
| std::optional< KVSimDataManager::reaction_id > KVSimDataManager::GetReactionId | ( | const KV2Body & | R, |
| std::optional< double > | opt = std::nullopt, |
||
| const TString & | ip_units = "fm" |
||
| ) | const |
| [in] | R | two-body reaction or compound nucleus definition (KV2Body) |
| [in] | opt | if given:
|
| [in] | ip_units | for impact parameter given in opt, either "fm" (default) or "rel" (=> b/bmax) |
Definition at line 628 of file KVSimDataManager.cpp.
| TString KVSimDataManager::GetReactionName | ( | reaction_id | id | ) | const |
for given reaction index, return a string with a name like:
Definition at line 476 of file KVSimDataManager.cpp.
|
private |
Copy the file into the data repository and return a pair of TString {path,filename} with the path and filename in the repository.
The path will be of the form
or
for filtered files get model id from dataset
Definition at line 198 of file KVSimDataManager.cpp.
| void KVSimDataManager::ImportFilesToRepository | ( | repository_id | repo = 0 | ) |
Call with the id of a previously initialised data repository (see AddDataRepository()) for all following files added with AddFilesFromDirectory() to be imported (copied) into this data repository.
Call with no argument (default repo_id = 0 => no repository) to stop importing.
Definition at line 441 of file KVSimDataManager.cpp.
|
private |
Initialize a new data repository with the given informations.
Definition at line 173 of file KVSimDataManager.cpp.
Open/create the SQLite database file with given path
Creates default table(s) if not already done
Definition at line 15 of file KVSimDataManager.cpp.
|
mutableprivate |
Definition at line 226 of file KVSimDataManager.h.
|
private |
Definition at line 227 of file KVSimDataManager.h.
|
private |
Definition at line 229 of file KVSimDataManager.h.
|
private |
Definition at line 230 of file KVSimDataManager.h.