Skip to content

Commit a48d03f

Browse files
committed
Also use CONV_VALUE when set fields
1 parent a237729 commit a48d03f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plugins/hadaq/hadaq/defines.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ namespace hadaq {
177177
return (rest == 0) ? hedsize : (hedsize + 8 - rest);
178178
}
179179

180-
void SetSize(uint32_t bytes) { SetValue(&tuSize, bytes); }
180+
void SetSize(uint32_t bytes) { tuSize = CONV_VALUE(bytes); }
181181

182-
void SetDecoding(uint32_t decod) { SetValue(&tuDecoding, decod); }
182+
void SetDecoding(uint32_t decod) { tuDecoding = CONV_VALUE(decod); }
183183

184184
void Dump();
185185
};
@@ -197,7 +197,7 @@ namespace hadaq {
197197
HadTuId() : HadTu(), tuId(0) {}
198198

199199
inline uint32_t GetId() const { return CONV_VALUE(tuId); }
200-
void SetId(uint32_t id) { SetValue(&tuId, id); }
200+
void SetId(uint32_t id) { tuId = CONV_VALUE(id); }
201201

202202
inline bool GetDataError() const { return (GetId() & 0x80000000) != 0; }
203203

@@ -263,7 +263,7 @@ namespace hadaq {
263263
unsigned Alignment() const { return 1 << ( GetDecoding() >> 16 & 0xff); }
264264

265265
uint32_t GetTrigNr() const { return CONV_VALUE(subEvtTrigNr); }
266-
void SetTrigNr(uint32_t trigger) { SetValue(&subEvtTrigNr, trigger); }
266+
void SetTrigNr(uint32_t trigger) { subEvtTrigNr = CONV_VALUE(trigger); }
267267

268268
/* for trb3: each subevent contains trigger type in decoding word*/
269269
uint8_t GetTrigTypeTrb3() const { return (GetDecoding() & 0xF0) >> 4; }
@@ -449,16 +449,16 @@ is unique throughout all events ever acquired by the system.
449449
RawEvent() : HadTuId(), evtSeqNr(0), evtDate(0), evtTime(0), evtRunNr(0), evtPad(0) {}
450450

451451
uint32_t GetSeqNr() const { return CONV_VALUE(evtSeqNr); }
452-
void SetSeqNr(uint32_t n) { SetValue(&evtSeqNr, n); }
452+
void SetSeqNr(uint32_t n) { evtSeqNr = CONV_VALUE(n); }
453453

454454
int32_t GetRunNr() const { return CONV_VALUE(evtRunNr); }
455-
void SetRunNr(uint32_t n) { SetValue(&evtRunNr, n); }
455+
void SetRunNr(uint32_t n) { evtRunNr = CONV_VALUE(n); }
456456

457457
int32_t GetDate() const { return CONV_VALUE(evtDate); }
458-
void SetDate(uint32_t d) { SetValue(&evtDate, d); }
458+
void SetDate(uint32_t d) { evtDate = CONV_VALUE(d); }
459459

460460
int32_t GetTime() const { return CONV_VALUE(evtTime); }
461-
void SetTime(uint32_t t) { SetValue(&evtTime, t); }
461+
void SetTime(uint32_t t) { evtTime = CONV_VALUE(t); }
462462

463463
void Init(uint32_t evnt, uint32_t run=0, uint32_t id=EvtId_DABC)
464464
{

0 commit comments

Comments
 (0)