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

TFile::k630forwardCompatibility does not apply to new files correctly #16189

Open
1 task done
wdconinc opened this issue Aug 7, 2024 · 0 comments
Open
1 task done
Assignees
Labels

Comments

@wdconinc
Copy link
Contributor

wdconinc commented Aug 7, 2024

Check duplicate issues.

  • Checked for duplicates

Description

When setting TFile.v630forwardCompatibility to true in /etc/root/system.rootrc, there is still confusing behavior and new files can be written without compability. In particular, new files are not opened in compatibility mode (largely limiting the usefulness of the configuration flag).

Reproducer

gEnv->GetValue("TFile.v630forwardCompatibility", 0)

TFile file1 = TFile("file1.root","CREATE")
file1.TestBit(TFile::k630forwardCompatibility)
file1.Close()

TFile file2 = TFile("file1.root","READ")
file2.TestBit(TFile::k630forwardCompatibility)
file2.Close()

TFile* file3 = TFile::Open("file3.root","CREATE")
file3->TestBit(TFile::k630forwardCompatibility)
file3->Close()

TFile* file4 = TFile::Open("file3.root","READ")
file4->TestBit(TFile::k630forwardCompatibility)
file4->Close()

produces

$ root -l 
root [0] gEnv->GetValue("TFile.v630forwardCompatibility", 0)
(int) 1
root [1] 
root [1] TFile file1 = TFile("file1.root","CREATE")
(TFile &) Name: file1.root Title: 
root [2] file1.TestBit(TFile::k630forwardCompatibility)
(bool) false
root [3] file1.Close()
root [4] 
root [4] TFile file2 = TFile("file1.root","READ")
(TFile &) Name: file1.root Title: 
root [5] file2.TestBit(TFile::k630forwardCompatibility)
(bool) true
root [6] file2.Close()
root [7] 
root [7] TFile* file3 = TFile::Open("file3.root","CREATE")
(TFile *) 0x5650bd7edba0
root [8] file3->TestBit(TFile::k630forwardCompatibility)
(bool) false
root [9] file3->Close()
root [10] 
root [10] TFile* file4 = TFile::Open("file3.root","READ")
(TFile *) 0x5650bd584570
root [11] file4->TestBit(TFile::k630forwardCompatibility)
(bool) true
root [12] file4->Close()

ROOT version

   ------------------------------------------------------------------
  | Welcome to ROOT 6.30/02                        https://root.cern |
  | (c) 1995-2023, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Aug 02 2024, 15:34:40                 |
  | From heads/master@tags/v6-30-02                                  |
  | With g++ (Debian 12.2.0-14) 12.2.0                               |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Installation method

Spack

Operating system

Linux, debian

Additional context

Ref. #15006 .

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

No branches or pull requests

2 participants