Data logging: overview
This page describes the kinds of data that midas can record (event data, time series, images and run information), and the mlogger program that records them.
Data types
Midas provides tools for logging several types of data:
- event data (e.g. waveforms, particle time-of-flight, number of particles seen) gets logged in midas files, which are written to disk and can later be analysed by users.
- time series data (e.g. temperatures and voltages vs time) gets logged by the history system, and stored either in binary files or in an SQL database. Webpages are provided for viewing plots/trends, and the data can also be analysed by users later.
- image data (e.g. webcam images vs time) can be recorded to disk and then replayed on a webpage.
- run-level information (e.g. start/stop times and critical configuration parameters) can be logged in either a text file or an SQL database, so analysers can later search for the data of interest.
| Event data | Time series data | Image data | Run info | |
|---|---|---|---|---|
| Data format | Midas events | Value vs time | Images | Summary info |
| Read from | Event buffers | ODB | Webcam | ODB |
| Write to binary files | Midas files | Custom format | jpg, png, gif etc | |
| Write to text files | ||||
| Write to SQL database | ||||
| Built-in web display | Low-level debugging | Interactive plots | Interactive browsing | |
| Tools for custom web pages | Built-in | Built-in | Built-in | |
| Tools for C++/python data analysis | Built-in | Built-in | Easy to write |
The mlogger program
All four types of data are handled by the mlogger program. You can start mlogger using mlogger (to have it run in the foreground) or mlogger -D (to have it run in the background).
mlogger will create the /Logger and /History/Images portions of the ODB the first time it is started. All configuration is done via the ODB. The rest of the /History ODB directory handles displaying history data in web pages, and is created by mhttpd (the midas web server).
The ODB settings are split up as:
/Loggerfor some global settings/Logger/Channelsfor writing event data to midas files/Logger/Historyfor writing time series data using the history system/History/Imagesfor saving webcam images/Logger/Runlogfor writing run information