Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
33907333
Commit
33907333
authored
Nov 12, 2018
by
Simon Spannagel
Browse files
Merge branch 'master' of
ssh://gitlab.cern.ch:7999/corryvreckan/corryvreckan
parents
032d1d16
4347913b
Pipeline
#584186
passed with stages
in 5 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.cpp
View file @
33907333
...
...
@@ -39,6 +39,8 @@ void EventLoaderATLASpix::initialise() {
uint32_t
datain
;
m_detectorBusy
=
false
;
// File structure is RunX/ATLASpix/data.dat
// Assume that the ATLASpix is the DUT (if running this algorithm
...
...
@@ -84,9 +86,11 @@ void EventLoaderATLASpix::initialise() {
LOG
(
STATUS
)
<<
"Found T0 event at position "
<<
m_file
.
tellg
()
<<
". Skipping all data before this event."
;
oldpos
=
m_file
.
tellg
();
unsigned
long
ts3
=
datain
&
0x00FFFFFF
;
std
::
streampos
tmppos
=
static_cast
<
int
>
(
oldpos
)
-
8
;
m_file
.
seekg
(
tmppos
);
while
(
static_cast
<
int
>
(
m_file
.
tellg
())
>
0
)
{
old_fpga_ts
=
(
static_cast
<
unsigned
long
long
>
(
ts3
));
int
checkpos
=
static_cast
<
int
>
(
oldpos
)
-
8
;
while
(
checkpos
>=
0
)
{
std
::
streampos
tmppos
=
checkpos
;
m_file
.
seekg
(
tmppos
);
m_file
.
read
(
reinterpret_cast
<
char
*>
(
&
datain
),
4
);
unsigned
int
message_type
=
(
datain
>>
24
);
// TS2
...
...
@@ -102,8 +106,7 @@ void EventLoaderATLASpix::initialise() {
<<
ts3
<<
". Some timestamps at the begining might be corrupted."
;
}
}
tmppos
=
static_cast
<
int
>
(
tmppos
)
-
4
;
m_file
.
seekg
(
tmppos
);
checkpos
=
static_cast
<
int
>
(
tmppos
)
-
4
;
}
m_file
.
seekg
(
oldpos
);
break
;
...
...
@@ -300,9 +303,15 @@ Pixels* EventLoaderATLASpix::read_caribou_data(double start_time, double end_tim
<<
Units
::
display
(
start_time
,
{
"s"
,
"us"
,
"ns"
})
<<
")"
;
continue
;
}
// this window still contains data in the event window, do not stop processing
window_end
=
false
;
if
(
m_detectorBusy
&&
(
busy_readout_ts
<
readout_ts
))
{
LOG
(
WARNING
)
<<
"ATLASPix went BUSY between "
<<
Units
::
display
((
m_clockCycle
*
static_cast
<
double
>
(
busy_readout_ts
)),
{
"s"
,
"us"
,
"ns"
})
<<
" and "
<<
Units
::
display
((
m_clockCycle
*
static_cast
<
double
>
(
readout_ts
)),
{
"s"
,
"us"
,
"ns"
})
<<
"."
;
m_detectorBusy
=
false
;
}
data_pixel_
++
;
// If this pixel is masked, do not save it
if
(
m_detector
->
masked
(
col
,
row
))
{
...
...
@@ -431,7 +440,8 @@ Pixels* EventLoaderATLASpix::read_caribou_data(double start_time, double end_tim
// BUSY was asserted due to FIFO_FULL + 24 LSBs of FPGA timestamp when it happened
case
0b00000010
:
m_identifiers
[
"BUSY_ASSERT"
]
++
;
busy_readout_ts
=
readout_ts
;
m_detectorBusy
=
true
;
// LOG(DEBUG) << "BUSY_ASSERTED\t" << ((datain)&0xFFFFFF);
break
;
...
...
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.h
View file @
33907333
...
...
@@ -56,6 +56,7 @@ namespace corryvreckan {
std
::
streampos
oldpos
;
unsigned
long
long
old_readout_ts
;
unsigned
long
long
old_fpga_ts
;
unsigned
long
long
busy_readout_ts
;
// int ts1Range;
int
ts2Range
;
...
...
@@ -73,6 +74,7 @@ namespace corryvreckan {
std
::
string
m_calibrationFile
;
double
m_startTime
;
bool
m_toaMode
;
bool
m_detectorBusy
;
bool
m_legacyFormat
;
double
m_clockCycle
;
// int m_clkdivendM;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment