Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
scouting-demonstrator
scdaq
Commits
3267caaa
Commit
3267caaa
authored
11 months ago
by
Giovanna Lazzari Miotto
Browse files
Options
Downloads
Patches
Plain Diff
Use control's run number to trigger EoR
parent
7c54078a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#7281101
failed
11 months ago
Stage: check
Stage: build
Stage: run
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/OutputByOrbit.cc
+4
-2
4 additions, 2 deletions
src/OutputByOrbit.cc
src/OutputFileHandler.cc
+1
-0
1 addition, 0 deletions
src/OutputFileHandler.cc
src/OutputFileHandler.h
+21
-18
21 additions, 18 deletions
src/OutputFileHandler.h
with
26 additions
and
20 deletions
src/OutputByOrbit.cc
+
4
−
2
View file @
3267caaa
...
@@ -12,14 +12,16 @@
...
@@ -12,14 +12,16 @@
#include
"tools.h"
#include
"tools.h"
void
OutputByOrbitStream
::
MonitorEndOfRun
()
{
void
OutputByOrbitStream
::
MonitorEndOfRun
()
{
int
latest_EoR
=
-
1
;
int
latest_EoR
=
0
;
while
(
true
)
{
while
(
true
)
{
int
current_run_number
=
output_file_handler_
.
GetCurrentRunNumber
();
// int current_run_number = output_file_handler_.GetCurrentRunNumber();
int
current_run_number
=
control_
.
run_number
;
if
(
!
control_
.
running
&&
latest_EoR
!=
current_run_number
)
{
if
(
!
control_
.
running
&&
latest_EoR
!=
current_run_number
)
{
// An unhandled run just stopped; wait N seconds in case the pipeline is still processing
// An unhandled run just stopped; wait N seconds in case the pipeline is still processing
// Write EoR file for the most recent run
// Write EoR file for the most recent run
if
(
output_file_handler_
.
isMainPipeline
())
{
if
(
output_file_handler_
.
isMainPipeline
())
{
output_file_handler_
.
write_EoR_file
();
output_file_handler_
.
write_EoR_file
();
output_file_handler_
.
setCurrentRunNumber
(
control_
.
run_number
);
}
}
// Update local EoR tag
// Update local EoR tag
latest_EoR
=
current_run_number
;
latest_EoR
=
current_run_number
;
...
...
This diff is collapsed.
Click to expand it.
src/OutputFileHandler.cc
+
1
−
0
View file @
3267caaa
...
@@ -250,6 +250,7 @@ void OutputFileHandler::write_EoR_file() {
...
@@ -250,6 +250,7 @@ void OutputFileHandler::write_EoR_file() {
EoR_file
.
close
();
EoR_file
.
close
();
run_NOrbits_
=
0
;
run_NOrbits_
=
0
;
run_NFiles_
=
0
;
run_NFiles_
=
0
;
current_index_
=
0
;
}
}
void
OutputFileHandler
::
check_if_all_raw_written
()
{
void
OutputFileHandler
::
check_if_all_raw_written
()
{
...
...
This diff is collapsed.
Click to expand it.
src/OutputFileHandler.h
+
21
−
18
View file @
3267caaa
...
@@ -95,6 +95,26 @@ class OutputFileHandler {
...
@@ -95,6 +95,26 @@ class OutputFileHandler {
int
nOrbitsPerFile_
;
int
nOrbitsPerFile_
;
};
};
public
:
size_t
getLumisectionFileSize
()
{
return
ls_file_size_
;
}
uint32_t
getLumisectionNOrbits
()
{
return
ls_NOrbits_
;
}
uint32_t
getLumisectionNFiles
()
{
return
ls_NFiles_
;
}
uint32_t
getRunNOrbits
()
{
return
run_NOrbits_
;
}
void
updateLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
+=
file_size
;
}
void
updateLumisectionNOrbits
(
uint32_t
NOrbits
)
{
ls_NOrbits_
+=
NOrbits
;
}
void
updateLumisectionNFiles
(
uint32_t
NFiles
)
{
ls_NFiles_
+=
NFiles
;
}
void
updateRunNOrbits
(
uint32_t
NOrbits
)
{
run_NOrbits_
+=
NOrbits
;
}
void
updateRunNFiles
(
uint32_t
NFiles
)
{
run_NFiles_
+=
NFiles
;
}
void
setLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
=
file_size
;
}
void
setLumisectionNOrbits
(
uint32_t
NOrbits
)
{
ls_NOrbits_
=
NOrbits
;
}
void
setLumisectionNFiles
(
uint32_t
NFiles
)
{
ls_NFiles_
=
NFiles
;
}
void
setRunNOrbits
(
uint32_t
NOrbits
)
{
run_NOrbits_
=
NOrbits
;
}
void
setRunNFiles
(
uint32_t
NFiles
)
{
run_NFiles_
=
NFiles
;
}
void
setCurrentRunNumber
(
int
n
)
{
current_run_number_
=
n
;
}
private
:
private
:
void
create_output_directory_maybe
(
std
::
string
&
output_directory
);
void
create_output_directory_maybe
(
std
::
string
&
output_directory
);
...
@@ -121,23 +141,6 @@ class OutputFileHandler {
...
@@ -121,23 +141,6 @@ class OutputFileHandler {
static
std
::
atomic
<
bool
>
file_handler_running_
;
static
std
::
atomic
<
bool
>
file_handler_running_
;
size_t
getLumisectionFileSize
()
{
return
ls_file_size_
;
}
uint32_t
getLumisectionNOrbits
()
{
return
ls_NOrbits_
;
}
uint32_t
getLumisectionNFiles
()
{
return
ls_NFiles_
;
}
uint32_t
getRunNOrbits
()
{
return
run_NOrbits_
;
}
void
updateLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
+=
file_size
;
}
void
updateLumisectionNOrbits
(
uint32_t
NOrbits
)
{
ls_NOrbits_
+=
NOrbits
;
}
void
updateLumisectionNFiles
(
uint32_t
NFiles
)
{
ls_NFiles_
+=
NFiles
;
}
void
updateRunNOrbits
(
uint32_t
NOrbits
)
{
run_NOrbits_
+=
NOrbits
;
}
void
updateRunNFiles
(
uint32_t
NFiles
)
{
run_NFiles_
+=
NFiles
;
}
void
setLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
=
file_size
;
}
void
setLumisectionNOrbits
(
uint32_t
NOrbits
)
{
ls_NOrbits_
=
NOrbits
;
}
void
setLumisectionNFiles
(
uint32_t
NFiles
)
{
ls_NFiles_
=
NFiles
;
}
void
setRunNOrbits
(
uint32_t
NOrbits
)
{
run_NOrbits_
=
NOrbits
;
}
void
setRunNFiles
(
uint32_t
NFiles
)
{
run_NFiles_
=
NFiles
;
}
std
::
string
base_path_
;
std
::
string
base_path_
;
std
::
string
run_dir_
;
std
::
string
run_dir_
;
std
::
string
filename_prefix_
;
std
::
string
filename_prefix_
;
...
@@ -154,7 +157,7 @@ class OutputFileHandler {
...
@@ -154,7 +157,7 @@ class OutputFileHandler {
int
numPipelines_
;
int
numPipelines_
;
std
::
thread
t
;
std
::
thread
t
;
const
uint32_t
max_index_per_ls_
;
const
uint32_t
max_index_per_ls_
;
size_t
ls_file_size_
;
size_t
ls_file_size_
{}
;
size_t
file_size_
{};
size_t
file_size_
{};
uint32_t
NOrbits_
{};
uint32_t
NOrbits_
{};
uint32_t
ls_NOrbits_
{};
uint32_t
ls_NOrbits_
{};
...
...
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