Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  21 May 2026, Konstantin Olchanski, Bug Report, incompatible ODB XML dumps 
    Reply  09 Jun 2026, Stefan Ritt, Bug Report, incompatible ODB XML dumps 
Message ID: 3232     Entry time: 09 Jun 2026     In reply to: 3224
Author: Stefan Ritt 
Topic: Bug Report 
Subject: incompatible ODB XML dumps 
I fixed that by not requiring the handle explicitly:

           if (mxml_get_attribute(node, "handle") != nullptr)
              o->set_hkey(std::stoi(std::string(mxml_get_attribute(node, "handle"))));

The reason for the handle is the following: If you attach an midas::odb object to a very large subtree of the ODB, this can take very long since each
ODB element requires a few RPC roundtrips. In Mu3e, this took up to one minute. 

To overcome the problem, we can initialize an midas::odb object remotely via an XML tree. The server creates a huge XML object, sends it over
a single RPC command, and the client re-creates the midas::odb tree from the XML object. Since each online midas::odb need the ODB handle for
watch functions etc. the handle got added to the XML file.

For a XML file, this makes no sense of course, so now it's optional with the code change above.

P.S.: The odbxx code does not core dump, it just produces an error which looks like core dump. This is an uncaught exception. Normal exceptions
just abort the program without much information. The odbxx exceptions add a stack dump if available on that OS. That makes it easier to debug.
If you do not want the abort, catch the exception. 

Stefan
ELOG V3.1.4-2e1708b5