Comments (3)
This is a reproducer:
#include "TTree.h"
#include "TBufferFile.h"
void bulkmem() {
TTree t("t","t");
int i = 3;
t.Branch("fAlpha",&i);
for(i = 0; i < 100000; ++i)
t.Fill();
t.Print("");
TBufferFile buf(TBuffer::EMode::kWrite, 32*1024);
auto &r = t.GetBranch("fAlpha")->GetBulkRead();
int iteration = 0;
Long64_t events = t.GetEntries();
while (events) {
auto s = r.GetBulkEntries(0, buf);
events -= s;
fprintf(stderr, "#%d %lld events left %d\n", iteration, events, (int)s);
++iteration;
if (iteration > 2)
break;
}
}
where the 2nd iteration (and subsequent) have GetBulkEntries returning 0;
Inadvertently this shows that the TBasket are being dropped (and hence data is lost since it is not backed by a file) after the first use (i.e. the loop is not advancing). This is a fatal problem but might not have been the original problem.
from root.
With
#include "TTree.h"
#include "TBufferFile.h"
void bulkmem() {
TTree t("t","t");
int i = 3;
t.Branch("fAlpha",&i);
for(i = 0; i < 100000; ++i)
t.Fill();
t.Print("");
TBufferFile buf(TBuffer::EMode::kWrite, 32*1024);
auto &r = t.GetBranch("fAlpha")->GetBulkRead();
int iteration = 0;
Long64_t nentries = t.GetEntries();
Long64_t event_idx = 0;
while (nentries) {
auto s = r.GetBulkEntries(event_idx, buf);
nentries -= s;
event_idx += s;
fprintf(stderr, "#%d %lld events left %d\n", iteration, nentries, (int)s);
++iteration;
if (iteration > 2)
break;
}
}
I get
Fatal: fExtraBasket == nullptr && "fExtraBasket should have been set to nullptr by GetFreshBasket" violated at line 1475 of `/Users/pcanal/root_working/code/rootcling/tree/tree/src/TBranch.cxx'
from root.
It turns out that #6416 and this issue have the same original cause (not being able to handle basket that are not stored (on their own) in the file).
from root.
Related Issues (20)
- GitHub Actions stuck on mac12 and mac13 HOT 1
- `std::set` not working in Windows PyROOT
- Remove unnecessary `R__LOAD_LIBRARY` from tutorials
- [ntuple] `Show` and `PrintInfo` does not work for friend RNTuples HOT 4
- TGenPhaseSpace weight normalization
- RResulPtr could better convey/share ownership of pointee
- rootn.exe instant crash on startup HOT 1
- Build error with "nlohmann/json.hpp: No such file or directory" in spack (unit tests build, with --test=root option) HOT 8
- TBuffer* classes should abort in case the 1GB limit is being hit HOT 2
- [cling] Undocumented behaviour of root macro_C.so
- `-Dbuiltin_llvm=OFF` conflicts with use of 3D graphics (via Mesa built with LLVM) HOT 5
- Teach the CI to add a note in the summary comment if the failure is observed on other PRs
- Error at the prompt may lead to the JIT not finding std::basic_ostream symbol
- interpreter fails with assertion in debug builds on ARM when upgrading gcc HOT 3
- 1D `std::array` "has both a leaf count and a static length"
- 6.26 cannot read file written with 6.30.4 HOT 6
- TEfficiency drawing to .C is broken
- [ntuple] TObject serialization faulty
- [ntuple] Incorrect treatment of unsplittable classes HOT 2
- Allow ROOT::RDF::RCutFlowReport and ROOT::RDF::TCutInfo to be written to a file. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from root.