Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  17 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
    Reply  17 Sep 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
       Reply  18 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
          Reply  18 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
             Reply  22 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
                Reply  22 Sep 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
                   Reply  22 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
                Reply  26 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
          Reply  22 Sep 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
             Reply  22 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
Message ID: 3085     Entry time: 22 Sep 2025     In reply to: 3082
Author: Stefan Ritt 
Topic: Suggestion 
Subject: Get manalyzer to configure midas::odb when running offline 
> > I will work today on the odbxx API to make sure there are no memory leaks when you switch form one file to another. I talked to KO so he agreed that yo then commit your proposed change of manalyzer 
> 
> That, and add a "clear()" method that resets odbxx state to "empty". I will call odbxx.clear() everywhere where I call "delete fOdb;" (TARunInfo::dtor and other places).

No need for clear(), since no memory gets allocated by midas::odd::set_odb_source(). All it does is to remember the file name. When you instantiate a midas::odd object, the file gets loaded, and the midas::odd object gets initialized from the file contents. Then the buffer 
gets deleted (actually it's a simple local variable). Of course this causes some overhead (each midas::odd() constructor reads the whole file), but since the OS will cache the file, it's probably not so bad.

Stefan
ELOG V3.1.4-2e1708b5