24 May 2025, Pavel Murat, Info, ROOT scripting for MIDAS seems to work pretty much out of the box
|
Dear All,
I'm pretty sure many know this already, however I found this feature by a an accident
and want to share with those who don't know about it yet - seems very useful.
- it looks that one can use ROOT scripting with rootcling and call from the
interactive ROOT prompt any function defined in midas.h and access ODB seemingly
WITHOUT DOING anything special
- more surprisingly, that also works for odbxx, with one minor exception in handling
the 64-bit types - the proof is in attachment. The script test_odbxx.C loaded
interactively is Stefan's
https://bitbucket.org/tmidas/midas/src/develop/examples/odbxx/odbxx_test.cxx
with one minor change - the line
o[Int64 Key] = -1LL;
is replaced with
int64_t x = -1LL;
o["Int64 Key"] = x;
- apparently the interpeter has its limitations.
My rootlogon.C file doesn't load any libraries, it only defines the appropriate
include paths. So it seems that everything works pretty much out of the box.
One issue has surfaced however. All that worked despite my experiment
had its name="test_025", while the example specifies experiment="test".
Is it possible that that only first 4 characters are being tested ?
-- regards, Pasha |
03 Jun 2025, Thomas Lindner, Info, MIDAS workshop (online) Sept 22-23, 2025
|
Dear all,
We have setup an indico page for the MIDAS workshop on Sept 22-23. The page is here
https://indico.psi.ch/event/17580/overview
As I mentioned, we are keen to hear reports from any users or developers; we want to hear
how MIDAS is working for you and what improvements you would like to see. If you or your
experiment would like to give a talk about your MIDAS experiences then please submit an
abstract through the indico page.
Also, feel free to also register for the workshop (no fees). Registration is not
mandatory, but it would be useful for us to have an idea how many people will connect.
Thanks,
Thomas
> Dear MIDAS enthusiasts,
>
> We are planning a fifth MIDAS workshop, following on from previous successful
> workshops in 2015, 2017, 2019 and 2023. The goals of the workshop include:
>
> - Getting updates from MIDAS developers on new features, bug fixes and planned
> changes.
> - Getting reports from MIDAS users on how they are using MIDAS and what problems
> they are facing.
> - Making plans for future MIDAS changes and improvements
>
> We are planning to have an online workshop on Sept 22-23, 2025 (it will coincide
> with a visit of Stefan to TRIUMF). We are tentatively planning to have a four
> hour session on each day, with the sessions timed for morning in Vancouver and
> afternoon/evening in Europe. Sorry, the sessions are likely to again not be well
> timed for our colleagues in Asia.
>
> We will provide exact times and more details closer to the date. But I hope
> people can mark the dates in their calendars; we are keen to hear from as much of
> the MIDAS community as possible.
>
> Best Regards,
> Thomas Lindner |
10 Jun 2025, Amy Roberts, Info, use of modified image showing MIDAS data format?
|
Hello, I'm currently writing a paper about making a dataset publicly available
from the University of Minnesota and it's a MIDAS dataset.
I'd like to use an image that shows the MIDAS data format (that's been slightly
modified to fit in the paper) and am wondering (1) if I could get permission to do
so and (2) what the preferred attribution would be. |
10 Jun 2025, Stefan Ritt, Info, use of modified image showing MIDAS data format?
|
> Hello, I'm currently writing a paper about making a dataset publicly available
> from the University of Minnesota and it's a MIDAS dataset.
>
> I'd like to use an image that shows the MIDAS data format (that's been slightly
> modified to fit in the paper) and am wondering (1) if I could get permission to do
> so and (2) what the preferred attribution would be.
Feel free to use whatever you like, the documentation is on the same open source license as midas itself.
Stefan |
10 Jun 2025, Stefan Ritt, Info, History configuration changed
|
Today the way the history system is configured has changed. Whenever one adds new equipment
variables, the logger has to add that variable to the history system. Previously, this happened during
startup of the logger and at run start. We have now a case in the Mu3e experiment where we have many
variables and the history configuration takes about 15 seconds, which delays data taking considerably.
After discussion with KO we decided to remove the history re-configuration at run start. This speeds up
the run start considerably, also for other experiments with many history variables. It means however that
once you add/remove/rename any equipment variable going into the history system, you have to restart the
logger for this to become active.
https://bitbucket.org/tmidas/midas/commits/c0a14c2d0166feb6b38c645947f2c5e0bef013d5
Stefan |
11 Jun 2025, Stefan Ritt, Info, Frontend write cache size
|
We had issues with the frontend write cache size and the way it was implemented in the frontend
framework mfe. Specifically, we had two equipments like in the experiment/examples/frontend.cxx, one
trigger event and one periodic event. While the trigger event sets the cache size correctly in the
equipment table, the periodic event (defined afterwards) overwrites the cache size to zero, causing slow
data taking.
The underlying problem is that one event buffer (usually "SYSTEM") can only have one cache size for all
events in one frontend. To avoid mishaps like that, I remove the write cache size from the equipment table
and instead defined a function which explicitly sets the cache size for a buffer. In your frontend_init() you
can now call
set_cache_size("SYSTEM", 10000000);
to set the cache size of the SYSTEM buffer. Note that 10 MiB is the minimum cache size. Especially for
smaller events, this dramatically can speed up your maximal DAQ rate.
Full commit is here:
https://bitbucket.org/tmidas/midas/commits/24fbf2c02037ae5f7db74d0cadab23cd4bfe3b13
Note that this only affects frontends using the mfe framework, NOT for those using the tmfe framework.
Stefan |
13 Jul 2025, Zaher Salman, Info, PySequencer
|
As many of you already know Ben introduced the new PySequencer that allows running python scripts from MIDAS. In the last couple of month we have been working on integrating it into the MIDAS pages. We think that it is now ready for general testing.
To use the PySequencer:
1- Enable it from /Experiment/Menu
2- Refresh the pages to see a new PySequencer menu item
3- Click on it to start writing and executing your python script.
The look and feel are identical to the msequencer pages (both use the same JavaScript code).
Please report problems and bug here.
Known issues:
The first time you start the PySequencer program it may fail. To fix this copy:
$MIDASSYS/python/examples/pysequencer_script_basic.py
to
online/userfiles/sequencer/
and set /PySequencer/State/Filename to pysequencer_script_basic.py |
08 Sep 2025, Thomas Lindner, Info, MIDAS workshop (online) Sept 22-23, 2025
|
Dear all,
A reminder we will have our MIDAS workshop starting two weeks from today (Sept 22-23). The
meeting will be in the morning in Vancouver, evening in Europe. A detailed schedule is available
here
https://indico.psi.ch/event/17580/timetable/#20250922.detailed
The zoom link is available from the indico overview page. The schedule will allow for a fair bit
of discussion time, so it is unlikely that talks will start exactly on time.
Looking forward to seeing people there.
Thomas
> Dear all,
>
> We have setup an indico page for the MIDAS workshop on Sept 22-23. The page is here
>
> https://indico.psi.ch/event/17580/overview
>
> As I mentioned, we are keen to hear reports from any users or developers; we want to hear
> how MIDAS is working for you and what improvements you would like to see. If you or your
> experiment would like to give a talk about your MIDAS experiences then please submit an
> abstract through the indico page.
>
> Also, feel free to also register for the workshop (no fees). Registration is not
> mandatory, but it would be useful for us to have an idea how many people will connect.
>
> Thanks,
> Thomas
>
>
> > Dear MIDAS enthusiasts,
> >
> > We are planning a fifth MIDAS workshop, following on from previous successful
> > workshops in 2015, 2017, 2019 and 2023. The goals of the workshop include:
> >
> > - Getting updates from MIDAS developers on new features, bug fixes and planned
> > changes.
> > - Getting reports from MIDAS users on how they are using MIDAS and what problems
> > they are facing.
> > - Making plans for future MIDAS changes and improvements
> >
> > We are planning to have an online workshop on Sept 22-23, 2025 (it will coincide
> > with a visit of Stefan to TRIUMF). We are tentatively planning to have a four
> > hour session on each day, with the sessions timed for morning in Vancouver and
> > afternoon/evening in Europe. Sorry, the sessions are likely to again not be well
> > timed for our colleagues in Asia.
> >
> > We will provide exact times and more details closer to the date. But I hope
> > people can mark the dates in their calendars; we are keen to hear from as much of
> > the MIDAS community as possible.
> >
> > Best Regards,
> > Thomas Lindner |
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 |
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? |
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. |
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. |
14 Dec 2004, Konstantin Olchanski, 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.
(sorry for delayed reply, for reasons unknown, I did not get an email notice when this was posted)
Yes, I agree, error handling in midas elog code is insufficient (note missing error checks for
read() and lseek() system calls). Anything but "perfect" elog files would cause funny errors and
malfunctions.
> 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.
I added those to fix problems with "broken last NN days" and with infinite looping in the elog code
that we observed in TWIST.
You are welcome to replace the assert() statements with proper error handling. I used to have some code
that could report the filename of the bad elog file. Can we also report the exact file location for broken
files.
Please send me the diff, I will commit it to midas cvs.
> 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.
I use assert() in several ways:
0) I want a core dump each time X happens. (This is the only reasonable action when facing memory/stack
corruption. The problems in the elog code were stack corruption).
1) "I am too lazy to write proper error handling code" so I just crash and burn. This includes the
case where "proper error handling" would be "too invasive".
2) the error is too bad (or too deep) and there is no reasonable way to recover. Print an error message
and dump core (for later analysis). I sometimes use "cm_msg(); abort()". (assert is "printf("error"); abort()")
Please refer to literature for philosophic discussions on uses of assert() (Argh! Stefan will have my
head again!), but I will mention that "abort() early, abort() often" I find very effective. BTW, this technique
is heavily used in the Linux kernel (oops(), bug(), panic()) with some good effect, too.
> 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.
Yes, I think you are right. In TWIST, we have seen disk-full conditions break both elog and history.
K.O. |
14 Dec 2004, Jan Wouters, Forum, Frontend index
|
What is the api call to determine the index of the frontend when specifying the
-i parameter during execution of the frontend? |
15 Dec 2004, Stefan Ritt, Forum, Frontend index
|
> What is the api call to determine the index of the frontend when specifying the
> -i parameter during execution of the frontend?
INT get_frontend_index();
- Stefan |
15 Dec 2004, , Forum, Where's the definition of "H1_BOOK()"
|
When i compile the experiment example of 1.9.5 the problem happened:
adccalib.c: In function `INT adc_calib_init()':
adccalib.c:114: `H1_BOOK' undeclared (first use this function)
adccalib.c:114: (Each undeclared identifier is reported only once for each
function it appears in.)
make: *** [adccalib.o] Error 1
my ROOT is 4.01 and Zlib is 1.2.2 |
15 Dec 2004, Pierre-Andre Amaudruz, Forum, Where's the definition of "H1_BOOK()"
|
> When i compile the experiment example of 1.9.5 the problem happened:
>
> adccalib.c: In function `INT adc_calib_init()':
> adccalib.c:114: `H1_BOOK' undeclared (first use this function)
> adccalib.c:114: (Each undeclared identifier is reported only once for each
> function it appears in.)
> make: *** [adccalib.o] Error 1
>
> my ROOT is 4.01 and Zlib is 1.2.2
We're in the process of fixing in the proper manner this problem, in the mean time
please add to the analyzer makefile the definition: -DUSE_ROOT at the line:
...
ROOTCFLAGS += -DHAVE_ROOT -DUSE_ROOT |
16 Dec 2004, Jan Wouters, Forum, cm_msg
|
Could someone please explain to me how cm_msg, cm_msg1, etc. all work. The
documentation is very terse.
I want to setup a fairly significant set of debugging, and error messages for a
new frontend. I need to get these messages to a logging file. I also would
like to get the error messages to the user through whatever interface Midas
normally uses for error reporting.
Jan |
22 Dec 2004, Stefan Ritt, Forum, cm_msg
|
> Could someone please explain to me how cm_msg, cm_msg1, etc. all work. The
> documentation is very terse.
>
> I want to setup a fairly significant set of debugging, and error messages for a
> new frontend. I need to get these messages to a logging file. I also would
> like to get the error messages to the user through whatever interface Midas
> normally uses for error reporting.
For errors, use
cm_msg(MERROR, "routine_name", "Your error message, code=%d", i);
This produces an error message which is logged to midas.log, and distributed to all
clients which have called cm_msg_register(). For example odbedit will just print
that message. The syntax of the second half of cm_msg is the same as for printf(),
so you can add format specifiers and variable arguments as you do for printf(). The
first argument is the message type (MDEBUG for example is only distributed but not
logged).
For a more detailed list of message types, please refer to
http://midas.triumf.ca/doc/html/AppendixE.html#midas_macro |
11 Jul 2006, Razvan Stefan Gornea, Forum, Tundra Universe CA91C042
|
I am not using Midas but I need some help from somebody experienced with VME access using the Tundra Universe, so I thought here I have a chance ...
I have a GE Fanuc 7700 and use the vme_universe driver (ver. 3.3). In the past I programed for a DAQ board using A24/D16. Now I have a new board using A24/MB and I am really last!
So the board has some 64-bit registers and some 32-bit registers (all aligned on 64-bit) and a FIFO to read the main data. After reading the user manual for universe chip and the docs for the driver I am still confused about how things are supposed to work.
First my understanding is that for reading 64-bit I need anyway the multiplex block mode. But nowhere I could find if the multiplex mode supports 32-bit transfers. Should I map two windows on the same VME address range, one for A24/D32 and one for A24/MB? Or read everything with an unsigned long long and cast to unsigned int all 32-bit registers?
Second I don't know how to handle the FIFO which is in the middle of the address range. When the board has a trigger I have to read more than 100000 times this FIFO. If I simply read at the FIFO address 100000 times do I get the VME multiplex block mode (if the window has been mapped with A24/MB address modifier)? How does the chip/driver know not to send the address and just do the data cycle after the first read?
I also had the naive idea to have a master window mapped on the board address range to access all the registers except the FIFO and to create a DMA buffer for the FIFO (FIFO readout is where most of the work is anyway so I guess an advantage is that will free the CPU) but it seems to me that the dma_transfer function in the kernel module increments the address. I don't dare change this since I don't even understand the exact relationship between accesses to the mapped window and what's happening on the VME bus.
Thanks for any help! |
|