Commit 7e71dab
committed
Work around ROOT bug in HitPattern IO read rule
Until root-project/root#17523, ROOT had a
(long-standing) issue that array dimensions would spill into all
following source types. To allow the rule to compile with old and
new versions of ROOT, move the array source last to work around
the issue.
For illustration purposes, here is the generated type of onfile before:
```
struct recocLcLHitPattern_Onfile {
typedef uint16_t onfile_hitPattern_t[50];
onfile_hitPattern_t &hitPattern;
typedef uint8_t onfile_hitCount_t[50];
onfile_hitCount_t &hitCount;
typedef uint8_t onfile_beginTrackHits_t[50];
onfile_beginTrackHits_t &beginTrackHits;
typedef uint8_t onfile_endTrackHits_t[50];
onfile_endTrackHits_t &endTrackHits;
typedef uint8_t onfile_beginInner_t[50];
onfile_beginInner_t &beginInner;
typedef uint8_t onfile_endInner_t[50];
onfile_endInner_t &endInner;
typedef uint8_t onfile_beginOuter_t[50];
onfile_beginOuter_t &beginOuter;
typedef uint8_t onfile_endOuter_t[50];
onfile_endOuter_t &endOuter;
}
```
and after this change:
```
struct recocLcLHitPattern_Onfile {
uint8_t &hitCount;
uint8_t &beginTrackHits;
uint8_t &endTrackHits;
uint8_t &beginInner;
uint8_t &endInner;
uint8_t &beginOuter;
uint8_t &endOuter;
typedef uint16_t onfile_hitPattern_t[50];
};
```1 parent 7f549d8 commit 7e71dab
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments