Back Midas Rome Roody Rootana
  Midas DAQ System, Page 1 of 51  Not logged in ELOG logo
Entry  08 Dec 2025, Konstantin Olchanski, Bug Report, odbxx memory leak with JSON ODB dump 
I was testing odbxx with manalyzer, decided to print an odb value in every event, 
and it worked fine in online mode, but bombed out when running from a data file 
(JSON ODB dump). The following code has a memory leak. No idea if XML ODB dump 
    Reply  09 Dec 2025, Stefan Ritt, Bug Report, odbxx memory leak with JSON ODB dump 
Thanks for reporting this. It was caused by a

  MJsonNode* node = MJsonNode::Parse(str.c_str());
       Reply  09 Dec 2025, Konstantin Olchanski, Bug Report, odbxx memory leak with JSON ODB dump 
> Thanks for reporting this. It was caused by a

>   MJsonNode* node = MJsonNode::Parse(str.c_str());
          Reply  10 Dec 2025, Stefan Ritt, Bug Report, odbxx memory leak with JSON ODB dump 
> BTW, it looks like we are parsing the whole JSON ODB dump (200k+) on every odbxx access. Can you parse it just once?

You are right. I changed the code so that the dump is only parsed once. Please give it a try.
Entry  09 Dec 2025, Mark Grimes, Bug Report, manalyzer fails to compile on some systems because of missing #include <cmath> 
Hi,
We're getting errors in our build system like:
    Reply  09 Dec 2025, Konstantin Olchanski, Bug Report, manalyzer fails to compile on some systems because of missing #include <cmath> 
> /code/midas/manalyzer/manalyzer.cxx:799:27: error: ‘pow’ was not declared in this scope
>   799 |       bins[i] = TimeRange*pow(1.1,i)/pow(1.1,Nbins);
Entry  19 May 2025, Jonas A. Krieger, Suggestion, manalyzer root output file with custom filename including run number 
Hi all,

Would it be possible to extend manalyzer to support custom .root file names that include the run number? 
    Reply  12 Nov 2025, Jonas A. Krieger, Suggestion, manalyzer root output file with custom filename including run number 
Hi all,

Could you please get back to me about whether something like my earlier suggestion might be considered, or if I should set up some workaround to rename
       Reply  25 Nov 2025, Konstantin Olchanski, Suggestion, manalyzer root output file with custom filename including run number 
Hi, Jonas, thank you for reminding me about this. I hope to work on manalyzer in the next few weeks and I will review the ROOT output file name scheme.

K.O.
          Reply  08 Dec 2025, Konstantin Olchanski, Suggestion, manalyzer root output file with custom filename including run number 
I updated the root helper constructor to give the user more control over ROOT output file names.

You can now change it to anything you want in the module run constructor, see manalyzer_example_esoteric.cxx
Entry  17 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
Hi,
Lots of users like the midas::odb interface for reading from the ODB in manalyzers. It currently doesn't 
work offline however without a few manual lines to tell midas::odb to read from the ODB copy in the run 
    Reply  17 Sep 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
> Lots of users like the midas::odb interface for reading from the ODB in manalyzers.
> +#include "odbxx.h"
       Reply  18 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
> ....Before commit of this patch, can you confirm the RunInfo destructor
> deletes this ODB stuff from odbxx? manalyzer takes object life times very seriously.
          Reply  18 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
> > Of course with this patch extending manalyzer to process two or more runs at the same time becomes impossible.

> Yes, I hadn't realised that was an option. For that to work I guess the aforementioned static members could be made thread local storage, and 
             Reply  22 Sep 2025, Stefan Ritt, Suggestion, 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 
                Reply  22 Sep 2025, Konstantin Olchanski, Suggestion, 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 
                   Reply  22 Sep 2025, Stefan Ritt, Suggestion, 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 
                Reply  26 Sep 2025, Mark Grimes, Suggestion, Get manalyzer to configure midas::odb when running offline 
> ...I talked to KO so he agreed that yo then commit your proposed change of manalyzer 

Merged and pushed.
          Reply  22 Sep 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
> > ....Before commit of this patch, can you confirm the RunInfo destructor
> > deletes this ODB stuff from odbxx? manalyzer takes object life times very seriously.
             Reply  22 Sep 2025, Stefan Ritt, Suggestion, Get manalyzer to configure midas::odb when running offline 
> > > Of course with this patch extending manalyzer to process two or more runs at the same time becomes impossible.
> > Yes, I hadn't realised that was an option.
    Reply  07 Dec 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
>  #include "manalyzer.h"
>  #include "midasio.h"
> +#include "odbxx.h"
       Reply  08 Dec 2025, Konstantin Olchanski, Suggestion, Get manalyzer to configure midas::odb when running offline 
> >  #include "manalyzer.h"
> >  #include "midasio.h"
> > +#include "odbxx.h"
Entry  26 Nov 2025, Lars Martin, Bug Report, Error(?) in custom page documentation 
https://daq00.triumf.ca/MidasWiki/index.php/Custom_Page#modb

says that
    Reply  27 Nov 2025, Stefan Ritt, Bug Report, Error(?) in custom page documentation 
Indeed a bug. Fixed in commit

https://bitbucket.org/tmidas/midas/commits/5c1133df073f493d74d1fc4c03fbcfe80a3edae4
       Reply  27 Nov 2025, Zaher Salman, Bug Report, Error(?) in custom page documentation 
This commit breaks the sequencer pages...

> Indeed a bug. Fixed in commit
          Reply  27 Nov 2025, Konstantin Olchanski, Bug Report, Error(?) in custom page documentation 
the double-decode bug strikes again!

> This commit breaks the sequencer pages...
          Reply  08 Dec 2025, Zaher Salman, Bug Report, Error(?) in custom page documentation 
The sequencer pages were adjusted to the work with this bug fix.

> This commit breaks the sequencer pages...
Entry  05 Dec 2025, Konstantin Olchanski, Info, address and thread sanitizers 
I added cmake support for the thread sanitizer (address sanitizer was already 
there). Use:
Entry  05 Dec 2025, Konstantin Olchanski, Bug Fix, update of JRPC and BRPC 
With the merge of RPC_CXX code, MIDAS RPC can now return data of arbitrary large size and I am 
proceeding to update the corresponding mjsonrpc interface.
Entry  24 Apr 2024, Konstantin Olchanski, Info, MIDAS RPC add support for std::string and std::vector<char> 
I now fully understand the MIDAS RPC code, had to add some debugging printfs, 
write some test code (odbedit test_rpc), catch and fix a few bugs.
    Reply  29 May 2024, Konstantin Olchanski, Info, MIDAS RPC add support for std::string and std::vector<char> 
This is moving slowly. I now have RPC caller side support for std::string and 
std::vector<char>. RPC server side is next. K.O.
       Reply  01 Dec 2025, Konstantin Olchanski, Info, MIDAS RPC add support for std::string and std::vector<char> 
> This is moving slowly. I now have RPC caller side support for std::string and 
> std::vector<char>. RPC server side is next. K.O.
          Reply  05 Dec 2025, Konstantin Olchanski, Info, MIDAS RPC add support for std::string and std::vector<char> 
> > This is moving slowly. I now have RPC caller side support for std::string and 
> > std::vector<char>. RPC server side is next. K.O.
> The RPC_CXX code is now merged into MIDAS branch feature/rpc_call_cxx.
Entry  24 Sep 2025, Thomas Lindner, Suggestion, Improve process for adding new variables that can be shown in history plots 
Documenting a discussion I had with Konstantin a while ago.

One aspect of the MIDAS history plotting I find frustrating is the sequence for adding a new history 
    Reply  25 Nov 2025, Konstantin Olchanski, Suggestion, Improve process for adding new variables that can be shown in history plots 
> One aspect of the MIDAS history plotting I find frustrating is the sequence for adding a new history 
> variable and then plotting them. ...
       Reply  26 Nov 2025, Thomas Lindner, Suggestion, Improve process for adding new variables that can be shown in history plots 

