Back Midas Rome Roody Rootana
  Midas DAQ System, Page 33 of 138  Not logged in ELOG logo
ID Date Author Topic Subject
  2137   25 Mar 2021 Lars MartinBug ReportMinor bug: Change all time axes together doesn't work with +- buttons
Version: release/midas-2020-12

In the new history display, the checkbox "Change all time axes together" works 
well with the mouse-based zoom, but does not apply to the +- buttons.
  2136   24 Mar 2021 Lars MartinBug ReportTime shift in history CSV export
I think from my perspective the separate files are fine. I personally don't really like the format 
with the gaps, so don't see an advantage in putting in the extra work.
I'm surprised the shift is this big, though, it was more than a whole hour in my case, is it the 
time difference between when the frontends were started?
  2135   24 Mar 2021 Stefan RittBug ReportTime shift in history CSV export
I confirm there is a problem. If variables are from the same equipment, they have the same 
time stamps, like

t1 v1(t1) v2(t1)
t2 v1(t2) v2(t2)
t3 v1(t3) v2(t3)

when they are from different equipments, they have however different time stamps

t1 v1(t1)
t2    v2(t2)
t3 v1(t3)
t4    v2(t4)

The bug in the current code is that all variables use the time stamps of the first variable, 
which is wrong in the case of different equipments, like

t1 v1(t1) v2(*t2*)
t3 v1(t3) v2(*t4*)

So I can change the code, but I'm not sure what would be the bast way. The easiest would be to 
export one array per variable, like

t1 v1(t1)
t2 v1(t2)
...
t3 v2(t3)
t4 v2(t4)
...

Putting that into a single array would leave gaps, like

t1 v1(t1) [gap]
t2 [gap]  v2(t2)
t3 v1(t3) [gap]
t4 [ga]]  v2(t4)

plus this is programmatically more complicated, since I have to merge two arrays. So which 
export format would you prefer?

Stefan
  2134   23 Mar 2021 Lars MartinBug ReportTime shift in history CSV export
Tried with export of two different time ranges, and the shift appears to remain the same, 
about 4040 rows.
  2133   23 Mar 2021 Lars MartinBug ReportTime shift in history CSV export
History is from two separate equipments/frontends, but both have "Log history" set to 1.
  2132   23 Mar 2021 Lars MartinBug ReportTime shift in history CSV export
Version: release/midas-2020-12

I'm exporting the history data shown in elog:2132/1 to CSV, but when I look at the 
CSV data, the step no longer occurs at the same time in both data sets (elog:2132/2)
Attachment 1: Cooling-MoxaCalib-20212118-190450-20212119-102151.png
Cooling-MoxaCalib-20212118-190450-20212119-102151.png
Attachment 2: Screenshot_from_2021-03-23_12-29-21.png
Screenshot_from_2021-03-23_12-29-21.png
  2131   15 Mar 2021 Frederik WautersForumINT INT32 in experim.h
works!

> Ok, I added
> 
> /* define integer types with explicit widths */
> #ifndef NO_INT_TYPES_DEFINE
> typedef unsigned char      UINT8;
> typedef char               INT8;
> typedef unsigned short     UINT16;
> typedef short              INT16;
> typedef unsigned int       UINT32;
> typedef int                INT32;
> typedef unsigned long long UINT64;
> typedef long long          INT64;
> #endif
> 
> to cover all new types. If there is a collision with user defined types, compile your program with -DNO_INT_TYPES_DEFINE and you remove the 
> above definition. I hope there are no other conflicts.
> 
> Stefan
  2129   10 Mar 2021 Stefan RittSuggestionembed modbvalue in SVG
You can't really embed it, but you can overlay it. You tag the SVG with a 
"relative" position and then move the modbvalue with an "absolute" position over 
it:

<svg style="position:relative" width="400" height="100">
  <rect width="300" height="100" style="fill:rgb(255,0,0);stroke-width:3;stroke:rgb(0,0,0)" />
  <div class="modbvalue" style="position:absolute;top:50px;left:50px" data-odb-path="/Runinfo/Run number"></div>
</svg>
  2128   10 Mar 2021 Zaher SalmanSuggestionembed modbvalue in SVG
Is it possible to embed modbvalue in an SVG for use within a custom page?

thanks.
  2127   10 Mar 2021 Stefan RittForumINT INT32 in experim.h
