|
| 1 | +// DO NOT EDIT; automatically generated by root-gen-type |
| 2 | + |
| 3 | +package main |
| 4 | + |
| 5 | +import ( |
| 6 | + "fmt" |
| 7 | + "reflect" |
| 8 | + |
| 9 | + "go-hep.org/x/hep/groot/rbase" |
| 10 | + "go-hep.org/x/hep/groot/rbytes" |
| 11 | + "go-hep.org/x/hep/groot/rdict" |
| 12 | + "go-hep.org/x/hep/groot/rmeta" |
| 13 | + "go-hep.org/x/hep/groot/root" |
| 14 | + "go-hep.org/x/hep/groot/rtypes" |
| 15 | +) |
| 16 | + |
| 17 | +type ROOT__VecOps__RVec_float_ struct { |
| 18 | + This []float32 `groot:"This"` // <Float_t> Used to call the proper TStreamerInfo case |
| 19 | +} |
| 20 | + |
| 21 | +func (*ROOT__VecOps__RVec_float_) Class() string { |
| 22 | + return "ROOT::VecOps::RVec<float>" |
| 23 | +} |
| 24 | + |
| 25 | +func (*ROOT__VecOps__RVec_float_) RVersion() int16 { |
| 26 | + return 6 |
| 27 | +} |
| 28 | + |
| 29 | +// MarshalROOT implements rbytes.Marshaler |
| 30 | +func (o *ROOT__VecOps__RVec_float_) MarshalROOT(w *rbytes.WBuffer) (int, error) { |
| 31 | + if w.Err() != nil { |
| 32 | + return 0, w.Err() |
| 33 | + } |
| 34 | + |
| 35 | + hdr := w.WriteHeader(o.Class(), o.RVersion()) |
| 36 | + |
| 37 | + w.WriteStdVectorF32(o.This) |
| 38 | + |
| 39 | + return w.SetHeader(hdr) |
| 40 | +} |
| 41 | + |
| 42 | +// UnmarshalROOT implements rbytes.Unmarshaler |
| 43 | +func (o *ROOT__VecOps__RVec_float_) UnmarshalROOT(r *rbytes.RBuffer) error { |
| 44 | + if r.Err() != nil { |
| 45 | + return r.Err() |
| 46 | + } |
| 47 | + |
| 48 | + hdr := r.ReadHeader(o.Class()) |
| 49 | + if hdr.Vers > o.RVersion() { |
| 50 | + panic(fmt.Errorf( |
| 51 | + "rbytes: invalid %s version=%d > %d", |
| 52 | + o.Class(), hdr.Vers, o.RVersion(), |
| 53 | + )) |
| 54 | + } |
| 55 | + |
| 56 | + r.ReadStdVectorF32(&o.This) |
| 57 | + |
| 58 | + r.CheckHeader(hdr) |
| 59 | + return r.Err() |
| 60 | +} |
| 61 | + |
| 62 | +func init() { |
| 63 | + f := func() reflect.Value { |
| 64 | + var o ROOT__VecOps__RVec_float_ |
| 65 | + return reflect.ValueOf(&o) |
| 66 | + } |
| 67 | + rtypes.Factory.Add("ROOT::VecOps::RVec<float>", f) |
| 68 | +} |
| 69 | + |
| 70 | +func init() { |
| 71 | + // Streamer for ROOT::VecOps::RVec<float>. |
| 72 | + rdict.StreamerInfos.Add(rdict.NewCxxStreamerInfo("ROOT::VecOps::RVec<float>", 6, 0x9d22612c, []rbytes.StreamerElement{ |
| 73 | + rdict.NewCxxStreamerSTL(rdict.Element{ |
| 74 | + Name: *rbase.NewNamed("This", "<Float_t> Used to call the proper TStreamerInfo case"), |
| 75 | + Type: rmeta.Streamer, |
| 76 | + Size: 0, |
| 77 | + ArrLen: 0, |
| 78 | + ArrDim: 0, |
| 79 | + MaxIdx: [5]int32{0, 0, 0, 0, 0}, |
| 80 | + Offset: 0, |
| 81 | + EName: "ROOT::VecOps::RVec<float>", |
| 82 | + XMin: 0.000000, |
| 83 | + XMax: 0.000000, |
| 84 | + Factor: 0.000000, |
| 85 | + }.New(), 14, 5), |
| 86 | + })) |
| 87 | +} |
| 88 | + |
| 89 | +var ( |
| 90 | + _ root.Object = (*ROOT__VecOps__RVec_float_)(nil) |
| 91 | + _ rbytes.RVersioner = (*ROOT__VecOps__RVec_float_)(nil) |
| 92 | + _ rbytes.Marshaler = (*ROOT__VecOps__RVec_float_)(nil) |
| 93 | + _ rbytes.Unmarshaler = (*ROOT__VecOps__RVec_float_)(nil) |
| 94 | +) |
| 95 | + |
| 96 | +type ROOT__VecOps__RVec_int_ struct { |
| 97 | + This []int32 `groot:"This"` // <Int_t> Used to call the proper TStreamerInfo case |
| 98 | +} |
| 99 | + |
| 100 | +func (*ROOT__VecOps__RVec_int_) Class() string { |
| 101 | + return "ROOT::VecOps::RVec<int>" |
| 102 | +} |
| 103 | + |
| 104 | +func (*ROOT__VecOps__RVec_int_) RVersion() int16 { |
| 105 | + return 6 |
| 106 | +} |
| 107 | + |
| 108 | +// MarshalROOT implements rbytes.Marshaler |
| 109 | +func (o *ROOT__VecOps__RVec_int_) MarshalROOT(w *rbytes.WBuffer) (int, error) { |
| 110 | + if w.Err() != nil { |
| 111 | + return 0, w.Err() |
| 112 | + } |
| 113 | + |
| 114 | + hdr := w.WriteHeader(o.Class(), o.RVersion()) |
| 115 | + |
| 116 | + w.WriteStdVectorI32(o.This) |
| 117 | + |
| 118 | + return w.SetHeader(hdr) |
| 119 | +} |
| 120 | + |
| 121 | +// UnmarshalROOT implements rbytes.Unmarshaler |
| 122 | +func (o *ROOT__VecOps__RVec_int_) UnmarshalROOT(r *rbytes.RBuffer) error { |
| 123 | + if r.Err() != nil { |
| 124 | + return r.Err() |
| 125 | + } |
| 126 | + |
| 127 | + hdr := r.ReadHeader(o.Class()) |
| 128 | + if hdr.Vers > o.RVersion() { |
| 129 | + panic(fmt.Errorf( |
| 130 | + "rbytes: invalid %s version=%d > %d", |
| 131 | + o.Class(), hdr.Vers, o.RVersion(), |
| 132 | + )) |
| 133 | + } |
| 134 | + |
| 135 | + r.ReadStdVectorI32(&o.This) |
| 136 | + |
| 137 | + r.CheckHeader(hdr) |
| 138 | + return r.Err() |
| 139 | +} |
| 140 | + |
| 141 | +func init() { |
| 142 | + f := func() reflect.Value { |
| 143 | + var o ROOT__VecOps__RVec_int_ |
| 144 | + return reflect.ValueOf(&o) |
| 145 | + } |
| 146 | + rtypes.Factory.Add("ROOT::VecOps::RVec<int>", f) |
| 147 | +} |
| 148 | + |
| 149 | +func init() { |
| 150 | + // Streamer for ROOT::VecOps::RVec<int>. |
| 151 | + rdict.StreamerInfos.Add(rdict.NewCxxStreamerInfo("ROOT::VecOps::RVec<int>", 6, 0xbc2043d1, []rbytes.StreamerElement{ |
| 152 | + rdict.NewCxxStreamerSTL(rdict.Element{ |
| 153 | + Name: *rbase.NewNamed("This", "<Int_t> Used to call the proper TStreamerInfo case"), |
| 154 | + Type: rmeta.Streamer, |
| 155 | + Size: 0, |
| 156 | + ArrLen: 0, |
| 157 | + ArrDim: 0, |
| 158 | + MaxIdx: [5]int32{0, 0, 0, 0, 0}, |
| 159 | + Offset: 0, |
| 160 | + EName: "ROOT::VecOps::RVec<int>", |
| 161 | + XMin: 0.000000, |
| 162 | + XMax: 0.000000, |
| 163 | + Factor: 0.000000, |
| 164 | + }.New(), 14, 3), |
| 165 | + })) |
| 166 | +} |
| 167 | + |
| 168 | +var ( |
| 169 | + _ root.Object = (*ROOT__VecOps__RVec_int_)(nil) |
| 170 | + _ rbytes.RVersioner = (*ROOT__VecOps__RVec_int_)(nil) |
| 171 | + _ rbytes.Marshaler = (*ROOT__VecOps__RVec_int_)(nil) |
| 172 | + _ rbytes.Unmarshaler = (*ROOT__VecOps__RVec_int_)(nil) |
| 173 | +) |
0 commit comments