| ID |
Date |
Author |
Topic |
Subject |
|
3096
|
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().
>
> but seems unavailable on U-20 and older, requires --std=c++20 on U-24 and MacOS.
agreed! - availability is significantly more important. -- regards, Pasha |
|
3098
|
24 Sep 2025 |
Andreas Suter | Info | obsolete mana.c removal |
Sorry,
I have had now the time to dig deeper in our code and realized that we actually use rmana, i.e. WITH ROOT. If there is an easy way to incorporate the necessary parts temporarily to our side, we will do it. Without ROOT this would have been quite easy, with ROOT, I am not that sure. Anyhow, as said the timeline for this is only until end of 2026.
Andreas
> > Hi, at the LEM Experiment at PSI, we still use mana.c and would like to keep it until end of 2026, where we will enter a long shutdown.
>
> Excellent, good to hear from you! Once we remove ROOT support rmana.o will be gone, only mana.o (no ROOT) will remain. Will this break your builds?
>
> One solution could be to copy mana.c from MIDAS into your source tree and compile/link it from there (not from MIDAS).
>
> Perhaps the way to proceed is create a test branch with ROOT and mana.c removed, you can try it,
> report success/fail and we go from there.
>
> We should schedule this work for when both of us have a block of free time to work on it.
>
> K.O. |
|
3108
|
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.
There was one suggestion to use std::format available in c++20 (MIDAS has very similar msprintf()).
We shall move forward with this change.
K.O. |
|
3109
|
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.
there was a request to keep rmana.
We shall move forward with this:
- remove all the HAVE_ROOT code from mlogger.cxx
- for now, keep HAVE_ROOT in CMakefile (HAVE_ROOT was removed from Makefile a long time ago)
- for now, keep rmana
- look into moving rmana to a separate package or a separate subdirectory and keep maximum compatibility
with existing make files.
K.O.
> 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.
>
> Following discussions at the MIDAS Workshop, we think we should finally bite the bullet and remove ROOT
> support from MIDAS:
>
> - remove support for writing data in ROOT TTree format in mlogger (rmlogger)
> - remove support for ROOT in mana.c based analyzer (which itself we propose to remove)
> - remove ROOT helper functions in rmidas.h
> - remove ROOT support in cmake
> - remove rmlogger and rmana
>
> This change will not affect the rootana and manalyzer packages, they will continue to be built with
> ROOT support if ROOT is available.
>
> Right now, we cannot remember any experiment that uses the ROOT TTree output function in mlogger.
>
> If you use this feature, we very much would like to hear from you. Please contact Stefan or myself or
> reply to this message.
>
> As replacement for rmlogger, we could implement identical or similar functionality using an manalyzer-
> based custom logger, but we need at least one user who can test it for us and confirm that it works
> correctly.
>
> K.O. |
|
3110
|
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).
Reports from clang-tidy are somewhat repetitive (complain about the same class of
non-problem problems repeatedly), but several warnings and errors identified real
bugs.
Specifically, detection of memory leaks in error paths and detection of NULL
pointer dereference and use of uninitialized variables is pretty solid.
Fixes for the worst problems reported by cppcheck and clang-tidy are already
committed to midas git.
K.O. |
|
3111
|
10 Nov 2025 |
Konstantin Olchanski | Info | db_delete_key(TRUE) |
> I would handle this actually like symbolic links are handled under linux. If you delete a symbolic link, the link gets
> detected and NOT the file the link is pointing to.
>
> So I conclude that the "follow links" is a misconception and should be removed.
I am finally writing test code for the ODB API, partially to discover what db_delete_key(TRUE) actually does,
because when I went ahead to remove it, I found that it's use is inconsistent. And indeed
it does strange and unexpected things, I will proceed with removing it.
K.O. |
|
3123
|
20 Nov 2025 |
Konstantin Olchanski | Info | db_delete_key(TRUE) |
> > I would handle this actually like symbolic links are handled under linux. If you delete a symbolic link, the link gets
> > detected and NOT the file the link is pointing to.
> >
> > So I conclude that the "follow links" is a misconception and should be removed.
>
> I am finally writing test code for the ODB API, partially to discover what db_delete_key(TRUE) actually does,
> because when I went ahead to remove it, I found that it's use is inconsistent. And indeed
> it does strange and unexpected things, I will proceed with removing it.
>
this is now merged into develop. there will be deprecation warnings from mvodb and from midas_c_compat, I and Ben will clean
them up, just not today.
for more detail, see separate message.
K.O. |
|
3125
|
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.
It is done. Last c++11 MIDAS is midas-2025-11-a (plus the db_delete_key merge).
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.
K.O. |
|
3126
|
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,
untouched.
last rmlogger is in MIDAS tagged midas-2025-11-a.
K.O. |
|
3128
|
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.
Does adding
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Get it to do the right thing?
Cheers,
Nick.. |
|
3131
|
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.
520 ~/git/cppcheck/build/bin/cppcheck src/midas.cxx
523 ~/git/cppcheck/build/bin/cppcheck manalyzer/manalyzer.cxx manalyzer/mjsroot.cxx
524 ~/git/cppcheck/build/bin/cppcheck src/tmfe.cxx
525 ~/git/cppcheck/build/bin/cppcheck midasio/*.cxx
526 ~/git/cppcheck/build/bin/cppcheck mjson/*.cxx
K.O. |
|
3133
|
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.
>
> It is done. Last c++11 MIDAS is midas-2025-11-a (plus the db_delete_key merge).
>
> 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.
>
> K.O.
We should either use
set(CMAKE_CSS_STANDARD 17)
or
target_compile_features(<target> PUBLIC cxx_std_17)
but not mix both. We have already the second one for the midas library, like
target_compile_features(objlib PUBLIC cxx_std_17)
which correctly causes a
c++ -std=gnu++17 ...
(at leas in my case).
If the compiler flag is missing for a target, we should add the target_compile_feature above for that target.
Stefan |
|
3140
|
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.
>
> set(CMAKE_CXX_STANDARD 17)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
>
We used to have this, it is not there now.
>
> Get it to do the right thing?
>
Unlikely, as Stefan reported, asking for C++17 yields -std=gnu++17 which is close enough, but not the same
thing.
For now, it does not matter, U-22 and U-24 are c++17 by default, if somebody accidentally commits c++20
code, builds will fail and somebody will catch it and complain, plus the weekly bitbucket build will bomb-
out.
On U-20, default is c++14 and builds will start bombing out as soon as we commit some c++17 code.
el7 builds have not worked for some time now (a bizarre mysterious error)
el8, el9, el10 likely same situation as Ubuntu.
macos, not sure.
K.O. |
|
3141
|
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 ...
I think this is set in a couple of places, yet I do not see any -std=xxx flag passed to the compiler.
(and I am not keen on spending a full day fighting cmake)
(btw, -std=c++17 and -std=gnu++17 are not the same thing, I am not sure how well GNU extensions are supported on
macos)
K.O. |
|
3144
|
26 Nov 2025 |
Stefan Ritt | Info | switch midas to c++17 |
I switched from
target_compile_features(<target> PUBLIC css_std_17)
to
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) # optional: disables GNU extensions
Which is now global in the CMakeLists.txt, so we only have to deal with one location if we want to change it. It also turns off the g++ options. On my
Mac I get now a clean
-std=c++17
Please everybody test on your side. Change is committed.
Stefan |
|
3154
|
27 Nov 2025 |
Konstantin Olchanski | Info | switch midas to c++17 |
>
> set(CMAKE_CXX_STANDARD 17)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> set(CMAKE_CXX_EXTENSIONS OFF) # optional: disables GNU extensions
>
Looks like it works, I see -std=c++17 everywhere. Added same to manalyzer and mscb (mscb was still c++11).
Build on U-20 works (g++ accepts -std=c++17), build on CentOS-7 bombs, cmake 3.17.5 does not know CXX17.
K.O. |
|
146
|
28 Sep 2004 |
Piotr Zolnierczuk | Forum | MIDAS/MVME167/Linux |
Hi,
has anyone tried runnning midas frontend on a Linux running
on a Motorola MVME167 motorola embedded CPU?
I have seen people running Linux on a MV167
(http://www.sleepie.demon.co.uk/linuxvme/)
so in principle this can be done.
The reason I am asking is that we have a lot of them in house
and we would like to avoid paying for VxWorks
(I have succesfully run Midas on a mvme167/VxWorks node)
Or maybe one has come up with a much better solution
[short of dumping mv167 into a sewer :)]
Piotr |
|
172
|
04 Nov 2004 |
Jan Wouters | Forum | Frontend code and the ODB |
I would like to know whether all parameters used by the frontend code have to be in the "Experiment/
Run Parameters" section. This section can become big and difficult to maintain, because it is one single
big section of experim.h (EXP_PARAM_DEFINED). I have parameters the various frontends read at the
beginning of each run, which set the hardware settings of various devices. I would like to place these in
a section all their own, organized by device. Is this doable? |
|
173
|
04 Nov 2004 |
Stefan Ritt | Forum | Frontend code and the ODB |
Hi Jan,
I usually keep under /Experiment/Run Parameters only those settings which are kind of "global" and thus of
interest to frontend *and* analyzer, like a run mode (data/calibration/cosmic/...). Settings more specific to a
frontend I keep under /Equipment/<name>/Settings where <name> is the equipment name the specific frontend
produces. In your case each frontend will then get its own tree (related to each fragment). Please note that
both discussed trees can contain a whole tree with subdirectories, which lets you organize your data better.
Best regards, Stefan. |
|
176
|
25 Nov 2004 |
chris pearson | Forum | use of assert in mhttpd |
We've had mhttpd aborting regularly since upgrading from midas-1.9.3. This
happens during elog queries, and is due to an elog file that was incorrectly
modified by hand. The modification to the file occurred 6 months ago.
el_retrieve(midas.c:15683) now has several assert statements, one of which
aborts the program on reading the bad entry.
Why is assert used, instead of an error return from the function (if
necessary), and maybe an error message in the log file? Assert statements are
often removed, using NDEBUG, for normal use.
Chris
The problem elog entry had one character removed, so end-of-file came before
the end of the message. This could probably occur without the file being
altered, if the disk containing the elog fills. |