Back Midas Rome Roody Rootana
  Midas DAQ System, Page 63 of 160  Not logged in ELOG logo
ID Date Authordown Topic Subject
  3021   01 Apr 2025 Pavel MuratSuggestionSequencer ODBSET feature requests
 I once looked at using LUA for this,
> but I think basing off an full featured programming language like python
> is better.

if it came to a vote, my vote would go to Lua: it would allow to do everything needed, 
with much less external dependencies and with much less motivation to over-use the interpreter. 
The CMS experience was very teaching in this respect... 

-- my 2c, regards, Pasha
  3022   02 Apr 2025 Pavel MuratBug ReportMIDAS history system not using the event timestamps ?
> You can always include your "true" data timestamp as the first value in your data.

Are you saying that if the first data word of a history event were a timestamp, 
the MIDAS history system, when plotting the time dependencies, would use that timestamp 
instead of the mlogger timestamp?  

if that is true, what tells MIDAS that the first data word is the timestamp? 

I couldn't find a discussion of that on the page describing the history system - 

 https://daq00.triumf.ca/MidasWiki/index.php/History_System#Frontend_history_event

- perhaps I should be looking at a different page?

-- thanks again, regards, Pasha 
  3030   29 Apr 2025 Pavel MuratBug ReportODBXX : ODB links in the path names ?
Dear MIDAS experts,

does the ODBXX interface to ODB currently ODB links in the path names? - From what I see so far, it currently fails to do so,
but I could be doing something else wrong... 

-- thanks, regards, Pasha
  3032   30 Apr 2025 Pavel MuratInfoNew ODB++ API
it is a very convenient interface! Does it support the ODB links in the path names ? -- thanks, regards, Pasha
  3043   24 May 2025 Pavel MuratInfoROOT 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
Attachment 1: log.txt
mu2etrk@mu2edaq22:~/test_stand/daquser_001>root.exe
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.06                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on May 04 2025, 19:16:31                 |
  | From tags/6-32-06@6-32-06                                        |
  | With g++ (Spack GCC) 13.1.0                                      |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

