Logging to a ASCII file: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "{{Pagelinks}} ==== Links ==== <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * ODB /Logger tree * keys in the...")
 
No edit summary
Line 14: Line 14:


Under two dedicated subdirectories  
Under two dedicated subdirectories  
[[Keys in the ODB /Logger/Runlog/ASCII subtree #/Logger/Runlog/ASCII/Links BOR | Links BOR ]] and
[[Keys in the ODB /Logger/Runlog/SQL subtree #/Logger/Runlog/SQL/Links BOR | Links BOR ]] and
[[Keys in the ODB /Logger/Runlog/ASCII subtree #/Logger/Runlog/ASCII/Links EOR | Links EOR ]],
[[Keys in the ODB /Logger/Runlog/ASCII subtree #/Logger/Runlog/ASCII/Links EOR | Links EOR ]],
predefined links exist which will be used at begin-of-run (BOR) and end-of-run (EOR) respectively for storing parameter values into the database. These elements are [[ODB Page#symbolic link|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 [http://ladd00.triumf.ca/~daqweb/doc/midas/doc/html/analyzer_8c.html#a8e03cbe2637bd6f4488a659c9f23d29e ana_end_of_run()] function from the
predefined links exist which will be used at begin-of-run (BOR) and end-of-run (EOR) respectively for storing parameter values into an ASCII file. These elements are [[ODB Page#symbolic link|ODB links]] allowing the user to extend the list with any parameter in the ODB database.  
[http://ladd00.triumf.ca/~daqweb/doc/midas/doc/html/analyzer_8c_source.html  analyzer.c].


The following example shows a <span style="color: purple;">''/Logger/Runlog/SQL''</span> tree as created by [[mlogger]]. See [[keys in the ODB /Logger/Runlog/SQL subtree |ODB /Logger/Runlog/SQL subtree]] for an explanation of the meaning of each key.
The following example shows a <span style="color: purple;">''/Logger/Runlog/ASCII''</span> tree as created by [[mlogger]]. See [[keys in the ODB /Logger/Runlog/ASCII subtree |ODB /Logger/Runlog/ASCII subtree]] for an explanation of the meaning of each key.


=== Example /Logger/Runlog/SQL subtree ===
=== Example /Logger/Runlog/ASCII subtree ===


  [local:midas:S]/Runlog>ls -lr SQL
  [local:midas]Runlog>ls -lr ASCII
Key name                        Type    #Val  Size  Last Opn Mode Value
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
---------------------------------------------------------------------------
SQL                        DIR
ASCII                          DIR
    Create database            BOOL    1    4    27s  0  RWD  n
     Write data                  BOOL    1    4    >99d 0  RWD  n
     Write data                  BOOL    1    4    27s  0  RWD  n
     filename                   STRING  1    80    >99d 0  RWD  runlog.log
     Hostname                   STRING  1    80    27s  0  RWD  localhost
    Username                    STRING  1    80    27s  0  RWD  root
    Password                    STRING  1    80    27s  0  RWD
    Database                    STRING  1    32    27s  0  RWD  midas
    Table                      STRING  1    80    27s  0  RWD  Runlog
    Logfile                    STRING  1    80    27s  0  RWD  sql.log
     Links BOR                  DIR
     Links BOR                  DIR
         Run number             LINK    1    20    58s 0  RWD  /Runinfo/Run number
         Run number -> /Runinfo/Run number
        Start time             LINK    1    20   58s 0  RWD  /Runinfo/Start time
                                INT32  1    4    11h 0  RWD  1517
        Start time -> /Runinfo/Start time
                                STRING  1    32   11h 0  RWD  Mon Oct 31 13:39:21 2022
     Links EOR                  DIR
     Links EOR                  DIR
         Stop time               LINK    1    19   4m   0  RWD  /Runinfo/Stop time
         Stop time -> /Runinfo/Stop time
                                STRING  1    32   3h   0  RWD  Tue Nov  8 09:27:59 2022
        Comment -> /Experiment/Edit on start/Comment
                                STRING  1    128  11h  0  RWD  FEP Hit Finder


[[Category: Logger Tree]] [[Category:Data Logging]]
[[Category: Logger Tree]] [[Category:Data Logging]]

Revision as of 04:09, 17 November 2022


Links



The MIDAS logger (mlogger) is able to record information in an ASCII file.

Under two dedicated subdirectories Links BOR and Links EOR , predefined links exist which will be used at begin-of-run (BOR) and end-of-run (EOR) respectively for storing parameter values into an ASCII file. These elements are ODB links allowing the user to extend the list with any parameter in the ODB database.

The following example shows a /Logger/Runlog/ASCII tree as created by mlogger. See ODB /Logger/Runlog/ASCII subtree for an explanation of the meaning of each key.

Example /Logger/Runlog/ASCII subtree

[local:midas]Runlog>ls -lr ASCII

Key name Type #Val Size Last Opn Mode Value


ASCII DIR

   Write data                  BOOL    1     4     >99d 0   RWD  n
   filename                    STRING  1     80    >99d 0   RWD  runlog.log
   Links BOR                   DIR
       Run number -> /Runinfo/Run number
                               INT32   1     4     11h  0   RWD  1517
       Start time -> /Runinfo/Start time
                               STRING  1     32    11h  0   RWD  Mon Oct 31 13:39:21 2022
   Links EOR                   DIR
       Stop time -> /Runinfo/Stop time
                               STRING  1     32    3h   0   RWD  Tue Nov  8 09:27:59 2022
       Comment -> /Experiment/Edit on start/Comment
                               STRING  1     128   11h  0   RWD  FEP Hit Finder