> 3) mlogger must discover this new ODB entry:
          Reply  27 Nov 2025, Stefan Ritt, Suggestion, Improve process for adding new variables that can be shown in history plots 
> I assume that mlogger rescanning ODB is somewhat intensive process; and that's why we don't want rescanning to 
> happen every time the ODB is changed?
             Reply  27 Nov 2025, Konstantin Olchanski, Suggestion, Improve process for adding new variables that can be shown in history plots 
> > I assume that mlogger rescanning ODB is somewhat intensive process; and that's why we don't want rescanning to 
> > happen every time the ODB is changed?
                Reply  27 Nov 2025, Thomas Lindner, Suggestion, Improve process for adding new variables that can be shown in history plots 
> > Indeed. But whatever "new" we design for the scan will users complain "last week it was enough to restart the logger, now what do I have to do". So
nothing 
> > is perfect. But having a button in the ODB editor like "Rebuild history database" might look more elegant. One issue is that it needs special treatment,
                Reply  27 Nov 2025, Stefan Ritt, Suggestion, Improve process for adding new variables that can be shown in history plots 
> 1) history is independent from "runs", we see a change, we apply it (even if it takes 10 sec or 2 minutes).

> 2) "nothing should change during a run", we must process all changes before we start a run (starting a run takes forever),
       Reply  03 Dec 2025, Konstantin Olchanski, Suggestion, Improve process for adding new variables that can be shown in history plots 
> 3b) mlogger used to rescan ODB each time a new run is started, this code was removed

One more kink turned out.
          Reply  03 Dec 2025, Stefan Ritt, Suggestion, Improve process for adding new variables that can be shown in history plots 
> Now, mlogger just silently continues not writing to history. There is no ongoing error message, there is no 
> ongoing alarm, only sign of trouble is empty history plots and history files not growing.
Entry  03 Dec 2025, Konstantin Olchanski, Bug Fix, no more breakage in history display when panning 
In the DL experiment (unknown version of midas, likely mid-summer 2025), we see artefacts in the 
history display where pieces of the data seem to be missing, there is gaps in the graphs. reloading the 
page restores correct display confirming that in fact there is no gaps in the data. This made history 
Entry  02 Dec 2025, Konstantin Olchanski, Info, cm_expand_env() 
Just to remember, MIDAS has cm_expand_env() to expand environment variables, in 
file paths, etc. It is used in several places in mhttpd, msequencer and mjsonrpc.
Entry  01 Dec 2025, Konstantin Olchanski, Bug Fix, mvodb updated 
I updated mvodb and test_mvodb. MIDAS ODB and JSON ODB now implement all API 
functions. ReadKey, ReadDir and ReadKeyLastWritten were previously missing from 
some implementations.
Entry  26 Nov 2025, Lars Martin, Suggestion, mvodb WS and family type matching 
This is not a bug per se, but I find it a little odd that the MVOdb functions RS, 
RSA, RSAI, and WSA use std::string as their type, while WS ans WSAI use const 
char*
    Reply  27 Nov 2025, Konstantin Olchanski, Suggestion, mvodb WS and family type matching 
> This is not a bug per se, but I find it a little odd that the MVOdb functions RS, 
> RSA, RSAI, and WSA use std::string as their type, while WS ans WSAI use const 
> char*
       Reply  27 Nov 2025, Stefan Ritt, Suggestion, mvodb WS and family type matching 
> 2) "advanced" c++ code:

> void foo(const std::string& xxx) { ... };
          Reply  28 Nov 2025, Konstantin Olchanski, Suggestion, mvodb WS and family type matching 
> > 2) "advanced" c++ code:
> > 
> > void foo(const std::string& xxx) { ... };
             Reply  28 Nov 2025, Konstantin Olchanski, Suggestion, mvodb WS and family type matching 
Just in time, enter std::string_view.
https://stackoverflow.com/questions/40127965/how-exactly-is-stdstring-view-faster-than-const-stdstring
Entry  19 Nov 2025, Stefan Mathis, Forum, Control external process from inside MIDAS 
Dear all,