05-24 23:26:22.397661                       MetricManager:31     INFO MetricManager(): MetricManager CONSTRUCTOR
root [0] .L test_odbxx.C 
root [1] main()
Delete key /Test/Settings not found in ODB
Created ODB key "/Test/Settings"
Created ODB key "/Test/Settings/Int32 Key"
Set ODB key "/Test/Settings/Int32 Key" = 42
Created ODB key "/Test/Settings/Bool Key"
Set ODB key "/Test/Settings/Bool Key" = true
Created ODB key "/Test/Settings/Subdir"
Created ODB key "/Test/Settings/Subdir/Int32 key"
Set ODB key "/Test/Settings/Subdir/Int32 key" = 123
Created ODB key "/Test/Settings/Subdir/Double Key"
Set ODB key "/Test/Settings/Subdir/Double Key" = 1.200000
Created ODB key "/Test/Settings/Subdir/Subsub"
Created ODB key "/Test/Settings/Subdir/Subsub/Float key"
Set ODB key "/Test/Settings/Subdir/Subsub/Float key" = 1.200000
Created ODB key "/Test/Settings/Subdir/Subsub/String Key"
Set ODB key "/Test/Settings/Subdir/Subsub/String Key" = "Hello"
Created ODB key "/Test/Settings/Int Array"
Set ODB key "/Test/Settings/Int Array[0...2]" = [1,2,3]
Created ODB key "/Test/Settings/Double Array"
Set ODB key "/Test/Settings/Double Array[0...2]" = [1.200000,2.300000,3.400000]
Created ODB key "/Test/Settings/String Array"
Set ODB key "/Test/Settings/String Array[0...2]" = ["Hello1","Hello2","Hello3"]
Created ODB key "/Test/Settings/Large Array"
Set ODB key "/Test/Settings/Large Array[0...9]" = [0,0,0,0,0,0,0,0,0,0]
Created ODB key "/Test/Settings/Large String"
Set ODB key "/Test/Settings/Large String" = ""
Created ODB key "/Test/Settings/String Array 10"
Set ODB key "/Test/Settings/String Array 10[0...9]" = ["","","","","","","","","",""]
Created ODB key "/Test/Settings/Large String Array 10"
Set ODB key "/Test/Settings/Large String Array 10[0...9]" = ["","","","","","","","","",""]
Get definition for ODB key "/Test/Settings"
Get definition for ODB key "/Test/Settings/Int32 Key"
Get definition for ODB key "/Test/Settings/Int32 Key"
Get ODB key "/Test/Settings/Int32 Key": 42
Get definition for ODB key "/Test/Settings/Bool Key"
Get definition for ODB key "/Test/Settings/Bool Key"
Get ODB key "/Test/Settings/Bool Key": true
Get definition for ODB key "/Test/Settings/Subdir"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Int Array"
Get definition for ODB key "/Test/Settings/Int Array"
Get ODB key "/Test/Settings/Int Array[0...2]": [1,2,3]
Get definition for ODB key "/Test/Settings/Double Array"
Get definition for ODB key "/Test/Settings/Double Array"
Get ODB key "/Test/Settings/Double Array[0...2]": [1.200000,2.300000,3.400000]
Get definition for ODB key "/Test/Settings/String Array"
Get definition for ODB key "/Test/Settings/String Array"
Get ODB key "/Test/Settings/String Array[0...2]": ["Hello1,Hello2,Hello3"]
Get definition for ODB key "/Test/Settings/Large Array"
Get definition for ODB key "/Test/Settings/Large Array"
Get ODB key "/Test/Settings/Large Array[0...9]": [0,0,0,0,0,0,0,0,0,0]
Get definition for ODB key "/Test/Settings/Large String"
Get definition for ODB key "/Test/Settings/Large String"
Get ODB key "/Test/Settings/Large String": ""
Get definition for ODB key "/Test/Settings/String Array 10"
Get definition for ODB key "/Test/Settings/String Array 10"
Get ODB key "/Test/Settings/String Array 10[0...9]": [",,,,,,,,,"]
Get definition for ODB key "/Test/Settings/Large String Array 10"
Get definition for ODB key "/Test/Settings/Large String Array 10"
Get ODB key "/Test/Settings/Large String Array 10[0...9]": [",,,,,,,,,"]
Get definition for ODB key "/Test/Settings"
Get definition for ODB key "/Test/Settings/Subdir"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Int32 Key"
Get definition for ODB key "/Test/Settings/Int32 Key"
Get ODB key "/Test/Settings/Int32 Key": 42
Get definition for ODB key "/Test/Settings/Bool Key"
Get definition for ODB key "/Test/Settings/Bool Key"
Get ODB key "/Test/Settings/Bool Key": true
Get definition for ODB key "/Test/Settings/Subdir"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get definition for ODB key "/Test/Settings/Subdir/Int32 key"
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get definition for ODB key "/Test/Settings/Subdir/Double Key"
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Subdir/Subsub"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/Float key"
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get definition for ODB key "/Test/Settings/Subdir/Subsub/String Key"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get definition for ODB key "/Test/Settings/Int Array"
Get definition for ODB key "/Test/Settings/Int Array"
Get ODB key "/Test/Settings/Int Array[0...2]": [1,2,3]
Get definition for ODB key "/Test/Settings/Double Array"
Get definition for ODB key "/Test/Settings/Double Array"
Get ODB key "/Test/Settings/Double Array[0...2]": [1.200000,2.300000,3.400000]
Get definition for ODB key "/Test/Settings/String Array"
Get definition for ODB key "/Test/Settings/String Array"
Get ODB key "/Test/Settings/String Array[0...2]": ["Hello1,Hello2,Hello3"]
Get definition for ODB key "/Test/Settings/Large Array"
Get definition for ODB key "/Test/Settings/Large Array"
Get ODB key "/Test/Settings/Large Array[0...9]": [0,0,0,0,0,0,0,0,0,0]
Get definition for ODB key "/Test/Settings/Large String"
Get definition for ODB key "/Test/Settings/Large String"
Get ODB key "/Test/Settings/Large String": ""
Get definition for ODB key "/Test/Settings/String Array 10"
Get definition for ODB key "/Test/Settings/String Array 10"
Get ODB key "/Test/Settings/String Array 10[0...9]": [",,,,,,,,,"]
Get definition for ODB key "/Test/Settings/Large String Array 10"
Get definition for ODB key "/Test/Settings/Large String Array 10"
Get ODB key "/Test/Settings/Large String Array 10[0...9]": [",,,,,,,,,"]
Get ODB key "/Test/Settings/Int32 Key": 42
Get ODB key "/Test/Settings/Bool Key": true
Get ODB key "/Test/Settings/Subdir/Int32 key": 123
Get ODB key "/Test/Settings/Subdir/Double Key": 1.200000
Get ODB key "/Test/Settings/Subdir/Subsub/Float key": 1.200000
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Get ODB key "/Test/Settings/Int Array[0...2]": [1,2,3]
Get ODB key "/Test/Settings/Double Array[0...2]": [1.200000,2.300000,3.400000]
Get ODB key "/Test/Settings/String Array[0...2]": ["Hello1,Hello2,Hello3"]
Get ODB key "/Test/Settings/Large Array[0...9]": [0,0,0,0,0,0,0,0,0,0]
Get ODB key "/Test/Settings/Large String": ""
Get ODB key "/Test/Settings/String Array 10[0...9]": [",,,,,,,,,"]
Get ODB key "/Test/Settings/Large String Array 10[0...9]": [",,,,,,,,,"]
"Settings": {
   "Int32 Key": 42,
   "Bool Key": true,
   "Subdir": {
      "Int32 key": 123,
      "Double Key": 1.200000,
      "Subsub": {
         "Float key": 1.200000,
         "String Key": "Hello"
      }
   },
   "Int Array": [1,2,3],
   "Double Array": [1.200000,2.300000,3.400000],
   "String Array": ["Hello1","Hello2","Hello3"],
   "Large Array": [0,0,0,0,0,0,0,0,0,0],
   "Large String": "",
   "String Array 10": ["","","","","","","","","",""],
   "Large String Array 10": ["","","","","","","","","",""]
}
Set ODB key "/Test/Settings/Int32 Key" = 42
Get ODB key "/Test/Settings/Int32 Key": 42
Set ODB key "/Test/Settings/Int32 Key" = 43
Get ODB key "/Test/Settings/Int32 Key": 43
Set ODB key "/Test/Settings/Int32 Key" = 44
Get ODB key "/Test/Settings/Int32 Key": 44
Set ODB key "/Test/Settings/Int32 Key" = 57
Should be 57: Get ODB key "/Test/Settings/Int32 Key": 57
57
Created ODB key "/Test/Settings/Int64 Key"
Set ODB key "/Test/Settings/Int64 Key" = -1
Get ODB key "/Test/Settings/Int64 Key": -1
AAAA:0xffffffffffffffff
Created ODB key "/Test/Settings/UInt64 Key"
Set ODB key "/Test/Settings/UInt64 Key" = 1311768465173141112
Get ODB key "/Test/Settings/UInt64 Key": 1311768465173141112
0x1234567812345678
Set ODB key "/Test/Settings/Bool Key" = false
Get ODB key "/Test/Settings/Bool Key": false
Set ODB key "/Test/Settings/Bool Key" = true
Set ODB key "/Test/Settings/Subdir/Subsub/String Key" = "Hello"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello"
Set ODB key "/Test/Settings/Subdir/Subsub/String Key" = "Hello world!"
Get ODB key "/Test/Settings/Subdir/Subsub/String Key": "Hello world!"
Set ODB key "/Test/Settings/Int32 Key" = 43
Get ODB key "/Test/Settings/Int Array[0...2]": [1,2,3]
Set ODB key "/Test/Settings/Int Array[0...2]" = [10,10,10]
Get ODB key "/Test/Settings/Int Array[1]": [10]
Set ODB key "/Test/Settings/Int Array[1]" = 2
Get ODB key "/Test/Settings/Int Array[1]": [2]
Get ODB key "/Test/Settings/Int Array[0...4]": [10,2,10,0,0]
Set ODB key "/Test/Settings/Int Array[0...4]" = [11,3,11,1,1]
Arrays size is 5
Set ODB key "/Test/Settings/Int Array[10]" = 0
Get ODB key "/Test/Settings/Int Array[10]": [0]
Set ODB key "/Test/Settings/Int Array[10]" = 10
Get ODB key "/Test/Settings/String Array[0...2]": ["Hello1,Hello2,Hello3"]
Set ODB key "/Test/Settings/String Array[0...2]" = ["Hello1","New String","Hello3"]
Get ODB key "/Test/Settings/String Array[2]": ["Hello3"]
Set ODB key "/Test/Settings/String Array[2]" = "Another String"
Set ODB key "/Test/Settings/String Array[3]" = ""
Get ODB key "/Test/Settings/String Array[3]": [""]
Set ODB key "/Test/Settings/String Array[3]" = "One more"
... 468 more lines ...
  3044   25 May 2025 Pavel MuratBug Reportsubdirectory ordering in ODB browser ?
