Keys in the ODB /Logger/Runlog/SQL subtree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
* [[Keys in the ODB /Logger tree| /Logger tree]]  
* [[Keys in the ODB /Logger tree| /Logger tree]]  
* [[Logging to a mySQL database]]
* [[Logging to a mySQL database]]
* [[/Logger ODB tree #Example | example tree]]
* [[/Logger ODB tree #Example | example /Logger tree]]
* [[mlogger]]  
* [[mlogger]]  
</div>
</div>
Line 9: Line 9:
----------------
----------------
<br>
<br>
The ODB <span style="color: purple;">''/Logger/SQL''</span> ODB subtree is a subdirectory of the [[/Logger ODB tree]]. The The ODB <span style="color: purple;">''/Logger/SQL''</span> subtree will be created by the MIDAS logger ([[mlogger]]) - see [[Logging to a mySQL database]].
The ODB <span style="color: purple;">''/Logger/SQL''</span> ODB subtree is a subdirectory of the [[/Logger ODB tree]]. The The ODB <span style="color: purple;">''/Logger/SQL''</span> subtree will be created by the MIDAS logger ([[mlogger]]) - see [[Logging to a mySQL database]].


<br>
-----
<br>


== <span style="color: purple;">''/Logger/SQL/Create Database''</span> ==
 
== Keys in the <span style="color: purple;">''/Logger/SQL subtree</span> ==
The following sections explain the purpose of the keys in this subtree.
 
 
=== <span style="color: purple;">''Create Database''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Type:''' BOOL
Line 21: Line 25:
</div>  
</div>  
   
   
If this flag is set, the SQL database will be created.
If this key in the [[#top|/Logger/SQL subtree]]  is set, the SQL database will be created.


<br>
<br>
Line 28: Line 32:




== <span style="color: purple;">''/Logger/SQL/Write Data''</span> ==
=== <span style="color: purple;">''Write Data''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Type:''' BOOL
Line 36: Line 40:


If this flag is set , the data will be written to the SQL database, provided the MIDAS logger ([[mlogger]]) is also set to write the data - see
If this key in the [[#top|/Logger/SQL subtree]] is set , the data will be written to the SQL database, provided the MIDAS logger ([[mlogger]]) is also set to write the data - see
[[Keys in the ODB /Logger tree #/Logger/Write data |/Logger/Write data key]].  
[[Keys in the ODB /Logger tree #/Logger/Write data |/Logger/Write data key]].  


Line 44: Line 48:




== <span style="color: purple;">''/Logger/SQL/Hostname''</span> ==
=== <span style="color: purple;">''Hostname''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 51: Line 55:




The name of the host where the SQL database is located.
This key in the [[#top|/Logger/SQL subtree]] contains the name of the host where the SQL database is located.


<br>
<br>
Line 58: Line 62:




== <span style="color: purple;">''/Logger/SQL/Username''</span> ==
=== <span style="color: purple;">''Username''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 65: Line 69:


Username for access to the SQL Database.
This key in the [[#top|/Logger/SQL subtree]] contains the username for access to the SQL Database.


<br>
<br>
Line 72: Line 76:




== <span style="color: purple;">''/Logger/SQL/Password''</span> ==
=== <span style="color: purple;">''Password''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 79: Line 83:
   
   
(Encoded) Password for access to the SQL Database.
This key in the [[#top|/Logger/SQL subtree]] contains  the (encoded) password for access to the SQL Database.


<br>
<br>
Line 85: Line 89:
<br>
<br>


== <span style="color: purple;">''/Logger/SQL/Database''</span> ==
=== <span style="color: purple;">''Database''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 92: Line 96:


Name of the SQL Database (predefined as the name of the experiment in  ODB Key [[/Experiment/Name]]).
This key in the [[#top|/Logger/SQL subtree]] contains the name of the SQL Database (predefined as the name of the experiment in  ODB Key [[/Experiment ODB tree#Name|/Experiment/Name]]).


<br>
<br>
Line 98: Line 102:
<br>
<br>


== <span style="color: purple;">''/Logger/SQL/Table''</span> ==
=== <span style="color: purple;">''Table''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 106: Line 110:


Name of the Table in the SQL Database.
This key in the [[#top|/Logger/SQL subtree]] contains the name of the table in the SQL Database.


<br>
<br>
Line 112: Line 116:
<br>
<br>


== <span style="color: purple;">''/Logger/SQL/Links BOR''</span> ==
=== <span style="color: purple;">''Links BOR''</span> ===


* '''Type:''' DIR
* '''Type:''' DIR
Line 118: Line 122:
    
    


This directory contains links to parameters in the ODB that are to be saved in the SQL Database at Begin-of-run. The links
This directory in the [[#top|/Logger/SQL subtree]] contains links to parameters in the ODB that are to be saved in the SQL Database at Begin-of-run. The links


*    Run number  ( linked to [[/Runinfo/Run number]] )
*    Run number  ( linked to [[/Runinfo ODB tree#Run number|/Runinfo/Run number]] )
*    Start time  ( linked to [[/Runinfo/Start time]])
*    Start time  ( linked to [[/Runinfo ODB tree#Start time|/Runinfo/Start time]])


are created automatically by the MIDAS logger ([[mlogger]]) the first time it runs. The user may add other links as desired.
are created automatically by the MIDAS logger ([[mlogger]]) the first time it runs. The user may add other links as desired.
Line 129: Line 133:
<br>
<br>


== <span style="color: purple;">''/Logger/SQL/Links EOR''</span> ==
 
=== <span style="color: purple;">''Links EOR''</span> ===


* '''Type:''' DIR
* '''Type:''' DIR
Line 135: Line 140:
   
   


This directory contains links to parameters in the ODB that are to be saved in the SQL Database at End-of-run. The link
This directory in the [[#top|/Logger/SQL subtree]] contains links to parameters in the ODB that are to be saved in the SQL Database at End-of-run. The link


*    Stop time  ( linked to [[/Runinfo/Stop time]] )
*    Stop time  ( linked to [[/Runinfo ODB tree#Stop time|/Runinfo/Stop time]] )


is created automatically by the MIDAS logger ([[mlogger]]) the first time it runs. The user may add other links as desired.
is created automatically by the MIDAS logger ([[mlogger]]) the first time it runs. The user may add other links as desired.
[[Category:Data Logging]]

Revision as of 12:59, 6 June 2014

Links




The ODB /Logger/SQL ODB subtree is a subdirectory of the /Logger ODB tree. The The ODB /Logger/SQL subtree will be created by the MIDAS logger (mlogger) - see Logging to a mySQL database.


Keys in the /Logger/SQL subtree

The following sections explain the purpose of the keys in this subtree.


Create Database

  • Type: BOOL
  • Default: "n"

If this key in the /Logger/SQL subtree is set, the SQL database will be created.





Write Data

  • Type: BOOL
  • Default: "n"


If this key in the /Logger/SQL subtree is set , the data will be written to the SQL database, provided the MIDAS logger (mlogger) is also set to write the data - see /Logger/Write data key.





Hostname

  • Type: STRING
  • Default: "localhost"


This key in the /Logger/SQL subtree contains the name of the host where the SQL database is located.





Username

  • Type: STRING
  • Default: "root"


This key in the /Logger/SQL subtree contains the username for access to the SQL Database.





Password

  • Type: STRING
  • Default:


This key in the /Logger/SQL subtree contains the (encoded) password for access to the SQL Database.




Database

  • Type: STRING
  • Default: <experiment name>


This key in the /Logger/SQL subtree contains the name of the SQL Database (predefined as the name of the experiment in ODB Key /Experiment/Name).




Table

  • Type: STRING
  • Default: "Runlog"


This key in the /Logger/SQL subtree contains the name of the table in the SQL Database.




Links BOR

  • Type: DIR


This directory in the /Logger/SQL subtree contains links to parameters in the ODB that are to be saved in the SQL Database at Begin-of-run. The links

are created automatically by the MIDAS logger (mlogger) the first time it runs. The user may add other links as desired.





Links EOR

  • Type: DIR


This directory in the /Logger/SQL subtree contains links to parameters in the ODB that are to be saved in the SQL Database at End-of-run. The link

is created automatically by the MIDAS logger (mlogger) the first time it runs. The user may add other links as desired.