I want to control (start / stop / monitor its stdout and stderr) an external process (systemd / EPICS IOC shell script) from within MIDAS.
    Reply  19 Nov 2025, Nick Hastings, Forum, Control external process from inside MIDAS 
Hi,

what you describe is exactly how I normally run mhttpd, mlogger, mserver and some other
       Reply  20 Nov 2025, Stefan Mathis, Forum, Control external process from inside MIDAS 
Thanks a lot,

Nick. Regarding the messages: Zaher showed me that it is possible to simply place a custom log file generated by the systemd next to midas.log - then it
          Reply  20 Nov 2025, Nick Hastings, Forum, Control external process from inside MIDAS 
Hi,
 
> Nick. Regarding the messages: Zaher showed me that it is possible to simply place
             Reply  20 Nov 2025, Stefan Mathis, Forum, Control external process from inside MIDAS 
Hi,

unfortunately I don't have a documentation link to the feature, I just know that it works on my machine ;-) The general idea is that you place a custom
                Reply  24 Nov 2025, Stefan Ritt, Forum, Control external process from inside MIDAS 
Dear all,

Stefan wants to run an external EPICS driver process as a detached process and somehow "glue" it to midas to control it. Actually a
similar requirement led to the development of MIDAS in the '90s. We had too many configuration files lying around, to many process to control and interact
                   Reply  27 Nov 2025, Konstantin Olchanski, Forum, Control external process from inside MIDAS 
> Rather than investing time to re-invent the wheel here, better try to modify your EPICS driver process to 
become a midas process.
Entry  22 Sep 2025, Konstantin Olchanski, Info, switch midas to c++17 
Following discussions at the MIDAS workshop, we propose to move MIDAS from c++11 to c++17. There is 
many new features and we want to start using some of them.
    Reply  23 Sep 2025, Pavel Murat, Info, switch midas to c++17 
perhaps c++20? - std::format is an immediately useful feature. --regards, Pasha

> Following discussions at the MIDAS workshop, we propose to move MIDAS from c++11 to c++17. There is 
       Reply  23 Sep 2025, Konstantin Olchanski, Info, switch midas to c++17 
> perhaps c++20? - std::format is an immediately useful feature. --regards, Pasha

confirmed. std::format is an improvement over K&R C printf().
          Reply  23 Sep 2025, Pavel Murat, Info, switch midas to c++17 
> > perhaps c++20? - std::format is an immediately useful feature. --regards, Pasha

> confirmed. std::format is an improvement over K&R C printf().
    Reply  06 Nov 2025, Konstantin Olchanski, Info, switch midas to c++17 
> Following discussions at the MIDAS workshop, we propose to move MIDAS from c++11 to c++17.

There were no objections to this move.
       Reply  20 Nov 2025, Konstantin Olchanski, Info, switch midas to c++17 
> > Following discussions at the MIDAS workshop, we propose to move MIDAS from c++11 to c++17.
> We shall move forward with this change.
          Reply  20 Nov 2025, Nick Hastings, Info, switch midas to c++17 

> I notice the cmake does not actually pass "-std=c++17" to the c++ compiler, and on U-20, it is likely 
> the default c++14 is used. cmake always does the wrong thing and this will need to be fixed later.
             Reply  25 Nov 2025, Konstantin Olchanski, Info, switch midas to c++17 

> > I notice the cmake does not actually pass "-std=c++17" to the c++ compiler, and on U-20, it is likely 
> > the default c++14 is used. cmake always does the wrong thing and this will need to be fixed later.
          Reply  24 Nov 2025, Stefan Ritt, Info, switch midas to c++17 
> > > Following discussions at the MIDAS workshop, we propose to move MIDAS from c++11 to c++17.
> > We shall move forward with this change.
             Reply  25 Nov 2025, Konstantin Olchanski, Info, switch midas to c++17 
> target_compile_features(<target> PUBLIC cxx_std_17)
> which correctly causes a
> c++ -std=gnu++17 ...
                Reply  26 Nov 2025, Stefan Ritt, Info, switch midas to c++17 
