Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  07 Sep 2016, Wes Gohn, Forum, ODB as JSON file 
    Reply  07 Sep 2016, Stefan Ritt, Forum, ODB as JSON file 
       Reply  08 Sep 2016, Pierre-Andre Amaudruz, Forum, ODB as JSON file 
    Reply  30 Sep 2016, Konstantin Olchanski, Forum, ODB as JSON file 
Message ID: 1205     Entry time: 30 Sep 2016     In reply to: 1193
Author: Konstantin Olchanski 
Topic: Forum 
Subject: ODB as JSON file 
> Hi. Is it currently possible to automatically save the MIDAS ODB as a JSON file?
> I can do it manually in odbedit, but it looks like the only option for the
> automatic ODB save for each run is the standard .ODB format. Is there a way to
> change this?

I think today it makes sense to make all ODB dump in the JSON format - in my experience it is much 
easier to work with JSON data compared to XML data.

To write the ODB dump file in JSON format, set "/logger/ODB Dump File" to "run%05d.json".

In the midas data files, the ODB dump made into the begin-of-run and end-of-run events is presently 
unconditionally done in XML format.

Perhaps the data file dump should match the format of the odb dump file (both XML or both JSON or 
both ODB).

But at the moment our standard analyzer ROOTANA does not have the code to process JSON ODB 
dumps, so I am hesitant to make this change today, Maybe tomorrow when there is a VirtualODB 
JsonOdb class in ROOTANA. The requires JSON parser is already part of MIDAS (mjson.h/mjson.cxx).

ELOG V3.1.4-2e1708b5