Trouble in Root

I am having issue running C file in root.
There is not error in program but there is no output.
I have already tried re-installing the root.

Processing CurrentMonitor.C...
Error: unrecognized flag --no-concurrent-sparkplug
Error: unrecognized flag --no-concurrent-sparkplug
Try --help for options
Try --help for options
Error: unrecognized flag --no-concurrent-sparkplug
Try --help for options
Error: unrecognized flag --no-concurrent-sparkplug
Try --help for options
Error: unrecognized flag --no-concurrent-sparkplug
Try --help for options
Error: unrecognized flag --no-concurrent-sparkplug
Try --help for options

These errors are not related to ROOT.
Inspect the “CurrentMonitor.C” macro (it seems it tries to run some external tools from inside, which then give these errors).

Can you post here CurrentMonitor.C ?

I’m having trouble running even simple programs (see below), but this one doesn’t display anything.
CurrentMonitor.C was working when I ran it on another computer, so I assumed the problem was in my root.

void draw_histo()
{
    ifstream in;
    in.open("week3_data.txt");
    double value=0.0;
    TH1D * h = new TH1D("h","Histogram Waiting time",10,9.5,20.5);
    while(!in.eof())
    {
        in>>value;
        h->Fill(value);
    }
    h->Draw();
}

week3_data.txt is missing.

Try with a one-liner:
if (in.is_open()) while(in>>value) h->Fill(value);

If you still see the problem, how exactly do you run the macro? What ROOT / operating system / compiler versions?

Here is the file,
week3_data.txt (49 Bytes)

That solve the issue of not opening the canvas at all, but it still not filling the histogram.
My setup id is as,
macOS Monterey version 12.4
root version 6.26/04

The first three bytes of the attached “week3_data.txt” file are “invisible” 0xEF, 0xBB, 0xBF. You need to remove them.

1 Like

Thank You so much that solved the issue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.