Back Midas Rome Roody Rootana
  Root Analyzer Framework, Page 2 of 4  Not logged in ELOG logo
ID Date Author Topicdown Subject
  1   10 Mar 2016 Thomas LindnerInfoNew forum for rootana MIDAS analyzer
This is a new forum for discussing the rootana MIDAS analyzer.  

Code is on bitbucket:

https://bitbucket.org/tmidas/rootana

There is also an associated wiki for rootana documentation

https://midas.triumf.ca/MidasWiki/index.php/ROOTANA
  2   10 Mar 2016 Thomas LindnerInfoweb display of MIDAS data using rootana+THttpServer
I have finished a test implementation of a web display for MIDAS online
monitoring.  I have a test version of this display running here:

https://midastestdaq.triumf.ca/CS/webdisplay

(username/pwd: testdaq/testdaq)

The main features of this way of display MIDAS data are:

- An online rootana program that produces ROOT TH1 and TH2 histogram.
- A web server provided by ROOT (THttpServer) which serves up the histogram
information in JSON format.
- A bunch of crude html/javascript that grabs the JSON and plots it using a
couple of third-party javascript plotting packages.

I have written a more detailed description of this procedure (including some
known deficiencies) which is available here

https://midas.triumf.ca/MidasWiki/index.php/Rootana_javascript_displays

The html/javascript for plotting is available in rootana/examples/html.  It
should be noted that this procedure is only weakly coupled to rootana; you could
pretty easily take any program that makes ROOT histograms, add this THttpServer
and re-work my html/javascript to plot it.  Most of the hard-work is already
provided by THttpServer (which incidentally is available in newer versions of
both ROOT5 and ROOT6).

I am imagining the following scenario for using these web tools:

- we use this web-based display of online MIDAS data for a sub-set of key plots
for shift-takers and for remote experts to provide quick feed-back (when you are
on the bus, at the bar, on the ski hill).
- we continue to use some rootana GUI that provides a complete set of all the
online MIDAS plots, as well as the ability to play-back data in MIDAS files.

I can imagine a situation where we might only use the web tools, though I
haven't yet thought seriously about how to allow a play-back of MIDAS files
through web display.

Hopefully people find these tools useful.  I'm interested in all feed-back.
  3   16 Sep 2016 Konstantin OlchanskiInfoROOT v6 status
ROOT v6 has been around for a while now, finally got around to test it with ROOTANA.

a) using root-v6-06-08
b) everything compiles and links
c) the example applications - i.e. display_example.exe - seem to run correctly
d) user applications linked against librootana.a show a problem loading the ROOTANA rdict.pcm files.

Failure to load the rdict.pcm files seems to prevent some functions, at least in the GUIs.

I do not fully understand how ROOT is supposed to find these files and I am asking for help on the ROOT forum.

