Logging to a mySQL database
The MIDAS logger (mlogger) is able to store information in a mySQL database. This option is an alternative to the runlog.txt file handled by the MIDAS Analyzer . The two main advantages using the SQL are:
- The recording is done by the logger and therefore is independent of the user analyzer.
- The definition of the parameters to be recorded in the database is entirely setup in the ODB under the /Logger/SQL tree.
The SQL option is enabled by the preprocessor flag NEED_MYSQL at build time. This option, when enabled, will cause mlogger to create a subtree SQL under the /Logger ODB tree . This tree contains information for mySQL access with the predefined mySQL database name "Midas" and table "Runlog". Under two dedicated subdirectories Link_BOR and Link_EOR, predefined links exists which will be used at BOR and EOR respectively for storing parameter values into the database. These elements are ODB links allowing the user to extend the list with any parameter in the ODB database. This logger mySQL option may replace or complement the runlog.txt functionality of the ana_end_of_run() function from the analyzer.c.