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
d37d631b
Commit
d37d631b
authored
Jul 04, 2018
by
Simon Spannagel
Browse files
Check for presence of time informatrion before processing
parent
4b4be89d
Pipeline
#435003
failed with stages
in 2 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/ATLASpixEventLoader/ATLASpixEventLoader.cpp
View file @
d37d631b
...
...
@@ -100,6 +100,11 @@ void ATLASpixEventLoader::initialise() {
StatusCode
ATLASpixEventLoader
::
run
(
Clipboard
*
clipboard
)
{
// Check if event frame is defined:
if
(
!
clipboard
->
has_persistent
(
"eventStart"
)
||
!
clipboard
->
has_persistent
(
"eventEnd"
))
{
throw
ModuleError
(
"Event not defined. Add Metronome module or Event reader defining the event."
);
}
// If have reached the end of file, close it and exit program running
if
(
m_file
.
eof
())
{
m_file
.
close
();
...
...
@@ -181,7 +186,7 @@ Pixels* ATLASpixEventLoader::read_caribou_data(double start_time, double end_tim
<<
Units
::
display
(
timestamp
,
{
"s"
,
"us"
,
"ns"
})
<<
" > "
<<
Units
::
display
(
end_time
,
{
"s"
,
"us"
,
"ns"
})
<<
")"
;
// Rewind to previous position:
LOG
(
TRACE
)
<<
"Rewinding to file pointer : "
<<
oldpos
;
LOG
(
TRACE
)
<<
"Rewinding to file pointer : "
<<
oldpos
;
m_file
.
seekg
(
oldpos
);
break
;
}
...
...
@@ -206,7 +211,7 @@ Pixels* ATLASpixEventLoader::read_caribou_data(double start_time, double end_tim
}
// Store this position in the file in case we need to rewind:
LOG
(
TRACE
)
<<
"Storing file pointer position: "
<<
m_file
.
tellg
();
LOG
(
TRACE
)
<<
"Storing file pointer position: "
<<
m_file
.
tellg
();
oldpos
=
m_file
.
tellg
();
}
...
...
src/modules/Timepix3EventLoader/Timepix3EventLoader.cpp
View file @
d37d631b
...
...
@@ -247,6 +247,11 @@ StatusCode Timepix3EventLoader::run(Clipboard* clipboard) {
// be done in one of two ways: by taking all data in the time interval (t,t+delta), or by
// loading a fixed number of pixels (ie. 2000 at a time)
// Check if event frame is defined:
if
(
!
clipboard
->
has_persistent
(
"eventStart"
)
||
!
clipboard
->
has_persistent
(
"eventEnd"
))
{
throw
ModuleError
(
"Event not defined. Add Metronome module or Event reader defining the event."
);
}
LOG
(
TRACE
)
<<
"== New event"
;
int
loadedData
=
0
;
...
...
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