Ok, I added

/* define integer types with explicit widths */
#ifndef NO_INT_TYPES_DEFINE
typedef unsigned char      UINT8;
typedef char               INT8;
typedef unsigned short     UINT16;
typedef short              INT16;
typedef unsigned int       UINT32;
typedef int                INT32;
typedef unsigned long long UINT64;
typedef long long          INT64;
#endif

to cover all new types. If there is a collision with user defined types, compile your program with -DNO_INT_TYPES_DEFINE and you remove the 
above definition. I hope there are no other conflicts.

Stefan
  2126   09 Mar 2021 Andreas SuterForumINT INT32 in experim.h
> > For my analyzer I generate the experim.h file from the odb.
This issue is still open. Shouldn't midas.h provide the 'new' data types as typedefs like  

typedef int INT32;

etc. Of course you would need to deal with all the supported targets and wrap it accordingly.

A.S.

> > 
> > Before midas commit 13c3b2b this generates structs with INT data types. compiles fine with my analysis code (using the old mana.cpp)
> > 
> > newer midas versions generate INT32, ... types. I get a 
> > 
> > ‘INT32’ does not name a type   
> > 
> > although I include midas.h 
> > 
> > how to fix this?
> 
> You could run experim.h through "sed" to replace the "wrong" data types with the correct data types.
> 
> You can also #define the "wrong" data types before doing #include experim.h.
> 
> I put your bug report into our bug tracker, but for myself I am very busy
> with the alpha-g experiment and cannot promise to fix this quickly.
> 
> https://bitbucket.org/tmidas/midas/issues/289/int32-types-in-experimh
> 
> Here is an example to substitute things using "sed" (it can also do "in-place" editing, "man sed" and google sed examples)
> sed "sZshm_unlink(.*)Zshm_unlink(SHM)Zg"
> 
> K.O.
  2125   05 Mar 2021 Svetlana ChesnevskayaBug ReportNew MIDAS old frontend incompatibility
Hello!

Could you help me solve the problem of compatibility between our frontend (created in 2017) and the fresh MIDAS? The old MIDAS (2017) worked well, then we did not use it.
While compiling the frontend, I get a lot of warnings and a few compilation errors.

Any help will be greatly appreciated.

Thanks in advance.
With the best regards,
Svetlana
Attachment 1: error.log
g++ -c -m64 -g -O0 -Wall -Wextra  -I. -I/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include -I/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/drivers/vme -I/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/drivers/vme/sis3100 -I/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/drivers/vme/sis3100/linux -L/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/drivers/vme/sis3100/lib -Wunused-variable -DHAVE_MIDAS__  -D__HAVE_MIDAS -I./include -I./include/CP80190_80057 -DOS_LINUX -Dextname src/realEventFrontend.cc -o src/realEventFrontend.o
In file included from ./include/v1742.hh:4:0,
                 from src/realEventFrontend.cc:16:
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1336:21: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    DWORD event_id = 0;
                     ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1338:18: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    DWORD n_tag = 0;
                  ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1343:19: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int hist_fh  = 0;
                   ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1344:19: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int index_fh = 0;
                   ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1345:19: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int def_fh   = 0;
                   ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1346:23: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    DWORD base_time  = 0;
                       ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/midas.h:1347:23: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    DWORD def_offset = 0;
                       ^
In file included from src/realEventFrontend.cc:18:0:
./include/CP80057.hh: In Konstruktor »CP80057::CP80057(unsigned int, MVME_INTERFACE*, HNDLE)«:
./include/CP80057.hh:20:45: Warnung: Konvertierung in Nicht-Zeiger-Typ »uint32_t {aka unsigned int}« von NULL [-Wconversion-null]
       vme_port_addr(vmeBaseAdress), port(0x0)                          {}
                                             ^
src/realEventFrontend.cc: Im globalen Gültigkeitsbereich:
src/realEventFrontend.cc:32:42: Warnung: verengende Umwandlung von »2425356288u« von »unsigned int« nach »const int« in { } ist in C++11 ungültig [-Wnarrowing]
                                0x90910000};
                                          ^
src/realEventFrontend.cc:32:42: Warnung: verengende Umwandlung von »2425421824u« von »unsigned int« nach »const int« in { } ist in C++11 ungültig [-Wnarrowing]
In file included from src/realEventFrontend.cc:48:0:
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:348:22: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    BOOL is_mserver = 0;             /*  this is an mserver server-side connection */
                      ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:349:20: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int send_sock = 0;               /*  tcp send socket         */
                    ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:350:20: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int recv_sock = 0;               /*  tcp receive socket      */
                    ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:351:21: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    int event_sock = 0;              /*  tcp event socket        */
                     ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:352:25: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT remote_hw_type = 0;          /*  hardware type           */
                         ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:353:27: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT watchdog_timeout = 0;        /*  in milliseconds         */
                           ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:354:26: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    DWORD last_activity = 0;         /*  time of last recv       */
                          ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:355:24: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT convert_flags = 0;           /*  convertion flags        */
                        ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:358:26: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT net_buffer_size = 0;         /*  size of TCP cache       */
                          ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:359:18: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT write_ptr=0, read_ptr=0, misalign=0;   /* pointers for cache */
                  ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:359:30: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT write_ptr=0, read_ptr=0, misalign=0;   /* pointers for cache */
                              ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:359:42: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT write_ptr=0, read_ptr=0, misalign=0;   /* pointers for cache */
                                          ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:360:21: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT ev_write_ptr=0, ev_read_ptr=0, ev_misalign=0;
                     ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:360:36: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT ev_write_ptr=0, ev_read_ptr=0, ev_misalign=0;
                                    ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:360:51: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    INT ev_write_ptr=0, ev_read_ptr=0, ev_misalign=0;
                                                   ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:361:23: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    HNDLE odb_handle = 0;            /*  handle to online datab. */
                       ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:362:26: Warnung: nicht-statische Initialisierungen für Datenelemente nur mit -std=c++11 oder -std=gnu++11 verfügbar [standardmäßig aktiviert]
    HNDLE client_handle = 0;         /*  client key handle .     */
                          ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:525:34: Fehler: Deklaration der C-Funktion »std::string cm_get_path()« steht in Konflikt mit
    std::string EXPRT cm_get_path();
                                  ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:524:14: Fehler: vorherige Deklaration »INT cm_get_path(char*, int)« hier
    INT EXPRT cm_get_path(char *path, int path_size);
              ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:629:31: Fehler: Deklaration der C-Funktion »std::string ss_gethostname()« steht in Konflikt mit
    std::string ss_gethostname();
                               ^
/home/svetlana/packages/hodor_DAQ/ASACUSA/midas/include/msystem.h:628:8: Fehler: vorherige Deklaration »INT ss_gethostname(char*, int)« hier
    INT ss_gethostname(char* buffer, int buffer_size);
        ^
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status« fehlt [-Wmissing-field-initializers]
       };  
       ^
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status_color« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::hidden« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::write_cache_size« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status_color« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::hidden« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::write_cache_size« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status_color« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::hidden« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::write_cache_size« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status_color« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::hidden« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::write_cache_size« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::driver« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::event_descrip« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::status_color« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::hidden« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »EQUIPMENT_INFO::write_cache_size« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::readout« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::driver« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::event_descrip« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::cd_info« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::status« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_called« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::last_idle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::poll_count« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::format« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::buffer_handle« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::hkey_variables« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::serial_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::subevent_number« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_out« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::odb_in« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::bytes_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::events_sent« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:200:7: Warnung: Initialisierung für Element »eqpmnt::stats« fehlt [-Wmissing-field-initializers]
src/realEventFrontend.cc:295:5: Warnung: unbenutzter Parameter »run_number« [-Wunused-parameter]
 INT begin_of_run(INT run_number, char *error){
     ^
src/realEventFrontend.cc:295:5: Warnung: unbenutzter Parameter »error« [-Wunused-parameter]
src/realEventFrontend.cc:337:5: Warnung: unbenutzter Parameter »run_number« [-Wunused-parameter]
 INT end_of_run(INT run_number, char *error){
     ^
src/realEventFrontend.cc:337:5: Warnung: unbenutzter Parameter »error« [-Wunused-parameter]
src/realEventFrontend.cc:351:5: Warnung: unbenutzter Parameter »run_number« [-Wunused-parameter]
 INT pause_run(INT run_number, char *error){
     ^
src/realEventFrontend.cc:351:5: Warnung: unbenutzter Parameter »error« [-Wunused-parameter]
src/realEventFrontend.cc:357:5: Warnung: unbenutzter Parameter »run_number« [-Wunused-parameter]
 INT resume_run(INT run_number, char *error){
     ^
src/realEventFrontend.cc:357:5: Warnung: unbenutzter Parameter »error« [-Wunused-parameter]
src/realEventFrontend.cc:395:5: Warnung: unbenutzter Parameter »cmd« [-Wunused-parameter]
 INT interrupt_configure(INT cmd, INT source, PTYPE adr){
     ^
src/realEventFrontend.cc:395:5: Warnung: unbenutzter Parameter »source« [-Wunused-parameter]
src/realEventFrontend.cc:395:5: Warnung: unbenutzter Parameter »adr« [-Wunused-parameter]
src/realEventFrontend.cc:521:5: Warnung: unbenutzter Parameter »off« [-Wunused-parameter]
 INT read_clock_event(char *pevent, INT off){
     ^
src/realEventFrontend.cc:550:5: Warnung: unbenutzter Parameter »off« [-Wunused-parameter]
 INT read_calibration_data_event(char *pevent, INT off){
     ^
src/realEventFrontend.cc:572:5: Warnung: unbenutzter Parameter »off« [-Wunused-parameter]
 INT read_tdc_event(char *pevent, INT off){
     ^
src/realEventFrontend.cc:644:7: Warnung: unbenutzter Parameter »ptr« [-Wunused-parameter]
 void *updateCUSPRunNumber(void *ptr){
       ^
src/realEventFrontend.cc:658:7: Warnung: unbenutzter Parameter »ptr« [-Wunused-parameter]
 void *restartRun(void *ptr){
       ^
make: *** [src/realEventFrontend.o] Fehler 1
  2124   04 Mar 2021 Marius KoeppelForumUsing JSROOT.openFile with Midas
> would this work for what you are doing?

Yes, having such a function would be perfect for the applications I have a the moment.

> (this is not good enough if data has to be pre-digested by c++ analysis in rootana)

Also agree, if one wants to have a more sophisticated applications it is definitely needed to preprocess the data.

Cheers,
Marius
  Draft   04 Mar 2021 Stefan RittForumUsing JSROOT.openFile with Midas
I also need midas events going back to the
  2122   04 Mar 2021 Stefan RittForumUsing JSROOT.openFile with Midas
I also need midas events going back to the browser for single event display, so put +1 for me.

Please also consider to use JavaScript typed arrays instead of JSON. For large midas banks, type 
arrays are 5-10 times faster than JSON encoding/decoding.

Best,
Stefan
  2121   04 Mar 2021 Konstantin OlchanskiForumUsing JSROOT.openFile with Midas
well, if this is something in ROOT, perhaps you can pursue it with the ROOT crowd,
they are quite friendly.

on my side, if all you need is to pull event data banks, this is easy to add
in mhttpd.

the jsonrpc request will look something like this:

get_event {
"buffer":"system",
"get_type":"GET_LATEST", (or whatever bm_receive_event() can do)
"include_banks":["AAAA","BBBB"],
"exclude_banks":["CCCC","DDDD"]
}

and return something like this:

event {
"header":{"event_id":1,...},
"banks":{
"AAAA":[1,2,3,4],
"BBBB":NULL (you asked for it, so you always get it, but it is NULL if bank does not exist)
}
}

would this work for what you are doing?

(this is not good enough if data has to be pre-digested by c++ analysis in rootana)

K.O.
  2120   04 Mar 2021 Marius KoeppelForumUsing JSROOT.openFile with Midas
Thank you for the answer :)

> At some point I would like to provide a function to "get" TAFlowEvent objects so you can do things
> like event displays in javascript. But I need a c++ to json serializer and standard c++ does not have it.
> So I will have to use the clang serializer (also used by ROOT) and it will take me a few days
> to figure it out.

That sounds exactly what I was searching for. Because I wanted to create an interface between rootana and 
an event display build in javascript. Since all I tried did not really worked with the current rootana
I have now a "solution". I use the MIDAS python client, read directly events from the MIDAS buffer and provided
the events in a JSON format with the python flask API. Since the rendering of the event display is the bottleneck 
and I only need a view events to display this solution worked really well for me. Maybe having such a JSON API of 
the event buffer in MIDAS directly would also work for most of the event display applications or other simple javescript 
applications (my opinion).

> If you figure out the missing bits that need to be added to our code,
> please post them here or submit them as a pull request or a bug report in bitbucket.

One of the problems I had was the CORS domain of the THttpServer. In manalyzer:1894 you do 
sprintf(str, "http:127.0.0.1:%d", httpPort); but there are additional options for the THttpServer (like "?cors=DOMAIN").
So maybe a flag while starting manalyzer passing such options would be nice. I will create a pull request passing them later.

> Also it would be good if you can provide a code example of "openFile" working elsewhere
> but not with manalyzer, if I can run it, maybe I can figure out what's missing. But lacking
> some example code, there is nothing for me to hack at.

The problem is that it was not even running on simple THttpServer using interactive root:

    serv = new THttpServer("http:8088?cors=*");
    TFile *_file0 = TFile::Open("example_root.root")
    serv->Register("File", _file0);

So I tried just saving the file in the $MIDAS_DIR and tried to use mserver with JSROOT.openFile. I attached the html file and 
a test root file.

Cheers,
Marius
Attachment 1: test.html
Attachment 2: example_root.root
  2119   03 Mar 2021 Konstantin OlchanskiBug ReportUndefined client causing issues in transition.
> It does not get stuck if I run my DAQ using the odbedit commands (start/stop).

Interesting. Run start/stop from odbedit works but from mhttpd gets stuck.

I think they do not run the transition quite the same way. mhttpd uses the multithreaded transition.

So we can debug this using the "mtransition" program. Try:

- mtransition -v -d 1 START/STOP -- this should be same as odbedit
- mtransition -m -v -d 1 START/STOP -- this should be same as mhttpd

The "-v" and "-d 1" flags should cause lots of output, for failed transitions,
cut-and-paste it all into this elog here, should give us plenty of meat to debug.

K.O.
  2118   03 Mar 2021 Konstantin OlchanskiForumUsing JSROOT.openFile with Midas
> 
> I am currently trying to access a ROOT file produced by manalyzer. By calling JSROOT.openFile("MIDAS_DOMAIN/outputRUN.root"). I can download the rootfile via MIDAS_DOMAIN/outputRUN.root. Using JSROOT.openFile results in an 501 error, 
> since the request feature is not provided. Using a simple API and uploading outputRUN.root there worked fine (when the run finised). 
> 
> Is there a way to use JSROOT.openFile with the current analyzed root file in Midas (so during the run)? I know that one can access histograms of the THttpServer via JSON but I need to get the full root tree.
> 

Good questions. Right now in manalyzer I do not do anything more than starting the ROOT web server (so whatever
they support should work) and providing two "standard" location: one in the output file for histograms
and other permanent output and one in memory for transient objects, such as waveform plots, etc.

At some point I would like to provide a function to "get" TAFlowEvent objects so you can do things
like event displays in javascript. But I need a c++ to json serializer and standard c++ does not have it.
So I will have to use the clang serializer (also used by ROOT) and it will take me a few days
to figure it out.

Back to "openFile".

If you figure out the missing bits that need to be added to our code,
please post them here or submit them as a pull request or a bug report in bitbucket.

Also it would be good if you can provide a code example of "openFile" working elsewhere
but not with manalyzer, if I can run it, maybe I can figure out what's missing. But lacking
some example code, there is nothing for me to hack at.

K.O.
  2117   03 Mar 2021 Konstantin OlchanskiInfoshortest possible sleep
> Why do you need that?

UNIX/POSIX advertises functions for sleeping in microseconds and nanoseconds,
for sure it is interesting to know what they actually do and what happens
when you ask them to sleep for 1 microsecond or 1 nanosecond.

To sleep or not to sleep that is a question.

But if I do decide to sleep, and I call the sleep function, I want to know what actually happens.

Now I do and I share it with all.

On current Linux, shortest sleep is around 60 usec. select() with sleep
shorter than that will not sleep at all, nanosleep() will always sleep for
the shortest amount.

P.S. For fans of interrupts ("because they are fast"), sleep waiting for interrupt
probably has same latency/granularity as above (60 usec), so if I drive a DMA engine
and I except the DMA transfer to complete under 60 usec, I should use a busy loop
to poll the "DMA done" bit instead of going to sleep and wait for the DMA interrupt.

K.O.
ELOG V3.1.4-2e1708b5