Commit 6d91a54
Write one empty TPC digit entry when a timeframe has no collision
This fixes the TPC digit writer producing a file without a tree when a
timeframe holds no collision.
- The custom close callback only called TFile::Close inside "if (entries >
0)", and never called TFile::Write, so with nothing to write the tree
never reached the file.
- The result was a 942 byte file with no o2sim tree, and every reader of it
failed on a missing branch rather than on an empty tree.
- Each branch is now filled once with the empty default object it is bound
to, so the file is an ordinary timeframe that happens to contain no digit
and the readers downstream stay on their normal path.
- The tree is written explicitly, the way RootTreeWriter's own close does.
https://its.cern.ch/jira/browse/O2-7132
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 3d40917 commit 6d91a54
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
0 commit comments