Dear MIDAS experts, 

I'm running into a minor but annoying issue with the subdirectory name ordering by the ODB browser. 
I have a straw-man hash map which includes ODB subdirectories named "000", "010", ... "300", 
and I'm yet to succeed to have them displayed in a "natural" order: the subdirectories with names 
starting from "0" always show up on the bottom of the list - see attached .png file. 

Neither interactive re-ordering nor manual ordering of the items in the input .json file helps. 

I have also attached a .json file which can be loaded with odbedit to reproduce the issue. 

Although I'm using a relatively recent - ~ 20 days old - commit, 'db1819ac', is it possible 
that this issue has already been sorted out ?

-- many thanks, regards, Pasha  
Attachment 1: panel_map.json
{
  "/MIDAS version" : "2.1",
  "/MIDAS git revision" : "Sat May 3 17:22:36 2025 +0200 - midas-2025-01-a-192-gdb1819ac-dirty on branch HEAD",
  "/filename" : "PanelMap.json",
  "/ODB path" : "/Test/PanelMap",
  "000" : {
  },
  "020" : {
  },
  "030" : {
  },
  "040" : {
  },
  "090" : {
  },
  "100" : {
  },
  "200" : {
  }
}
Attachment 2: panel_map.png
panel_map.png
  3047   27 May 2025 Pavel MuratSuggestionhandling of 2+ like-long messages
Dear MIDAS experts, 

currently, the MIDAS messaging system is optimized for one-line long messages, 
so the content of 2+liners shows up in the message log in the reverse order, 
with the first line on the bottom of the message. 

I wonder if printing the message content in the reverse order, starting from the last line, 
would make sense ? - that wouldn't affect one-line long messages, but could make longer 
messages more useful. 

--thanks, regards, Pasha
  3093   23 Sep 2025 Pavel MuratInfoswitch 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 
> many new features and we want to start using some of them.
> 
> Per my previous message https://daq00.triumf.ca/elog-midas/Midas/3084,
> c++17 is available on current MacOS, U-22 and newer, el9 and newer, D-12 and newer.
> 
> (ROOT moved to C++17 as of release 6.30 on November 6, 2023)
> 
> As I reported earlier, MIDAS already builds with c++23 on U-24, and this move does not require any 
> actual code changes other than a bump of c++ version in CMakeLists.txt and Makefile.
> 
> Please let us know if this change will cause problems or if you think that we should move to an older 
> c++ (c++14) or newer c++ (c++20 or c++23 or c++26).
> 
> If we do not hear anything, we will implement this change in about 2-3 weeks.
> 
> K.O.
  3096   23 Sep 2025 Pavel MuratInfoswitch 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
  3210   23 Apr 2026 Pavel MuratBug Reportincreasing the max number of hot links in ODB
Dear MIDAS experts,

when I attempted to increase the max number of hotlinks in ODB , defined as 

#define MAX_OPEN_RECORDS       256           /**< number of open DB records   */

I started running into an assertion in midas/src/odb.cxx

https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1525 :

  assert(sizeof(DATABASE_CLIENT) == 2112);

is it possible that the size of the DATABASE_CLIENT structure should be checked against 64+sizeof(OPEN_RECORD)*MAX_OPEN_RECORDS ?
- 64 clearly can be expressed in a better maintainable form  

UPDATE: similar consideration holds for the size of the DATABLE_HEADER structure, which is also checked against a constant

https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1526

-- many thanks, regards, Pavel

 
  3213   25 Apr 2026 Pavel MuratBug Reportincreasing the max number of hot links in ODB
I see - thank you for the explanation!  

