DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
wibmod
src
WIB1
WIB_History.cpp
Go to the documentation of this file.
1
#include "
wibmod/WIB1/WIB.hh
"
2
3
std::vector<uint32_t>
4
WIB::CaptureHistory
(std::string
const
& address)
5
{
6
std::vector<uint32_t> ret;
7
uint32_t val;
8
while
((val =
Read
(address)) & 0x1) {
9
ret.push_back(val);
10
}
11
return
ret;
12
}
13
14
std::vector<uint128_t>
15
WIB::CaptureHistory
(std::string
const
& address,
size_t
wordCount)
16
{
17
std::vector<uint128_t> ret;
18
bool
capture =
true
;
19
uint16_t addr =
GetItem
(address)->
address
;
20
while
(capture) {
21
uint128_t
val = 0;
22
// Read address last since it causes the incr.
23
for
(
size_t
offset
= wordCount;
offset
> 0;
offset
--) {
24
val |=
uint128_t
(
Read
(addr + (
offset
- 1)) << 32 * (
offset
- 1));
25
}
26
ret.push_back(val);
27
if
(!(val & 0x1)) {
28
break
;
29
}
30
}
31
return
ret;
32
}
WIB.hh
uint128_t
unsigned __int128 uint128_t
Definition
WIB.hh:14
Item::address
uint16_t address
Definition
AddressTable.hh:18
WIBBase::GetItem
Item const * GetItem(std::string const &)
Definition
WIBBase.cpp:125
WIBBase::Read
uint32_t Read(uint16_t address)
Definition
WIBBase.cpp:147
WIB::CaptureHistory
std::vector< uint32_t > CaptureHistory(std::string const &address)
Definition
WIB_History.cpp:4
offset
double offset
Definition
conversions-impl.hh:28
Generated on
for DUNE-DAQ by
1.18.0