Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Corryvreckan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Naomi Davis
Corryvreckan
Commits
fc1b0564
Commit
fc1b0564
authored
2 years ago
by
Fabian Simon Lex
Browse files
Options
Downloads
Patches
Plain Diff
Changed the way feedback from data events is handled
parent
5d4865a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/EventLoaderALiBaVa/EventLoaderALiBaVa.cpp
+7
-23
7 additions, 23 deletions
src/modules/EventLoaderALiBaVa/EventLoaderALiBaVa.cpp
with
7 additions
and
23 deletions
src/modules/EventLoaderALiBaVa/EventLoaderALiBaVa.cpp
+
7
−
23
View file @
fc1b0564
...
...
@@ -114,7 +114,6 @@ void EventLoaderALiBaVa::initialize() {
m_alibava
->
set_polarity
(
polarity
);
const
char
*
ped_f
=
"alibava_ped.ped"
;
const
char
*
cal_f
=
"alibava_cal.cal"
;
// Create a pointer with the pedestal file
DataFileRoot
*
PedestalPointer
=
DataFileRoot
::
OpenFile
(
pedestalfilename
.
c_str
());
PedestalPointer
->
set_ROI
(
roi
);
...
...
@@ -197,31 +196,16 @@ StatusCode EventLoaderALiBaVa::run(const std::shared_ptr<Clipboard>& clipboard)
// Read a data event from the ALiBaVa data file
// Give feedback according to return code
int
return_code
=
m_alibava
->
read_event
();
if
(
return_code
==
-
1
)
{
return
StatusCode
::
EndRun
;
// Not sure if this is end of run or something else. Need to see difference between HDF5 and binary
}
else
if
(
return_code
==
0
)
{
LOG
(
ERROR
)
<<
"There
\'
s something wrong (0) with the datafile"
;
LOG
(
ERROR
)
<<
"Terminating run"
;
return
StatusCode
::
EndRun
;
}
else
if
(
return_code
==
1
)
{
// This means the event was read properly.
}
else
if
(
return_code
==
2
)
{
LOG
(
ERROR
)
<<
"There
\'
s something wrong (2) with the datafile"
;
LOG
(
ERROR
)
<<
"Terminating run"
;
return
StatusCode
::
EndRun
;
}
else
if
(
return_code
==
3
)
{
// Still need to figure this out... I think it's just end of run. Need to see difference between HDF5 and binary
return
StatusCode
::
EndRun
;
}
else
if
(
return_code
==
4
)
{
LOG
(
ERROR
)
<<
"There
\'
s something wrong (4) with the HDF5 datafile"
;
LOG
(
ERROR
)
<<
"Terminating run"
;
if
(
return_code
==
1
)
{
LOG
(
DEBUG
)
<<
"Successfully read event from ALiBaVa file"
;
}
else
if
(
return_code
==
-
1
)
{
LOG
(
DEBUG
)
<<
"Reached end of the ALiBaVa file, requesting end of run"
;
return
StatusCode
::
EndRun
;
}
else
{
LOG
(
ERROR
)
<<
"This shouldn
\'
t happen."
;
LOG
(
ERROR
)
<<
"Terminating run"
;
return
StatusCode
::
EndRun
;
throw
ModuleError
(
"Issue with ALiBaVa file, return code "
+
std
::
to_string
(
return_code
));
}
// Calculate the common mode for the signal in this event
m_alibava
->
calc_common_mode_signal
();
// Process the opened data event, i.e. pedestal correction, common mode noise correction
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment