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
aa12af89
Commit
aa12af89
authored
Nov 12, 2018
by
Tomas Vanat
Browse files
fixed eventloader for ATLASPix: will not fail if T0 is the first event in the data file
parent
dfd6ef56
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.cpp
View file @
aa12af89
...
...
@@ -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
...
...
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.h
View file @
aa12af89
...
...
@@ -73,6 +73,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