Skip to content

Using Hydra from ROOT (https: root.cern.ch)

Antonio Augusto Alves Junior edited this page Mar 29, 2018 · 3 revisions

Calling Hydra algorithms from ROOT (tested with ROOT 6.12/06)

Hydra can be used to write c++ scripts that can called directly from ROOT. These scripts can run in sequential mode using the CPP back-end or in parallel, using TBB back-end. Some examples of such scripts can be found in the Hydra/examples/root_macros/.

The steps below show hot to call the Hydra/examples/root_macros/fit_gaussian.C macro from ROOT (at user's home directory):

  1. git clone https://github.com/MultithreadCorner/Hydra
  2. export ROOT_INCLUDE_PATH=~/Hydra
  3. root -b -q ~/Hydra/examples/root_macros/fit_gaussian.C++ or
~: root
   ------------------------------------------------------------
  | Welcome to ROOT 6.12/06                http://root.cern.ch |
  |                               (c) 1995-2017, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-12-06, 9 February 2018                         |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] .x ~/Hydra/examples/root_macros/fit_gaussian.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/augalves/Hydra/examples/root_macros/fit_gaussian_C.so
...

Calling Hydra scripts in interpreter mode

Update [29/03/2018]: The issue https://sft.its.cern.ch/jira/browse/ROOT-9326 has been solved.

Unfortunately, due an issue in CLING, the ROOT's interactive interpreter, Hydra scripts can not be called in interpreter mode. There is a open JIRA ticket about this issue: https://sft.its.cern.ch/jira/browse/ROOT-9326

Calling Hydra scripts in compiler mode

rootcling does not detect deleted default constructors correctly, which causes the compilation of some Hydra classes to fail. There is a open ticket on this issue: https://sft.its.cern.ch/jira/browse/ROOT-9335