In the mean time, there is a work around:
- symlink all rdict.pcm files into same place as the executable: ln -sv $ROOTANASYS/*/*.pcm .
- symlink all (many) .h files into the same place (this is a bit extreme): ln -sv $ROOTANASYS/include/* .

K.O.
  4   30 Sep 2016 Konstantin OlchanskiInfoROOT v6 status
> ROOT v6 has been around for a while now, finally got around to test it with ROOTANA.

The problems with loading rdict.pcm files and c++ .h header files is resolved, ROOTANA should be fully usable with ROOTv6:

Put this in your login file:

export ROOTANASYS=$HOME/packages/rootana
export ROOT_INCLUDE_PATH=$ROOTANASYS/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTANASYS/obj

Explanation:
- LD_LIBRARY_PATH is used to search for rdict.pcm files.
- ROOT_INCLUDE_PATH is used to find the c++ .h header files.

K.O.
  5   25 Jan 2017 Thomas LindnerInfoweb display of MIDAS data using rootana+THttpServer
I have added some additional features to the example webdisplay that we have for
ROOTANA data (where we are displaying rootana data through ROOT THttpServer).  

The main improvement to the display is that I added the ability to plot the data
using the JSROOT package [1].  Previously I had used different packages (dygraphs
and plot-ly) for plotting.  The JSROOT plots are not obviously superior, though they
do present data in a more familiar way (at least for me).  The rootana webdisplay
currently  allows you to switch between the two different styles.

You can see a working example of the webdisplay here:

https://midastestdaq.triumf.ca/CS/webdisplay
(username/pwd: testdaq/testdaq)

All details on setting up that example are here:

https://midas.triumf.ca/MidasWiki/index.php/Rootana_javascript_displays#Custom_web_display

I'm interested in any feedback on which plotting style people prefer (or any other
aspects of the rootana webdisplay).

[1] https://root.cern/js/
  6   26 Jan 2017 Pierre GorelInfoweb display of MIDAS data using rootana+THttpServer
> I'm interested in any feedback on which plotting style people prefer (or any other
> aspects of the rootana webdisplay).

I personally prefer the ROOT style. It seems that they are equivalent, but it is possible to
change to log scale in X, Y (and Z for 2D) by simple click right on the plot. I cannot find
this feature in plot-ly. Unfortunately, it comes back to linear at the next refresh it seems...
Also, I prefer the 1D histograms as colums, not a segments.
  7   03 May 2017 Alberto RemotoInfoweb display of MIDAS data using rootana+THttpServer
Hi Thomas,

> All details on setting up that example are here:
> 
> https://midas.triumf.ca/MidasWiki/index.php/Rootana_javascript_displays#Custom_web_display

I am trying to test the webdisplay but I am not sure which would be the path:

I start the  THttpServer with:

$ ana.exe -r9091

But on the url:

http://localhost:9091/

I find just the default browser provided by JSROOT, while nothing is found on:

http://localhost:9091/CS/webdisplay

Where am I supposed to find the custom webdisplay provided by you?

Thank you, Alberto.
  8   03 May 2017 Thomas LindnerInfoweb display of MIDAS data using rootana+THttpServer
> 
> Hi Thomas,
> 
> > All details on setting up that example are here:
> > 
> > https://midas.triumf.ca/MidasWiki/index.php/Rootana_javascript_displays#Custom_web_display
> 
> I am trying to test the webdisplay but I am not sure which would be the path:
> 
> I start the  THttpServer with:
> 
> $ ana.exe -r9091
> 
> But on the url:
> 
> http://localhost:9091/
> 
> I find just the default browser provided by JSROOT, while nothing is found on:
> 
> http://localhost:9091/CS/webdisplay
> 
> Where am I supposed to find the custom webdisplay provided by you?

Hi Alberto,

I have added some additional details to the MediaWiki page that you referenced above.  The main point is as follows:

1) You need to setup a custom MIDAS webpage to point towards the example code in 
rootana/examples/html/generic_webdisplay.html
This means you need to add new entries to the ODB directory /Custom

2) The 'same-origin policy' means that you need to setup some sort of proxying so that the custom web page can access the 
ROOT webpage.  So, let's suppose in your case that you had the following ports for web servers:

ROOT webserver: localhost:9091
MIDAS webserver: localhost:8081

so in that case you would want to setup an APACHE proxy so that

localhost -> localhost:8081 (for the MIDAS server)
localhost/rootana -> localhost:9091 (for the ROOT server)

then the custom page would be available at

localhost/CS/webdisplay

Please read my updated documentation and see if this makes any more sense.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
  9   09 May 2017 Konstantin OlchanskiInfoweb display of MIDAS data using rootana+THttpServer
> 
> 2) The 'same-origin policy' means that you need to setup some sort of proxying so that the custom web page can access the 
> ROOT webpage.  So, let's suppose in your case that you had the following ports for web servers:
> [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
>

The MIDAS web server mhttpd already implements CORS, so you can access mhttpd AJAX and JSON-RPC from external web pages, no need to proxy.

Does the ROOT web server NOT implement CORS? We should file a bug report with ROOT if it does not.

K.O.
  20   10 Mar 2020 Konstantin OlchanskiInfoweb display of MIDAS data using rootana+THttpServer
> > 
> > 2) The 'same-origin policy' means ...
> > https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
> >
> 
> The MIDAS web server mhttpd already implements CORS, so you can access mhttpd AJAX and JSON-RPC from external web pages, no need to proxy.
> Does the ROOT web server NOT implement CORS? We should file a bug report with ROOT if it does not.

For the record, the web server in ROOT 6.20 does implement CORS via the "cors=" option, see
https://github.com/root-project/jsroot/blob/master/docs/HttpServer.md

K.O.
  22   22 May 2020 Konstantin OlchanskiInforootana updates
I am updating the rootana code to include all the latest developments in midas and 
elsewhere:

- mxml, mjson (and soon mvodb, midasio and manalyzer) are moving into git submodules 
(shared with midas and usable as standalone code)
- VirtualOdb is gone, use MVOdb instead
- TMidasFile is gone, use TMReader and TMWriter in midasio.h
- TMidasEvent remains, I will update it with Stefan's to the midas bank format.
- TMEvent in midasio.h will also be updated for this
- TMEvent has incomplete implementation for creating new events and adding data banks, I 
hope to fix this. This should make midasio classes useful for writing MIDAS frontends.
- I am still thinking about what to do with roody and the XmlServer, MidasServer and 
NetDirectory code. Most likely remove it all and concentrate in supporting JSROOT and the 
associated ROOT-built-in web server. Maybe update roody to use the JSROOT interface to 
get data from the analyzer.

If you do not want to see all these changes, please use the rootana-2020-03 release 
branch.

After all changes are implemented and tested, I will cut a release branch and post an 
announcement.

K.O.
  39   04 Apr 2021 Konstantin OlchanskiInfodrop support for ROOT v5?
There is problem report about failing builds against ROOT v5. https://bitbucket.org/tmidas/rootana/issues/19/make-error-rtypesimph-should-only-be

At TRIUMF, do we even still have anybody who uses ROOT v5 with ROOTANA?

My newest copy of ROOT v5 is from 2016 and I am not sure it would run on any computer we still have.

So is ROOT v5 still relevant, should we officially say ROOT v5 is not supported?

K.O.
  44   29 Apr 2021 Konstantin OlchanskiInfomanalyzer split into a git submodule
In preparation to including the manalyzer into MIDAS, I split it into a separate 
repository and included it into ROOTANA as a git submodule.

https://bitbucket.org/tmidas/manalyzer/src/master/

This will cause a minor difficulty and require a manual adjustment next time you 
do a "git pull":
- check that (a) manalyzer directory is empty or (b) it only has .o and .exe 
files, in both cases delete it
- run "git submodule init; git submodule update", you should see it clone the 
manalyzer repository

K.O.
  48   04 Apr 2023 Marius KoeppelInfoDocumentation Event Flow
Hi all,

following the e-mail conversation from Konstantin. The next topic we discussed was the event flow.

What I want to have (especially for commissioning phases for an experiment) is the possibility to have some kind of online calibration setup. 
So one has some kind of detector X which sends data and another detector Y which also sends data and I want to correlate the two detectors after applying some kinds of cleaning steps to the data. 

Mail me: Having the event flow maybe „orthogonal“ - not sure how to say this correctly but at the moment there is only one flow in a linear direction.
So something like was my intuition:
eventX -> decodeX -flow-> cleanX -> buffer -> correlation of X/Y
                                      ^
                                      |
eventY -> decodeY -flow-> cleanY ->   |


Mail Konstantin: yes, you will have to explain what you mean. right now, the flow is linear, as is typical for most physics analysis.
                 however, at any point one is permitted to create new flow events and inject them to the top of the modules pipeline, this adds "loops".

So how would injection into the top help? So I clean x/y and than I inject them back to the top and create a third flow for the correlation?
If this is true maybe a simple example or some more words on the documentation would help. I would be also willing to do that. After I fully understand how this would be possible.

Best,
Marius
  25   07 Dec 2020 Isaac Labrie BoulayForumThe FIXED format.
Hi folks,

I am thinking of using the FIXED format event to avoid the overhead of the bank 
structure. The Wiki says under "FIXED Format Event" that the standard MIDAS 
analyzer cannot work with this format. What exactly is meant by this? Is it saying 
that the specific ROOTANA analyzer template will not work with the event format? 

Thanks for helping me out!

Isaac
  26   10 Dec 2020 Isaac Labrie BoulayForumROOTANA MidasWiki
Hi folks,

I'm currently looking at the ROOTANA wiki. I will be building an online MIDAS 
analyzer and I'm wondering if the wiki still contains useful information if I want 
to use the more recent 'manalyzer' template.

Thanks!

Isaac
  28   16 Dec 2020 Konstantin OlchanskiForumThe FIXED format.
> I am thinking of using the FIXED format event to avoid the overhead of the bank 
> structure. The Wiki says under "FIXED Format Event" that the standard MIDAS 
> analyzer cannot work with this format. What exactly is meant by this? Is it saying 
> that the specific ROOTANA analyzer template will not work with the event format? 

I am not sure if current code can deal with anything other than MIDAS data that uses 
the bank format. (even bk_init32a() support is incomplete in ROOTANA!).

I am curious why you have a problem with the bank format.

For bank overhead, there are several solutions:

a) if you have 1000 banks, 1 data word in each bank, you can create 1 MIDAS bank, store 
your data inside using your own optimized data format. (MIDAS overhead reduces from 
4000 words to 4 words, overhead from your custom data format goes from 0 to ???, so you 
may not gain much).

b) if you have 1000 data events, 1 data word in each event. Overhead is crazy: many 
words of event header, many words of bank header, etc. I would solve this storing
all your events inside one single midas event (say, 1000 data events per 1 midas 
event). Each data event can be stored in a midas bank (it is okey to have 1000 banks 
named "AAAA"), or you use solution (a). The m-analyzer is especially suitable for 
working with such "super events". In the unpacking module, AnalyzeEvent() would unpack 
each data event into a FlowEvent, in all the other modules, your FlowEvent-encapsulated 
data events will show up in the AnalyzeFlowEvent() method.

Next time I work on the midasio library and the TMEvent class I should check that it 
works with and that is usable with non-midas-bank data.

K.O.
  29   16 Dec 2020 Konstantin OlchanskiForumROOTANA MidasWiki
> I'm currently looking at the ROOTANA wiki. I will be building an online MIDAS 
> analyzer and I'm wondering if the wiki still contains useful information if I want 
> to use the more recent 'manalyzer' template.

All the documentation for manalyzer is in it's README.md file. I am not sure if the ROOTANA wiki makes 
correct reference to this.

The big idea is to make manalyzer part of midas, as replacement to the old mana.c analyzer.

For now, I plan to make manalyzer into a git submodule in midas and rootana (same as mjson, mvodb and 
midasio).

K.O.
  30   16 Dec 2020 Isaac Labrie BoulayForumThe FIXED format.
> > I am thinking of using the FIXED format event to avoid the overhead of the bank 
> > structure. The Wiki says under "FIXED Format Event" that the standard MIDAS 
> > analyzer cannot work with this format. What exactly is meant by this? Is it saying 
> > that the specific ROOTANA analyzer template will not work with the event format? 
> 
> I am not sure if current code can deal with anything other than MIDAS data that uses 
> the bank format. (even bk_init32a() support is incomplete in ROOTANA!).
> 
> I am curious why you have a problem with the bank format.
> 
> For bank overhead, there are several solutions:
> 
> a) if you have 1000 banks, 1 data word in each bank, you can create 1 MIDAS bank, store 
> your data inside using your own optimized data format. (MIDAS overhead reduces from 
> 4000 words to 4 words, overhead from your custom data format goes from 0 to ???, so you 
> may not gain much).
> 
> b) if you have 1000 data events, 1 data word in each event. Overhead is crazy: many 
> words of event header, many words of bank header, etc. I would solve this storing
> all your events inside one single midas event (say, 1000 data events per 1 midas 
> event). Each data event can be stored in a midas bank (it is okey to have 1000 banks 
> named "AAAA"), or you use solution (a). The m-analyzer is especially suitable for 
> working with such "super events". In the unpacking module, AnalyzeEvent() would unpack 
> each data event into a FlowEvent, in all the other modules, your FlowEvent-encapsulated 
> data events will show up in the AnalyzeFlowEvent() method.
> 
> Next time I work on the midasio library and the TMEvent class I should check that it 
> works with and that is usable with non-midas-bank data.
> 
> K.O.

Hey,

Yeah I had not yet really dove into the Event Structure documentation at the time that I 
wrote this email. The BANK format and I get along now. No problem there anymore.

Thanks for getting back to me sir.

Isaac
  31   18 Jan 2021 Isaac Labrie BoulayForumWarning: the time for this bank is more than 10 sec older than current time.
Hi all,

I get this warning when I run anaDisplay.exe (analyzer display mode) of the old 
Rootana analyzer. It seems to be because the analyzer cannot keep up with the data 
gathered by my frontend. The same issue seems to happen when I run the newer 
"manalyzer_example_root_graphic.exe" in graphical mode (-g). Is my computer cpu 
just not powerful enough to run both the data acquisition and the graphical 
analyzer simultaneously? Both the frontend and analyzer run on the same PC.

As always, thanks for the help!

Isaac the intern
ELOG V3.1.4-2e1708b5