[TTreeProcessorMT] Use unambiguous syntax when building chains #8741
[TTreeProcessorMT] Use unambiguous syntax when building chains #8741eguiraud merged 1 commit intoroot-project:masterfrom
Conversation
|
Starting build on |
90ef255 to
a679199
Compare
|
Starting build on |
chain->Add("filename/treename") is ambiguous when filename does not
end in `.root`: in that case `TChain` interprets its argument
as the full path to the file, with no treename specified.
We now instead use the unambiguous syntax "filename?query#treename"
when building chains in TTreeProcessorMT.
This fixes root-project#8739 (reading files with no `.root` extension in RDF's
multi-thread event loops).
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
Failing tests: |
|
I'm a bit confused by this behaviour root [1] ROOT::RDataFrame(10).Define("x", "rdfentry_").Snapshot<ULong64_t>("entries", "10entries.root", {"x"})
(ROOT::RDF::RResultPtr<ROOT::RDF::RInterface<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager, void>::RLoopManager> >) @0x55f76d0
root [2] TChain c{"entries"};
root [3] c.Add("10entries.root?query#entries");
root [4] c.Print()
******************************************************************************
*Chain :entries : 10entries.root?query *
******************************************************************************
******************************************************************************
*Tree :entries : entries *
*Entries : 10 : Total = 977 bytes File Size = 469 *
* : : Tree compression factor = 1.34 *
******************************************************************************
*Br 0 :x : x/l *
*Entries : 10 : Total Size= 628 bytes File Size = 113 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.34 *
*............................................................................*
root [5] auto firstfile = static_cast<TFile *>(c.GetListOfFiles()->At(0));
root [6] firstfile->GetTitle()
(const char *) "10entries.root?query"i.e. the file then stores |
|
Yeah that's terrible but it does not really impact this PR, I think? The chains that we construct with the |
|
Build failed on mac11.0/cxx17. Failing tests:
|
|
@phsft-bot build please |
|
Starting build on |
chain->Add("filename/treename") is ambiguous when filename does not
end in
.root: in that caseTChaininterprets its argumentas the full path to the file, with no treename specified.
We now instead use the unambiguous syntax "filename?query#treename"
when building chains in TTreeProcessorMT.
This fixes #8739 (reading files with no
.rootextension in RDF'smulti-thread event loops).
Companion PR root-project/roottest#758 adds a test.