Indeed, updating MIDAS clients on each and every RPI etc in a running experiment may be a real challenge. 

Thinking forward - would it help if the ODB clients, upon initial connection but before doing anything else 
were reading the ODB parameters from the ODB itself, so the clients were "learning" about the ODB structure 
dynamically, at run time? Or that knowledge has to be static ?

-- thanks, regards, Pavel
  3218   27 Apr 2026 Pavel MuratBug Reportincreasing the max number of hot links in ODB
> I wonder why one needs more than 256 hotlinks at all. Please note that with the odbxx "watch" API, you can hotline a whole subdirectory, and get notified if ANY of the 
> underlying values or subdirectories change. In principle, one could have one hotlink to "/" and see all changes in the ODB (although that does not make sense and might slow 
> down ODB access a bit).

Thanks ! - I didn't know that. I did run into a number of hotlinks limit via mlogger which complained about not being able to create a hotlink 
to yet another event. Doubling the default value of MAX_OPEN_RECORDS solved the problem. 

I don't know the exact arithmetic defining the number of hotlinks in the system, but my today's case is a case of 
- 36 (linux servers) +18 (RPI) monitoring frontends managing one or several different equipment items each. 
- Each equipment item sends to ODB at least one monitoring event 
- in addition, each frontend created an individual hotlink for handling interactive commands 
- for MAX_OPEN_RECORDS=256, 4 equipment items per frontend easily make it into the dangerous zone. 

"Equipment items" also include the online processes running on the distributed computing farm processing the data .. 
(we are not using MIDAS event building capabilities)
 
> 
> Try the odbxx_test.cpp example in MIDAS. In line 210 it puts a single hotlink to /Experiment. If you change anything under /Experiment, the program gets notified. By checking the 
> path of the changed ODB entry, it can figure out which of the subways have been changed:
> 
>    // watch ODB key for any change with lambda function
>    midas::odb ow("/Experiment");
>    ow.watch([](midas::odb &o) {
>       std::cout << "Value of key \"" + o.get_full_path() + "\" changed to " << o << std::endl;
>    });
> 
> 
> Maybe that would solve your problem without having to change the maximum number of hotlinks.

I'll see how much mileage one can make here, but so far it looks that it is the number of various monitoring events 
handled by the mlogger which  drives the number of hotlinks 

-- thanks, regards, Pavel
  3219   27 Apr 2026 Pavel MuratBug Reportincreasing the max number of hot links in ODB
> > I wonder why one needs more than 256 hotlinks at all.
> 
> I confirm that ALPHA is running with MAX_OPEN_RECORDS changed from 256 to 2048,
> this is the only experiment I know of that had to increase any MIDAS ODB defaults.
> 
> The reason for this is mlogger, it opens an open record for each variable in each equipment.
> 
> This should be changed to 1 db_watch per equipment. We talked about it, but I guess we never did it.
> 
> I think this task just went almost to the top of my MIDAS to-do list.

I definitely had many more than 256 variables successfully monitored with MAX_OPEN_RECORDS=256.
Is it possible that mlogger creates a hotlink per monitoring event, not per variable ? 
- I think, that would make more sense in almost any scenario... 

-- thanks, regards, Pavel
  3220   27 Apr 2026 Pavel MuratBug Reportincreasing the max number of hot links in ODB
> > Indeed, updating MIDAS clients on each and every RPI etc in a running experiment may be a real challenge.
> 
> actually, only local clients must be rebuilt, remote clients connecting to the mserver do not care about ODB 
> internal structure.

thanks! I see - local clients do know about the memory mapping, remote ones - don't  

> unfortunately, the "open records" structure is allocated at compile-time inside the ODB header,
> making any change to this would break binary compatibility.

right, I guess, what I had in mind would require the very first fODB record to be a format descriptor, 
and that would be a breaking change... Anyway, the practical part of the problem is addressed, 
so I just add here a link which contains an answer to the original posting (I found it only after the fact):
 
https://daq00.triumf.ca/MidasWiki/index.php/FAQ#Increasing_Number_of_Hot-links

-- thanks again, regards, Pavel
  80   09 Dec 2003 Paul Knowles db_close_record non-local/non-return
Hi All,

I have found a weird one:

The following code executes on the frontend machine in the
frontend_exit() routine, and connects to the odb running on
another separate machine:
...
     cm_msg(MINFO,__func__, "line %d", __LINE__);

     cm_get_experiment_database(&hdb, NULL);

     cm_msg(MINFO,__func__, "line %d", __LINE__);
     status = db_find_key(hdb, 0, "/Experiment/Run Parameters", &hkey);
     cm_msg(MINFO,__func__, "line %d, hkey=%d, status=%d",
            __LINE__, hkey, status);
     checkstat("db_find_key returned status %d", status);
     cm_msg(MINFO,__func__, "line %d", __LINE__);
     status = db_close_record(hdb, hkey);

     /* NOTREACHED!! the above call to db_close_record
        doesn't return!
      */
     cm_msg(MINFO,__func__, "line %d, status=%d", __LINE__, status);
     checkstat("db_close_record returned status %d", status);

checkstat is a macro that does the following:
#define checkstat(format, arg...)\
do{ if(status != DB_SUCCESS) {\
cm_msg(MERROR, __func__, format, ## arg);\
return FE_ERR_ODB;}}while(0)

The key exists, and the status of the search is 1
(i.e., DB_SUCCESS) and rest of the code tries to run.  What gets
really weird is that the db_close_record _doesn't_ _return_.
The code following the NOTREACHED comment just doesn't get
called.  I get the message from the __LINE__ just in front
of the call, but not the message afterwards (cm_msg and printf 
were tried).  Somehow db_close_record is causing a non-local 
exit or signal or something. No error message is printed and the 
frontend continues to exit with exit code 0.  But, since the rest
of my frontend_exit/odb closing doesn't happen, the odb is left in
a lost state requiring a cleanup.  If I comment out the calls to 
db_close_record, the rest of my frontend_exit runs normally 
and the cm_disconnect_experiment() in mfe.c eventually closes my 
open records correctly (I expect, anyway) and this is the present 
workaround i am using.  The terror i have is that several of my 
hotlinked callback routines will call the close_record routine 
when resetting illegal values.  No end of hilarity will result there...

I was using the same code in the frontend under 1.9.2 and
have only recently upgraded to 1.9.3-? tarball from PAA and 
there were no problems using the 1.9.2 code: this is a 1.9.3
issue.

I have localized the weirdness to what I think is the RPC interface.
Running the nullfrontend (no camac access) on the same machine as 
hosts the ODB I can make the problem appear and disappear in the 
following way:
(odb is local on machine ``monet'')

nullfe -h monet -e acqmonad     : db_close_record will get lost

nullfe -e acqmonad              : db_close_record works as expected.

I've tried also with the patch for the 256 byte odb string bug since
many of the open records have strings of that length, but that isn't
it. The only substancial looking change to mserver from 1.9.2 to 1.9.3
is the SIGPIPE ignore and that doesn't look like a good candidate either.
Can this be that some of the 
   #IFDEF LOCAL_ROUTINES
that got moved about in odb.c and others
are causing the remote call to get confused?

Clearly the answer is to just use stable and happy 1.9.2, but the 
people for whom I am working now really want to use ROOT for
an analyzer...


cheers,
.p.

Paul Knowles.                   phone: 41 26 300 90 64
email: Paul.Knowles@unifr.ch      Fax: 41 26 300 97 47
finger me at pexppc33.unifr.ch for more contact information
  75   18 Dec 2003 Paul Knowles Poll about default indent style
Hi Stefan,

> once and forever, I am considering using the "indent" program which comes 
> with every linux installation. Running indent regularly on all our code 
> ensures a consistent look.

I think this can be called a Good Thing.

> The "-kr" style does the standard K&R style, 
> but used tabs (which is not good), and does a 4-column 
> indention which is I think too much. So I would propose 
> following flags:
>        indent -kr -nut -i2 -di8 -bad <filename.c>

(some of this is a repeat from an earlier mail to SR):
You might also want a -l90 for a longer line length than 75
characters.  K&R style with indentation from 5 to 8 spaces
is a good indicator of complexity: as soon as 40 characters
of code wind up unreadably squashed to the right of the
screen, you have to refactor to have less indentation
levels.  This means you wind up rolling up the inner parts
of deeply nested conditionals or loops as separate
functions, making the whole code easier to understand.

I think that setting -i2 is ``going around the problem'' 
of deep nesting.  If you really need to keep the indentation 
tabs less than 4 (8 is ideal) because your code is falling off the 
right edge of the screen, you are indented too deeply.  Why do 
I say that?  There is the famous ``7+-1'' idea that you can hold
in you head only 7 ideas (give or take one) at any time.  I'm not 
that smart and I top out at about 5:  So for example, a conditional 
in a loop  in a conditional in a switch is about as deep a level 
of nesting as  I can easily understand (remember that I also have 
to hold the line i'm working on as well): that's 4 levels, plus one for the
function itself and we are at 40 characters away from the right edge
of the screen using -i8 and have some 40 characters available for writing code
(how often is a line of code really longer than about 40 characters?).
On top of that, the indentation is easily seen so you know immediately 
wheather you are at the upper conditional, or inner conditional.  A -i2
just doesn't make the difference big enough.  -i5 is a happy balance 
with enough visual clue as to the indentation level, but leaves you 50
to 60 characters for the code line itself.

However, if you are indenting very deeply, then the poor reader can't hold
on to the context: there are more than 6 or 7 things to keep in mind.
In those cases, roll up the inner levels as a separate function and 
call it that way. The inner complexity of the nested statements gets 
nicely abstracted and then dumb people like me can understand what 
you are doing.

So, in brief: indent is a good idea, and -in with n>=4 will be best.
I don't think -i2 will lend itself to making the code so much easier 
to read.

thanks for listening.
.p.
  1645   07 Aug 2019 Paolo BaessoBug ReportROOTANA bug?
Hi,

I posted on the ROOTANA elog but there seems to be little activity there...

Could someone confirm if this is a bug?
https://midas.triumf.ca/elog/Rootana/14

Another user replied that they are encountering the same issue, so I think it is unlikely it is just our installation.

While ROOTANA is unusable for us, I tried to use the example Frontend and Analyzer (under the Experiment source folder). The analyzer does not seem to do much though. A root file is produced but nothing is placed into it. Is that normal?

Any help would be welcome.
  2775   21 May 2024 NikolayBug Reportexperiment from midas/examples
There are 2 bugs in midas/examples/experiment:

1) In fronted bank named "PRDC" is created for scaler event. But in analyzer 
module scaler.cxx the bank named "SCLR" is searched for the same event.

2) In mana.cxx linked from analyzer.cxx is "Invalid name "/Analyzer/Tests/Always 
true/Rate [Hz]" passed to db_create_key: should not contain "["". 
Looks like ODB doesn't like '[', ']' characters.
Attachment 1: analyzer.jpg
analyzer.jpg
  2500   02 May 2023 Niklaus BergerForumProblem with running midas odbxx frontends on a remote machine using the -h option
Thanks for all the helpful hints. When finally managing to evade all timeouts and attach the debugger in just the right moment, we find that we get a segfault in mserver at L827:
   case RPC_DB_COPY_XML:
      status = db_copy_xml(CHNDLE(0), CHNDLE(1), CSTRING(2), CPINT(3), CBOOL(4));
Some printf debugging then pointed us to the fact that the culprit is the pointer de-referencing in CBOOL(4). This in turn can be traced back to mrpc.cxx L282 ff, where the line with the arrow was missing:
  {RPC_DB_COPY_XML, "db_copy_xml",
    {{TID_INT32, RPC_IN},
     {TID_INT32, RPC_IN},
     {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
     {TID_INT32, RPC_IN | RPC_OUT},
 ->  {TID_BOOL, RPC_IN},
     {0}}},

If we put that in, the mserver process completes peacfully and we get a segfault in the client ("Wrong key type in XML file") which we will attempt to debug next. Shall I create a pull request for the additional RPC argument or will you just fix this on the fly?
  2501   02 May 2023 Niklaus BergerForumProblem with running midas odbxx frontends on a remote machine using the -h option
And now we also fixed the client segfault, odb.cxx L8992 also needs to know about the header:
if (rpc_is_remote())
      return rpc_call(RPC_DB_COPY_XML, hDB, hKey, buffer, buffer_size, header);

(last argument was missing before).
ELOG V3.1.4-2e1708b5