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

operator= is deleted for TDirectory #50

Open
ngeraks opened this issue Dec 14, 2021 · 0 comments
Open

operator= is deleted for TDirectory #50

ngeraks opened this issue Dec 14, 2021 · 0 comments
Assignees

Comments

@ngeraks
Copy link

ngeraks commented Dec 14, 2021

Compilation error during make. (with root 6.24.06)
It seems to be due to TDirectory::operator= which is deleted.

QnAnalysis/src/QnAnalysisObservablesEK/na61/na61.cpp:352:31: error: use of deleted function ‘ROOT::Internal::TDirectoryAtomicAdapter& ROOT::Internal::TDirectoryAtomicAdapter::operator=(const ROOT::Internal::TDirectoryAtomicAdapter&)’
  352 |                  gDirectory = cwd;

Solution:
Use TDirectory* cwd = gDirectory; everywhere in the file.

edit:
Suggestion of ROOT team to use TContext
https://root-forum.cern.ch/t/tdirectory-operator-is-deleted/48064

@eugene274 eugene274 self-assigned this Apr 17, 2022
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