root-framework

Plotting ASCII files in ROOT

橙三吉。 提交于 2019-11-29 18:01:28
I am trying to write a small macro that reads data from an ASCII file that has 4 columns. But I want to graph only the second the third columns as (x, y). The constructor of TGraph can directly take a CSV file, see the documentation . TGraph g("data.csv", "%*lg %lg %lg %*lg", ","); The first argument is the filename, and the second argument a format string. Skipped columns are denoted with a * ; to skip the last column you could actually just omit it from the format string, %*lg %lg %lg The third argument is the column separator which might be , for your flavor of CSV. follow this example:

Clion or cmake does not see environment variable

[亡魂溺海] 提交于 2019-11-29 09:26:00
I'm using CLion IDE, Cmake and trying to write Hello world using CERN ROOT library. CMakeLists.txt : message(STATUS $ENV{ROOTSYS}) ~/.bashrc : export ROOTSYS="$HOME/tools/root-build/" During build in CLion $ENV{ROOTSYS} is empty by some reason. But $ENV{PATH} returns correct $PATH . What I did wrong? From CLion developers FAQ : Q: How to pass environment variables and parameters to CMake in CLion? A: The best way is to use Preferences/Settings | Build, Execution, Deployment | CMake dialog. As for .bashrc file, it is only used by bash . CLion doesn't need to use bash for run configuration