ODB Access and Use: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "==== Links ==== <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * odbedit * mhttpd ODB page * * </div> == Introduction == The MIDAS Online D...")
 
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(34 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==== Links ====
The midas documentation has moved. The new documentation about using the ODB is in:
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [https://midas.triumf.ca/docs/develop/features/core_system/odb/ ODB: overview] (accessing the ODB, saving and loading)
* [[odbedit]]
* [https://midas.triumf.ca/docs/develop/features/core_system/odb/configuring/ ODB: configuring] (symlinks, limiting values to options, corrupted ODB)
* [[mhttpd]] ODB page
* [https://midas.triumf.ca/docs/develop/features/core_system/odb/programming/ ODB: programming] (accessing the ODB from C++, Python and web pages, experim.h)
*
* [https://midas.triumf.ca/docs/develop/reference/reference/programs/#odbedit odbedit] in Programs and options (odbedit commands)
*
</div>
 
== Introduction ==
The MIDAS Online Data Base (ODB) is the main communication platform between MIDAS applications. It contains all the information needed to run an experiment.
 
The ODB is hierarchically structured, similar to a file system, with directories and sub-directories (or trees and subtrees). The data are stored in key/data pairs, similar to the Windows NT registry. Keys can be dynamically created and deleted. The data associated with a key can be of different types such as: byte, words, double words, float, strings, etc. or arrays of any of those. A key can also be a directory or a symbolic link.
 
== Accessing the ODB ==
The MIDAS library provides a complete set of functions to manage and operate on these keys (in odb.c) (see
[http://ladd00.triumf.ca/~daqweb/doc/midas/doc/html/group__odbfunctionc.html odb functions]).
Scripts can easily access the odb using the [[odbedit]] -c argument.
 
Each field or '''KEY''' in the MIDAS ODB can be accessed '''interactively''' in two possible ways:
* Using the [[odbedit|odbedit application]] command line.
* Using a web browser accessing the URL of the [[mhttpd|midas server]]
 
 
== The ODB Structure ==
The data in the ODB are structured in a '''tree form''' with each "directory" dealing with a specific section of the acquisition.  
Particular system applications will automatically create their own initial ODB structure
filled with default values (for example, the [[mlogger|data logger]] creates the  [[/Logger ODB tree]]. The user may then modify these configurations to fit  his/her requirements  (see [[#Customizing|customizing]]). A list of the trees in the ODB used by the system can be found [[Online Database|here]].
 
 
 
== Customizing ==
The user customizes the ODB for their experiment by modifying the values of "system" parameters (e.g. [[Keys in the ODB /Logger tree]], and adds extra keys under existing trees as needed, e.g. "Edit on Start" parameters under the [[/Experiment ODB tree]]. The user may creates "optional" trees e.g. (/Script, /Custom) populating them with keys as required.
The user is also free to create his/her own tree structure under root (/) for his/her own purposes.
 
 
= Creating the ODB =
See  [[odbedit #Creating the ODB|creating the ODB ]]
 
= Creating Keys in the ODB =
The first time [[odbedit]] is run,  the trees [[/Runinfo ODB tree||/Runinfo]], [[/Experiment ODB tree|/Experiment]], [[/System ODB tree|/System]] will be created and filled with default values.
Other applications will add their own trees (see [[#The ODB Structure|above]]).
 
The user may customize the ODB by adding more keys.

Latest revision as of 22:01, 30 October 2026

The midas documentation has moved. The new documentation about using the ODB is in: