ID |
Date |
Author |
Topic |
Subject |
2246
|
28 Jun 2021 |
Konstantin Olchanski | Suggestion | ODB Load in Sequencer | > ... at MEG, we keep hundreds of XML files for configuration. Mostly historical, but that's how it is.
same here, lots of historical .odb and .xml files.
I think the .odb and .xml support is here to stay. Best I remember, latest things I fixed in both
was support for unlimited string length (and removal of associated buffer overflows). Right now,
I am not sure if both are UTF-8 clean and if they properly escape all control characters,
something to fix as we go or as we bump into problems.
K.O. |
2247
|
28 Jun 2021 |
Marco Francesconi | Suggestion | ODB Load in Sequencer | My idea was to collect some feedback instead of blindly submitting code for a pull request.
Currently I'm just calling db_load() with a given file, so it is only supporting .odb formatting.
It is pretty easy to extend to json by calling the db_load_json() depending on the file extension.
I do not see a similar call for the .xml format, maybe I can study tomorrow how it is implemented in odbedit and port it to the sequencer.
I guess that the ODBPasteJSON can be a solution as well but I find it a bit too technical.
Anyway it is easy to implement just by calling db_paste_json(), I will keep this in mind.
I'll try to sort this out and make a commit soon.
Best,
Marco
> > ... at MEG, we keep hundreds of XML files for configuration. Mostly historical, but that's how it is.
>
> same here, lots of historical .odb and .xml files.
>
> I think the .odb and .xml support is here to stay. Best I remember, latest things I fixed in both
> was support for unlimited string length (and removal of associated buffer overflows). Right now,
> I am not sure if both are UTF-8 clean and if they properly escape all control characters,
> something to fix as we go or as we bump into problems.
>
> K.O. |
2248
|
29 Jun 2021 |
Marco Francesconi | Suggestion | ODB Load in Sequencer | I just submitted a pull request for this feature, I did quite a lot of testing and it looks good to me.
Let me know if something is not clear.
I'll take care of adding the relevant informations to the wiki once it is merged.
Best,
Marco
> My idea was to collect some feedback instead of blindly submitting code for a pull request.
>
> Currently I'm just calling db_load() with a given file, so it is only supporting .odb formatting.
> It is pretty easy to extend to json by calling the db_load_json() depending on the file extension.
> I do not see a similar call for the .xml format, maybe I can study tomorrow how it is implemented in odbedit and port it to the sequencer.
>
> I guess that the ODBPasteJSON can be a solution as well but I find it a bit too technical.
> Anyway it is easy to implement just by calling db_paste_json(), I will keep this in mind.
>
> I'll try to sort this out and make a commit soon.
> Best,
>
> Marco
>
>
>
> > > ... at MEG, we keep hundreds of XML files for configuration. Mostly historical, but that's how it is.
> >
> > same here, lots of historical .odb and .xml files.
> >
> > I think the .odb and .xml support is here to stay. Best I remember, latest things I fixed in both
> > was support for unlimited string length (and removal of associated buffer overflows). Right now,
> > I am not sure if both are UTF-8 clean and if they properly escape all control characters,
> > something to fix as we go or as we bump into problems.
> >
> > K.O. |
2251
|
30 Jun 2021 |
Stefan Ritt | Suggestion | ODB Load in Sequencer | I quickly checked the pull request and could not find any obvious problem, so I merged it. |
2259
|
11 Jul 2021 |
Konstantin Olchanski | Suggestion | MidasConfig.cmake usage | > > > So you say "nuke ${MIDAS_LIBRARIES}" and "fix ${MIDAS_INCLUDE}". Ok.
> > A more moderate option ...
>
> For the record, I did not disappear. I have a very short time window
> to complete commissioning the alpha-g daq (now that the network
> and the event builder are cooperating). To add to the fun, our high voltage
> power supply turned into a pumpkin, so plotting voltages and currents
> on the same history plot at the same time (like we used to be able to do)
> went up in priority.
>
in the latest update, find_package(midas) should work correctly, the include path is right,
the library list is right.
please test.
I find that the cmake install(export) method is simpler on the user side (just one line of
code) and is easier to support on the midas side (config file is auto-generated).
I request that proponents of the find_package(midas) method contribute the documentation and
example on how to use it. (see my other message).
K.O. |
2289
|
14 Oct 2021 |
Amy Roberts | Suggestion | Adding (or improving discoverability) of TID for odbset | Creating an ODB key requires users to know the Type ID that are defined in
https://bitbucket.org/tmidas/midas/src/develop/include/midas.h starting at line 320.
I can't find any information on the Midas Wiki about these values or how to find
them.
Am I missing something obvious? Is there a way to improve how to find these values?
Or is this not the best way to interact with the ODB? |
2290
|
15 Oct 2021 |
Stefan Ritt | Suggestion | Adding (or improving discoverability) of TID for odbset | > Creating an ODB key requires users to know the Type ID that are defined in
> https://bitbucket.org/tmidas/midas/src/develop/include/midas.h starting at line 320.
>
> I can't find any information on the Midas Wiki about these values or how to find
> them.
>
> Am I missing something obvious? Is there a way to improve how to find these values?
> Or is this not the best way to interact with the ODB?
Well, you found them in midas.h, so where is the problem?
If you want a more detailed description, just look in the midas documentation (RTFM):
https://midas.triumf.ca/MidasWiki/index.php/Midas_Data_Types
If you want a more modern interface to the ODB without these data types, look here:
https://midas.triumf.ca/MidasWiki/index.php/Odbxx
Best regards,
Stefan |
2380
|
31 Mar 2022 |
Stefan Ritt | Suggestion | Maximum ODB size | Anybody some idea what the maximum ODB size can be? In the old days, the linux
kernels had a severe limit on shared memory of usually 8MB, but in the age of
64GB RAM being a standard, we should be able to grow bigger. Tried
odbinit -s 1024MB --cleanup
which went through without complain, even put that value in to .ODB_SIZE.TXT, but
when I started odbedit doing "mem", I only see a size of 1MB. Probably somewhere
deep inside we have a limit which prevents the user to create very large ODBs,
but this should be mentioned more prominently in odbinit. Like "size too large,
maximum allowd is xxx MB".
Stefan |
2381
|
04 Apr 2022 |
Konstantin Olchanski | Suggestion | Maximum ODB size | > Anybody some idea what the maximum ODB size can be?
It turns out ODB size limit is hardwired on db_open_database() at 100 Mbytes.
I now committed an improved error message for this.
I confirm that "odbinit -s 100MB" works and creates ODB with 50 Mbyte data area and 50
Mbyte key area.
> in the age of 64GB RAM being a standard, we should be able to grow bigger ...
I agree, I think we can safely bump the limit from 100 Mbytes to 1 Gbyte, maybe 1.5 or
1.99 Gbytes. Above that we run into 32-bit/31-bit cleanliness problems.
And creating extra large 1 GB ODB but using only a few megabytes will not waste any
RAM, because the .ODB.SHM file is demand-paged and non-used parts of ODB will not be
mapped into RAM. (It will waste disk space, file .ODB.SHM will be 1 GByte size).
However, 1 GByte (FPGA based) and 4-8 GByte (Raspberry Pi & co) machines are again
becoming popular and relevant for running MIDAS, and they have very slow "disk"
subsystems, with NAND, SD and USB flash, so we should not go crazy here.
> odbinit -s 1024MB --cleanup
there is a bug in odbinit, if initial odbinit fails, ODB with default size is creates,
and original rejected ODB size is written to .ODB_SIZE.TXT (an inconsistency).
bitbucket bug 328
> [ how do I resize ODB ??? ]
we need odbresize. bitbucket bug 329.
K.O. |
2434
|
21 Aug 2022 |
Joseph McKenna | Suggestion | mvodb functionality to get the 'LastWritten' property of a key |
I want to read data from the ODB with the mvodb interface in one of my frontends, it's useful to know how old that data is, so I prototyped functionality in a pull request to mvodb:
https://bitbucket.org/tmidas/mvodb/pull-requests/2/add-readkeylastwritten-function-to-extract |
2435
|
22 Aug 2022 |
Stefan Ritt | Suggestion | mvodb functionality to get the 'LastWritten' property of a key | > I want to read data from the ODB with the mvodb interface in one of my frontends, it's useful to know how old that data is, so I prototyped functionality in a pull request to mvodb:
>
> https://bitbucket.org/tmidas/mvodb/pull-requests/2/add-readkeylastwritten-function-to-extract
Thanks for raising that point. I realized that the odbxx API was also missing that functionality, so I added it:
https://bitbucket.org/tmidas/midas/commits/6991a92c19292eaf67721cb80f182c61db077f45
Best,
Stefan |
2437
|
10 Oct 2022 |
Zaher Salman | Suggestion | JSON-RPC function to read files | Hello ,
The midas sequencer uses the function js_seq_list_files to get a list of files in the /Sequencer/State/Path with extension *.msl. It would be nice to generalize this function to be able to read files with other (or any) extension.
Based on the js_seq_list_files I added a function in js_any_list_files mjsonrpc_user.cxx (attached) which does the job. Maybe a better/safer implementation can be made in midas. Are there any plans to do this?
thanks. |
Attachment 1: mjsonrpc_user.cxx
|
/********************************************************************\
Name: mjsonrpc_user.cxx
Created by: Konstantin Olchanski
Contents: handler of user-provided and experimental JSON-RPC requests
\********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <map>
#include "mjson.h"
#include "midas.h"
#include "msystem.h"
#include "mjsonrpc.h"
#include <mutex> // std::mutex
//
// example 1: extract request parameters, return up to 3 results
//
static MJsonNode* user_example1(const MJsonNode* params)
{
if (!params) {
MJSO* doc = MJSO::I();
doc->D("example of user defined RPC method that returns up to 3 results");
doc->P("arg", MJSON_STRING, "example string argment");
doc->P("optional_arg?", MJSON_INT, "optional example integer argument");
doc->R("string", MJSON_STRING, "returns the value of \"arg\" parameter");
doc->R("integer", MJSON_INT, "returns the value of \"optional_arg\" parameter");
return doc;
}
MJsonNode* error = NULL;
std::string arg = mjsonrpc_get_param(params, "arg", &error)->GetString(); if (error) return error;
int optional_arg = mjsonrpc_get_param(params, "optional_arg", NULL)->GetInt();
if (mjsonrpc_debug)
printf("user_example1(%s,%d)\n", arg.c_str(), optional_arg);
return mjsonrpc_make_result("string", MJsonNode::MakeString(arg.c_str()), "integer", MJsonNode::MakeInt(optional_arg));
}
//
// example 2: extract request parameters, return more than 3 results
//
static MJsonNode* user_example2(const MJsonNode* params)
{
if (!params) {
MJSO* doc = MJSO::I();
doc->D("example of user defined RPC method that returns more than 3 results");
doc->P("arg", MJSON_STRING, "example string argment");
doc->P("optional_arg?", MJSON_INT, "optional example integer argument");
doc->R("string1", MJSON_STRING, "returns the value of \"arg\" parameter");
doc->R("string2", MJSON_STRING, "returns \"hello\"");
doc->R("string3", MJSON_STRING, "returns \"world!\"");
doc->R("value1", MJSON_INT, "returns the value of \"optional_arg\" parameter");
doc->R("value2", MJSON_NUMBER, "returns 3.14");
return doc;
}
MJsonNode* error = NULL;
std::string arg = mjsonrpc_get_param(params, "arg", &error)->GetString(); if (error) return error;
int optional_arg = mjsonrpc_get_param(params, "optional_arg", NULL)->GetInt();
if (mjsonrpc_debug)
printf("user_example2(%s,%d)\n", arg.c_str(), optional_arg);
MJsonNode* result = MJsonNode::MakeObject();
result->AddToObject("string1", MJsonNode::MakeString(arg.c_str()));
result->AddToObject("string2", MJsonNode::MakeString("hello"));
result->AddToObject("string3", MJsonNode::MakeString("world!"));
result->AddToObject("value1", MJsonNode::MakeInt(optional_arg));
result->AddToObject("value2", MJsonNode::MakeNumber(3.14));
return mjsonrpc_make_result(result);
}
//
// example 3: return an error
//
static MJsonNode* user_example3(const MJsonNode* params)
{
if (!params) {
MJSO* doc = MJSO::I();
doc->D("example of user defined RPC method that returns an error");
doc->P("arg", MJSON_INT, "integer value, if zero, throws a JSON-RPC error");
doc->R("status", MJSON_INT, "returns the value of \"arg\" parameter");
return doc;
}
MJsonNode* error = NULL;
int arg = mjsonrpc_get_param(params, "arg", &error)->GetInt(); if (error) return error;
if (mjsonrpc_debug)
printf("user_example3(%d)\n", arg);
if (arg)
return mjsonrpc_make_result("status", MJsonNode::MakeInt(arg));
else
return mjsonrpc_make_error(15, "example error message", "example error data");
}
static MJsonNode* js_any_list_files(const MJsonNode* params)
{
if (!params) {
MJSO* doc = MJSO::I();
doc->D("js_any_list_files");
doc->P("subdir", MJSON_STRING, "List files in /Seq/State/Path/subdir");
doc->R("status", MJSON_INT, "return status of midas library calls");
doc->R("path", MJSON_STRING, "Search path");
doc->R("fileext", MJSON_STRING, "Filename extension");
doc->R("subdirs[]", MJSON_STRING, "list of subdirectories");
doc->R("files[].filename", MJSON_STRING, "script filename");
doc->R("files[].description", MJSON_STRING, "script description");
return doc;
}
MJsonNode* error = NULL;
std::string subdir = mjsonrpc_get_param(params, "subdir", &error)->GetString(); if (error) return error;
std::string fileext = mjsonrpc_get_param(params, "fileext", &error)->GetString(); if (error) return error;
std::string path = mjsonrpc_get_param(params, "path", NULL)->GetString();
if (subdir.find("..") != std::string::npos) {
return mjsonrpc_make_result("status", MJsonNode::MakeInt(DB_INVALID_PARAM));
}
int status;
HNDLE hDB;
status = cm_get_experiment_database(&hDB, NULL);
if (status != DB_SUCCESS) {
return mjsonrpc_make_result("status", MJsonNode::MakeInt(status));
}
// std::string path;
// If path is not provided get from ODB
if (path == "") {
status = db_get_value_string(hDB, 0, "/Sequencer/State/Path", 0, &path, FALSE);
}
if (status != DB_SUCCESS) {
return mjsonrpc_make_result("status", MJsonNode::MakeInt(status));
}
path = cm_expand_env(path.c_str());
if (subdir.length() > 0) {
if (path[path.length()-1] != DIR_SEPARATOR) {
path += DIR_SEPARATOR_STR;
}
path += subdir;
}
char* flist = NULL;
//printf("path: [%s]\n", path.c_str());
MJsonNode* s = MJsonNode::MakeArray();
/*---- go over subdirectories ----*/
int n = ss_dir_find(path.c_str(), "*", &flist);
for (int i=0 ; i<n ; i++) {
if (flist[i*MAX_STRING_LENGTH] != '.') {
//printf("subdir %d: [%s]\n", i, flist+i*MAX_STRING_LENGTH);
ss_repair_utf8(flist+i*MAX_STRING_LENGTH);
s->AddToArray(MJsonNode::MakeString(flist+i*MAX_STRING_LENGTH));
}
}
MJsonNode* f = MJsonNode::MakeArray();
/*---- go over files in path ----*/
n = ss_file_find(path.c_str(), fileext.c_str(), &flist);
for (int i=0 ; i<n ; i++) {
//printf("file %d: [%s]\n", i, flist+i*MAX_STRING_LENGTH);
MJsonNode* o = MJsonNode::MakeObject();
ss_repair_utf8(flist+i*MAX_STRING_LENGTH);
o->AddToObject("filename", MJsonNode::MakeString(flist+i*MAX_STRING_LENGTH));
o->AddToObject("description", MJsonNode::MakeString("description"));
f->AddToArray(o);
#if 0
char comment[512];
comment[0] = 0;
strlcpy(str, path, sizeof(str));
if (strlen(str)>1 && str[strlen(str)-1] != DIR_SEPARATOR)
strlcat(str, DIR_SEPARATOR_STR, sizeof(str));
strlcat(str, flist+i*MAX_STRING_LENGTH, sizeof(str));
if (msl_parse(str, error, sizeof(error), &error_line)) {
if (strchr(str, '.')) {
*strchr(str, '.') = 0;
strlcat(str, ".xml", sizeof(str));
}
comment[0] = 0;
if (pnseq) {
mxml_free_tree(pnseq);
pnseq = NULL;
}
pnseq = mxml_parse_file(str, error, sizeof(error), &error_line);
if (error[0]) {
strlcpy(comment, error, sizeof(comment));
} else {
if (pnseq) {
pn = mxml_find_node(pnseq, "RunSequence/Comment");
if (pn)
strlcpy(comment, mxml_get_value(pn), sizeof(comment));
else
strcpy(comment, "<No description in XML file>");
}
}
if (pnseq) {
mxml_free_tree(pnseq);
pnseq = NULL;
}
} else {
sprintf(comment, "Error in MSL: %s", error);
}
strsubst(comment, sizeof(comment), "\"", "\\\'");
r->rsprintf("<option onClick=\"document.getElementById('cmnt').innerHTML='%s'\"", comment);
r->rsprintf(" onDblClick=\"load();\">%s</option>\n", flist+i*MAX_STRING_LENGTH);
#endif
}
free(flist);
flist = NULL;
MJsonNode* r = MJsonNode::MakeObject();
r->AddToObject("status", MJsonNode::MakeInt(SUCCESS));
ss_repair_utf8(path);
r->AddToObject("path", MJsonNode::MakeString(path.c_str()));
r->AddToObject("subdirs", s);
r->AddToObject("files", f);
return mjsonrpc_make_result(r);
}
//
// to create your own rpc method handler, copy one of the examples here, register it in user_init below
//
//
// user_init function is called at startup time to register user rpc method handlers
//
void mjsonrpc_user_init()
{
if (mjsonrpc_debug) {
printf("mjsonrpc_user_init!\n");
}
// add user functions to the rpc list
mjsonrpc_add_handler("user_example1", user_example1);
mjsonrpc_add_handler("user_example2", user_example2);
mjsonrpc_add_handler("user_example3", user_example3);
mjsonrpc_add_handler("any_list_files", js_any_list_files, true);
}
/* emacs
* Local Variables:
* tab-width: 8
* c-basic-offset: 3
* indent-tabs-mode: nil
* End:
*/
|
2438
|
14 Oct 2022 |
Lars Martin | Suggestion | Allow onchange to refer to arbitrary js function | Maybe this is already possible, I have a hard time understanding the mhttpd source code.
I would like to use a function defined in the <script> block of my custom page as an onchange callback.
Specific example:
I have an modbthermo that I would like to change to three different colours for "too cold", "just right", and "too hot" (measuring porridge, presumably). The examples only show the explicit (condition)?(val1):(val2) syntax, which doesn't allow more than two values, so I had hoped to replace
onchange="this.dataset.color=this.value > 40?'red':'blue';"
with something like
onchange="this.dataset.color=check_Temp(this.value);"
or
onchange="check_Temp(this.value, this.dataset.color);"
if that's easier somehow. The function itself would then return the colour string, or set the color argument to that string (I'm not sure if JS passes references or just values.)
Is this a possibility? |
2441
|
22 Oct 2022 |
Lars Martin | Suggestion | read_only odbxx? | I really like the concept of the odbxx interface.
I think it would be a nice feature if one could have a read_only connection, e.g. by declaring a "const midas::odb".
Just for fun I tried if this already works, but the compiler doesn't allow const midas::odb for e.g. the [] operator. I'm guessing this would be non-trivial to implement, but I like the idea of certain Midas clients being able to read the odb without risking corruption. |
2443
|
24 Oct 2022 |
Stefan Ritt | Suggestion | read_only odbxx? | > I really like the concept of the odbxx interface.
> I think it would be a nice feature if one could have a read_only connection, e.g. by declaring a "const midas::odb".
> Just for fun I tried if this already works, but the compiler doesn't allow const midas::odb for e.g. the [] operator. I'm guessing this would be non-trivial to implement, but I like the idea of certain Midas clients being able to read the odb without risking corruption.
Having a "const midas::odb" probably does not work (at least I would not know how to implement that).
But I could make an internal flag analog to the auto refresh flags. So you would have
o.set_write_protect(true);
to turn on write protection. Would that work for you?
Best,
Stefan |
2444
|
26 Oct 2022 |
Lars Martin | Suggestion | read_only odbxx? | > Having a "const midas::odb" probably does not work (at least I would not know how to implement that).
>
> But I could make an internal flag analog to the auto refresh flags. So you would have
>
> o.set_write_protect(true);
>
> to turn on write protection. Would that work for you?
Absolutely. Looking at the underlying code I was also at a loss how const would work.
I'm mostly just interested in having small clients that only read from the odb (for whatever reason) without risking corrupting it by messing something
up in the code, especially since such small clients are almost by definition hacked together quickly on the fly. |
2445
|
29 Oct 2022 |
Stefan Ritt | Suggestion | read_only odbxx? | Ok, I implemented and committed that. Just call
o.set_write_protect(true)
on a key you don't want to modify. If you do so, an exception gets thrown.
Best,
Stefan |
2446
|
05 Nov 2022 |
Zaher Salman | Suggestion | histories capture 'ruy' | The histories capture key events from 'r' 'u' 'y' and 'Escape' for various functions like rescaling etc. However, this also means that if we include an editable modbvalue and a history in the same custom page then changing the modbvalue to something that includes 'ruy' is not possible.
In mhistory.js we have
// Keyboard event handler (has to be on the window!)
window.addEventListener("keydown", this.keyDown.bind(this));
I am not sure why it "has to be on the window". For now, I am bypassing this issue by changing the event listener to "keyup" but maybe there is a more elegant solution for this. Adding the event listener to the div element that includes the history does not seem to work. |
2451
|
13 Jan 2023 |
Denis Calvet | Suggestion | Debug printf remaining in mhttpd.cxx | Hi everyone,
It has been a long time since my last message. While porting Midas front-end
programs developed for the T2K experiment in 2008 to a modern version of Midas,
I noticed that some debug printf remain in mhttpd.cxx.
A number of debug messages are printed on stdout each time a graph is displayed
in the OldHistory window (which is the style of history plots that will continue
to be used in the upgraded T2K experiment for some technical reasons).
Here is an example of such debug messages:
Load from ODB History/Display/HA_EP_0/V33: hist plot: 8 variables
timescale: 1h, minimum: 0.000000, maximum: 0.000000, zero_ylow: 0, log_axis: 0,
show_run_markers: 1, show_values: 1, show_fill: 0, show_factor 0, enable_factor:
1
var[0] event [HA_TPC_SC][E0M00FEM_V33] formula [], colour [#00AAFF] label
[Mod_0] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
10
var[1] event [HA_TPC_SC][E0M01FEM_V33] formula [], colour [#FF9000] label
[Mod_1] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
20
var[2] event [HA_TPC_SC][E0M02FEM_V33] formula [], colour [#FF00A0] label
[Mod_2] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
30
var[3] event [HA_TPC_SC][E0M03FEM_V33] formula [], colour [#00C030] label
[Mod_3] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
40
var[4] event [HA_TPC_SC][E0M04FEM_V33] formula [], colour [#A0C0D0] label
[Mod_4] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
50
var[5] event [HA_TPC_SC][E0M05FEM_V33] formula [], colour [#D0A060] label
[Mod_5] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
60
var[6] event [HA_TPC_SC][E0M06FEM_V33] formula [], colour [#C04010] label
[Mod_6] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
70
var[7] event [HA_TPC_SC][E0M07FEM_V33] formula [], colour [#807060] label
[Mod_7] show_raw_value 0 factor 1.000000 offset 0.000000 voffset 0.000000 order
80
read_history: nvars 10, hs_read() status 1
read_history: 0: event [HA_TPC_SC], var [E0M00FEM_V33], index 0, odb index 0,
status 1, num_entries 475
read_history: 1: event [HA_TPC_SC], var [E0M01FEM_V33], index 0, odb index 1,
status 1, num_entries 475
read_history: 2: event [HA_TPC_SC], var [E0M02FEM_V33], index 0, odb index 2,
status 1, num_entries 475
read_history: 3: event [HA_TPC_SC], var [E0M03FEM_V33], index 0, odb index 3,
status 1, num_entries 475
read_history: 4: event [HA_TPC_SC], var [E0M04FEM_V33], index 0, odb index 4,
status 1, num_entries 475
read_history: 5: event [HA_TPC_SC], var [E0M05FEM_V33], index 0, odb index 5,
status 1, num_entries 475
read_history: 6: event [HA_TPC_SC], var [E0M06FEM_V33], index 0, odb index 6,
status 1, num_entries 475
read_history: 7: event [HA_TPC_SC], var [E0M07FEM_V33], index 0, odb index 7,
status 1, num_entries 475
read_history: 8: event [Run transitions], var [State], index 0, odb index -1,
status 1, num_entries 0
read_history: 9: event [Run transitions], var [Run number], index 0, odb index
-2, status 1, num_entries 0
Looking at the source code of mhttpd, these messages originate from:
[mhttpd.cxx line 10279] printf("Load from ODB %s: ", path.c_str());
[mhttpd.cxx line 10280] PrintHistPlot(*hp);
...
[mhttpd.cxx line 8336] int read_history(...
...
[mhttpd.cxx line 8343] int debug = 1;
...
Although seeing many debug messages in the mhttpd does not hurt, these can hide
important error messages. I would rather suggest to turn off these debug
messages by commenting out the relevant lines of code and setting the debug
variable to 0 in read_history().
That is a minor detail and it is always a pleasure to use Midas.
Best regards,
Denis.
|
2452
|
13 Jan 2023 |
Stefan Ritt | Suggestion | Debug printf remaining in mhttpd.cxx | These debug statements were added by K.O. on June 24, 2021. He should remove it.
https://bitbucket.org/tmidas/midas/commits/21f7ba89a745cfb0b9d38c66b4297e1aa843cffd
Best,
Stefan |
|