I switched from 

  target_compile_features(<target> PUBLIC css_std_17)
                   Reply  27 Nov 2025, Konstantin Olchanski, Info, switch midas to c++17 

>   set(CMAKE_CXX_STANDARD 17)
>   set(CMAKE_CXX_STANDARD_REQUIRED ON)
Entry  21 Nov 2025, Scott Oser, Bug Report, Cannot edit values in a subtree containing only a single array of BOOLs using the ODB web interface 
I think I've found a bug in MIDAS ...

Description: If you have an ODB subtree that contains only an array of BOOLs, you cannot edit them from the ODB webpage, although you can change
    Reply  24 Nov 2025, Stefan Ritt, Bug Report, Cannot edit values in a subtree containing only a single array of BOOLs using the ODB web interface Screenshot_2025-11-24_at_15.32.12.png
Can you please update to the latest develop versiokn of midas, and clear your browser cache so that the updated JavaScript midas library is loaded. Should
be fixed by now. See attached screen shot where I changed every second value via the ODB editor.

Stefan
       Reply  24 Nov 2025, Scott Oser, Bug Report, Cannot edit values in a subtree containing only a single array of BOOLs using the ODB web interface 
 




Stefan
Ritt wrote:



Can you please update to the latest develop versiokn of midas, and clear
          Reply  25 Nov 2025, Konstantin Olchanski, Bug Report, Cannot edit values in a subtree containing only a single array of BOOLs using the ODB web interface 
> Thanks --- it looks like this commit resolves the issue for us ...
> Thanks to Ben Smith for pointing us at exactly the right commit
Entry  20 Nov 2025, Konstantin Olchanski, Bug Fix, ODB update, branch feature/db_delete_key merged into develop 
In the darkside vertical slice midas daq, we observed odb corruption which I 
traced to db_delete_key(). cause of corruption is not important. important is to 
have a robust odb where small corruption will stay localized and will not 
    Reply  25 Nov 2025, Stefan Ritt, Bug Fix, ODB update, branch feature/db_delete_key merged into develop 
Thanks for the fixes, which I all approve.

There is still a "follow_links" in midas_c_compat.h line 70 for Python. Probably Ben has to look into that. Also 
       Reply  25 Nov 2025, Konstantin Olchanski, Bug Fix, ODB update, branch feature/db_delete_key merged into develop 
> Thanks for the fixes, which I all approve.

> There is still a "follow_links" in midas_c_compat.h line 70 for Python. Probably Ben has to look into that. Also 
Entry  25 Nov 2025, Konstantin Olchanski, Bug Fix, fixed db_find_keys() 
Function db_find_keys() added by person unnamed in April 2020 never worked correctly, it is now fixed, 
repaired, also unsafe strcpy() replaced by mstrlcpy().
Entry  06 Nov 2025, Konstantin Olchanski, Info, make clang-tidy 
I added Makefile rules for running MIDAS through the clang-tidy static code 
analyzer. (rules for running cppcheck have gone missing, I hope I find them).
    Reply  21 Nov 2025, Konstantin Olchanski, Info, cppcheck 
> (rules for running cppcheck have gone missing, I hope I find them).

found them. I built cppcheck from sources.
Entry  22 Sep 2025, Konstantin Olchanski, Info, removal of ROOT support in mlogger 
Historically, building MIDAS with ROOT caused us many problems - build failures because of c++ version 
mismatch, CFLAGS mismatch; run-time failures because of ROOT library mismatches; etc, etc.
    Reply  06 Nov 2025, Konstantin Olchanski, Info, removal of ROOT support in mlogger 
> we should finally bite the bullet and remove ROOT support from MIDAS ...

there were no objections to removing ROOT support from mlogger.
       Reply  20 Nov 2025, Konstantin Olchanski, Info, removal of ROOT support in mlogger 
> > we should finally bite the bullet and remove ROOT support from MIDAS ...

as discussed, HAVE_ROOT and OBSOLETE were removed from mlogger. rmana and ROOT support in manalyzed remain, 
ELOG V3.1.4-2e1708b5