Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on MacOS Sonoma 14.2.1 #5

Open
Noor999000 opened this issue Jan 30, 2024 · 8 comments
Open

Installing on MacOS Sonoma 14.2.1 #5

Noor999000 opened this issue Jan 30, 2024 · 8 comments

Comments

@Noor999000
Copy link

Hi,

I am trying to install jRootAnalysisTools in MacOS Sonoma but am facing issues during the make step.

I have just installed a clean version of ROOT (6.30/02 ) based on the instructions from here https://root.cern/install/. I did compile ROOT with the arguments cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src -Dbuiltin_glew=ON. It was installed successfully. After that, I installed the jRootAnalysisTools v3.0 from https://github.com/jsmallcombe/jRootAnalysisTools/releases/tag/v3.0.

When I tried to compile jRootAnalysisTools I got this error

src/j_gating_frame.cpp:381:14: error: call to member function 'SetPointerPosition' is ambiguous
                fHslider1->SetPointerPosition(target_bin);

Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@jsmallcombe
Copy link
Owner

Hello,

Please can you try editing the file in src/j_gating_frame.cpp and replacing the line
fHslider1->SetPointerPosition(target_bin);
in method void j_gating_frame::ValuesToSliders()
your compiler says line 381, but I have it at 399

Replace with
fHslider1->SetPointerPosition((Double_t)target_bin);
If that works I'll push a patch.

@Noor999000
Copy link
Author

Yeah it worked but now I am getting this error

src/j_gating_tool.cpp:634:14: error: no viable overloaded '='
    clicktime=std::chrono::system_clock::now();

@jsmallcombe
Copy link
Owner

Can you try finding and replacing the problem line in src/j_gating_tool.cpp with this:
clicktime=std::chrono::duration_cast<std::chrono::system_clock::duration>(std::chrono::system_clock::now());

@Noor999000
Copy link
Author

After replacing I am getting error

src/j_gating_tool.cpp:634:15: error: no matching function for call to 'duration_cast' clicktime=std::chrono::duration_cast<std::chrono::system_clock::duration>(std::chrono::system_clock::now()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Noor999000
Copy link
Author

I made changes and it compiled successfully do you think changes are okay?

void jgating_tool::CSaveButton() {
    auto currentTime = std::chrono::system_clock::now();
    auto clicktime = std::chrono::duration_cast<std::chrono::seconds>(currentTime.time_since_epoch());

    std::chrono::duration<double> diff = std::chrono::system_clock::now() - std::chrono::time_point<std::chrono::system_clock>(clicktime);

    if (abs(diff.count()) < 2) {
        for (uint i = 0; i < savehists.size(); i++) {
            savechecks[i]->SetState(kButtonUp);
            savechecks[i]->SetState(kButtonDisabled);
            savebutton[i]->SetText("[Empty]");
        }
        ClearSaved();
        
        // cout << endl << "Saved results cleared." << endl;
    } else {
        cout << "Click twice to clear." << endl;
    }
}

@jsmallcombe
Copy link
Owner

I dont think that works, because clicktime is now redifined locally, so it cant measure a difference between times when the function is called.
Its not an important function for the code, so if it compiles now that is fine for you to use.

But I think if you return src/j_gating_tool.cpp to its original state and replace the definition on line 89 of include/j_gating_tool.h with
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> clicktime;
That should work.

@Noor999000
Copy link
Author

Yes, it worked thanks a lot, the other issue I found after installing it and then using the Peak Fitting tool was that I couldn't change the fit range. I tried everything but still I got the same range (two green lines) which I can't change by myself where I want. Here is the video in which I am trying to change the fit range: https://youtu.be/2GDgRLL9WD0

@jsmallcombe
Copy link
Owner

jsmallcombe commented Feb 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants