Commit 2439bbe
committed
Custom member streamer for CalArray<o2::tpc::PadFlags>::mData
This commit expands on #14427
and fixes the issue brought up in https://its.cern.ch/jira/browse/O2-4671.
After debugging/testing it turns out that the approach taken via a customer streamer
for std::vector<o2::tpc::PadFlags> does not take effect in the ROOT/IO because
apparently ROOT still prefers to use the CollectionProxy for std::vector and does not
employ the custom streamer.
Instead, after discussion with @pcanal, this commit proposes to implement a
custom stream just for the mData data member of CalArray<o2::tpc::PadFlags>.
This is the only place where we use o2::tpc::PadFlags in IO and it fixes the problem
when reading CCDB objects containing such data.
I have verified that the following code
```
o2-ccdb-downloadccdbfile -p TPC/Calib/IDC_PadStatusMap_A -t 1731274461770 -d ./ -o tpc_idc.root --no-preserve-path
root tpc_idc.root
gFile->Get<o2::tpc::CalDet<o2::tpc::PadFlags>>("ccdb_object")
```
correctly executes the custom streamer function.
Note that there is also no need to make the code ROOT version dependent. We need to fix the reading in any
case and the writing will just stay the same.
Concerning situations, where future classes will write data containing std::vector<o2::tpc::PadFlags>
we should be protected by the fact that this bug has been fixed >= ROOT 6.36 in any case.
This commit relates also to
root-project/root#17009
The commit also re-enables dictionary creation of related classes
and adds a dictionary for CalArray<o2::tpc::PadFlags> previously missing.1 parent 1d4bf48 commit 2439bbe
File tree
6 files changed
+83
-59
lines changed- DataFormats/Detectors/TPC
- src
- Detectors/TPC/base
- src
6 files changed
+83
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
Lines changed: 0 additions & 56 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments