Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  22 Nov 2023, Pavel Murat, Forum, run number from an external (*SQL) db? 
    Reply  22 Nov 2023, Ben Smith, Forum, run number from an external (*SQL) db? 
    Reply  22 Nov 2023, Stefan Ritt, Forum, run number from an external (*SQL) db? 
       Reply  01 Dec 2023, Pavel Murat, Forum, run number from an external (*SQL) db? 
          Reply  02 Dec 2023, Stefan Ritt, Forum, run number from an external (*SQL) db? 
             Reply  02 Dec 2023, Pavel Murat, Forum, run number from an external (*SQL) db? 
                Reply  03 Dec 2023, Pavel Murat, Forum, run number from an external (*SQL) db? 
                   Reply  04 Dec 2023, Stefan Ritt, Forum, run number from an external (*SQL) db? 
                Reply  04 Dec 2023, Stefan Ritt, Forum, run number from an external (*SQL) db? 
Message ID: 2635     Entry time: 22 Nov 2023     In reply to: 2633     Reply to this: 2636
Author: Stefan Ritt 
Topic: Forum 
Subject: run number from an external (*SQL) db? 
> - multiple subdetectors are taking test data during early commissioning 
> - a postgres db is a single sorce of run numbers.
> - test runs taken by different subsystems are assigned different [unique] run numbers and 
>   the data taken by the subsystem are identified not by the run number/dataset name , but 
>   by the run type, different for different susbsystems.

For that purpose I would not "mis-use" run numbers. Run number are meant to be incremented 
sequentially, like if you have a time-stamp in seconds since 1.1.1970 (Unix time). Intead, I 
would add additional attributes under /Experiment/Run Parameters like "Subsystem type", "Run 
mode (production/commissioning)" etc. You have much more freedom in choosing any number of 
attributes there. Then, send this attributes to your postgred db via "/Logger/Runlog/SQL/Links 
BOR". Then you can query your database to give you all runs of a certain subtype or mode.

See https://daq00.triumf.ca/MidasWiki/index.php/Logging_to_a_mySQL_database

Stefan
ELOG V3.1.4-2e1708b5