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
88f30d2b
Commit
88f30d2b
authored
1 year ago
by
RoccoA97
Browse files
Options
Downloads
Patches
Plain Diff
Fixing fields of EoLS and EoR json files
parent
40d5e47e
No related branches found
No related tags found
1 merge request
!98
Reduce wait time for writing the EoR file
Pipeline
#7160549
failed
1 year ago
Stage: check
Stage: build
Stage: run
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OutputFileHandler.cc
+9
-7
9 additions, 7 deletions
src/OutputFileHandler.cc
src/OutputFileHandler.h
+8
-1
8 additions, 1 deletion
src/OutputFileHandler.h
with
17 additions
and
8 deletions
src/OutputFileHandler.cc
+
9
−
7
View file @
88f30d2b
...
@@ -50,6 +50,7 @@ int OutputFileHandler::GetCurrentRunNumber() const { return current_run_number_;
...
@@ -50,6 +50,7 @@ int OutputFileHandler::GetCurrentRunNumber() const { return current_run_number_;
void
OutputFileHandler
::
UpdateRunInfo
(
uint32_t
run
,
uint32_t
index
)
{
void
OutputFileHandler
::
UpdateRunInfo
(
uint32_t
run
,
uint32_t
index
)
{
if
(
current_run_number_
!=
static_cast
<
int
>
(
run
))
{
if
(
current_run_number_
!=
static_cast
<
int
>
(
run
))
{
run_NOrbits_
=
0
;
run_NOrbits_
=
0
;
run_NFiles_
=
0
;
LOG
(
TRACE
)
<<
"Previous run: "
<<
current_run_number_
<<
" | New run: "
<<
run
;
LOG
(
TRACE
)
<<
"Previous run: "
<<
current_run_number_
<<
" | New run: "
<<
run
;
}
}
...
@@ -186,6 +187,7 @@ void OutputFileHandler::close_and_rename::operator()() const {
...
@@ -186,6 +187,7 @@ void OutputFileHandler::close_and_rename::operator()() const {
// TODO: new counters logic here to be tested
// TODO: new counters logic here to be tested
outputfilehandler_
->
updateLumisectionFileSize
(
outputFile
.
getFileSize
());
outputfilehandler_
->
updateLumisectionFileSize
(
outputFile
.
getFileSize
());
outputfilehandler_
->
updateLumisectionNOrbits
(
outputFile
.
getNOrbits
());
outputfilehandler_
->
updateLumisectionNOrbits
(
outputFile
.
getNOrbits
());
outputfilehandler_
->
updateLumisectionNFiles
(
1
);
if
(
outputFile
.
Index
()
==
outputfilehandler_
->
max_index_per_ls_
&&
if
(
outputFile
.
Index
()
==
outputfilehandler_
->
max_index_per_ls_
&&
outputfilehandler_
->
getCMSSWHeaders
()
&&
outputfilehandler_
->
isMainPipeline
())
{
// end of lumisection
outputfilehandler_
->
getCMSSWHeaders
()
&&
outputfilehandler_
->
isMainPipeline
())
{
// end of lumisection
...
@@ -209,8 +211,8 @@ void OutputFileHandler::write_EoLS_file(uint32_t ls) {
...
@@ -209,8 +211,8 @@ void OutputFileHandler::write_EoLS_file(uint32_t ls) {
// TODO: To me it looks like there are more fields than intended in this file...
// TODO: To me it looks like there are more fields than intended in this file...
EoLS_file_string_stream
<<
"{
\n
\"
data
\"
:[
\"
"
<<
ls_NOrbits_
<<
"
\"
,
\"
"
// NEvents
EoLS_file_string_stream
<<
"{
\n
\"
data
\"
:[
\"
"
<<
ls_NOrbits_
<<
"
\"
,
\"
"
// NEvents
<<
1
+
max_index_per_l
s_
<<
"
\"
,
\"
"
// NFiles
<<
ls_NFile
s_
<<
"
\"
,
\"
"
// NFiles
<<
constants
::
N_orbits_per_lumisection
<<
"
\"
,"
// Total Events
<<
ls_NOrbits_
<<
"
\"
,"
// Total Events
<<
"
\"
0
\"
,
\"
"
// NLost Events
<<
"
\"
0
\"
,
\"
"
// NLost Events
<<
ls_file_size_
<<
"
\"
],
\n
\"
definition
\"
:
\"
"
// NBytes
<<
ls_file_size_
<<
"
\"
],
\n
\"
definition
\"
:
\"
"
// NBytes
<<
"/fff/ramdisk/run"
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
6
)
<<
"/fff/ramdisk/run"
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
6
)
...
@@ -218,7 +220,9 @@ void OutputFileHandler::write_EoLS_file(uint32_t ls) {
...
@@ -218,7 +220,9 @@ void OutputFileHandler::write_EoLS_file(uint32_t ls) {
ls_file_size_
=
0
;
ls_file_size_
=
0
;
run_NOrbits_
+=
ls_NOrbits_
;
run_NOrbits_
+=
ls_NOrbits_
;
run_NFiles_
+=
ls_NFiles_
;
ls_NOrbits_
=
0
;
ls_NOrbits_
=
0
;
ls_NFiles_
=
0
;
EoLS_file
<<
EoLS_file_string_stream
.
str
();
EoLS_file
<<
EoLS_file_string_stream
.
str
();
EoLS_file
.
close
();
EoLS_file
.
close
();
}
}
...
@@ -236,11 +240,9 @@ void OutputFileHandler::write_EoR_file() {
...
@@ -236,11 +240,9 @@ void OutputFileHandler::write_EoR_file() {
EoR_file
.
open
(
EoR_filename
.
str
().
c_str
(),
std
::
ios_base
::
out
);
EoR_file
.
open
(
EoR_filename
.
str
().
c_str
(),
std
::
ios_base
::
out
);
std
::
stringstream
EoR_file_string_stream
;
std
::
stringstream
EoR_file_string_stream
;
EoR_file_string_stream
<<
"{
\n
\"
data
\"
:[
\"
"
<<
run_NOrbits_
// NEvents
EoR_file_string_stream
<<
"{
\n
\"
data
\"
:[
\"
"
<<
run_NOrbits_
// NEvents
<<
"
\"
,
\"
"
<<
"
\"
,
\"
"
<<
run_NFiles_
// NFiles
<<
(
ls
*
static_cast
<
int
>
(
max_index_per_ls_
+
1
))
+
<<
"
\"
,
\"
"
<<
ls
<<
"
\"
,
\"
"
// NLumis
(
nOrbitsPerFile_
*
current_index_
)
// NFiles
<<
ls
<<
"
\"
],
\n
\"
definition
\"
:
\"
"
// LastLumi
<<
"
\"
,
\"
"
<<
ls
<<
"
\"
,
\"
"
// NLumis
<<
ls
<<
"
\"
],
\n
\"
definition
\"
:
\"
"
// LastLumi
<<
"/fff/ramdisk/run"
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
6
)
<<
"/fff/ramdisk/run"
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
6
)
<<
current_run_number_
<<
"/jsd/EoR.jsd
\"
,
\n
\"
source
\"
:
\"
l1scout
\"\n
}"
;
<<
current_run_number_
<<
"/jsd/EoR.jsd
\"
,
\n
\"
source
\"
:
\"
l1scout
\"\n
}"
;
EoR_file
<<
EoR_file_string_stream
.
str
();
EoR_file
<<
EoR_file_string_stream
.
str
();
...
...
This diff is collapsed.
Click to expand it.
src/OutputFileHandler.h
+
8
−
1
View file @
88f30d2b
...
@@ -36,7 +36,9 @@ class OutputFileHandler {
...
@@ -36,7 +36,9 @@ class OutputFileHandler {
file_size_
(
0
),
file_size_
(
0
),
NOrbits_
(
0
),
NOrbits_
(
0
),
ls_NOrbits_
(
0
),
ls_NOrbits_
(
0
),
run_NOrbits_
(
0
)
{
ls_NFiles_
(
0
),
run_NOrbits_
(
0
),
run_NFiles_
(
0
)
{
close_and_rename_
.
SetOutputFileHandlerObj
(
*
this
);
close_and_rename_
.
SetOutputFileHandlerObj
(
*
this
);
t
=
std
::
thread
(
close_and_rename_
);
t
=
std
::
thread
(
close_and_rename_
);
if
(
cmsswHeaders_
)
{
if
(
cmsswHeaders_
)
{
...
@@ -117,11 +119,14 @@ class OutputFileHandler {
...
@@ -117,11 +119,14 @@ class OutputFileHandler {
size_t
getLumisectionFileSize
()
{
return
ls_file_size_
;
}
size_t
getLumisectionFileSize
()
{
return
ls_file_size_
;
}
uint32_t
getLumisectionNOrbits
()
{
return
ls_NOrbits_
;
}
uint32_t
getLumisectionNOrbits
()
{
return
ls_NOrbits_
;
}
uint32_t
getLumisectionNFiles
()
{
return
ls_NFiles_
;
}
uint32_t
getRunNOrbits
()
{
return
run_NOrbits_
;
}
uint32_t
getRunNOrbits
()
{
return
run_NOrbits_
;
}
void
updateLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
+=
file_size
;
}
void
updateLumisectionFileSize
(
size_t
file_size
)
{
ls_file_size_
+=
file_size
;
}
void
updateLumisectionNOrbits
(
uint32_t
NOrbits
)
{
ls_NOrbits_
+=
NOrbits
;
}
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
updateRunNOrbits
(
uint32_t
NOrbits
)
{
run_NOrbits_
+=
NOrbits
;
}
void
updateRunNFiles
(
uint32_t
NFiles
)
{
run_NFiles_
+=
NFiles
;
}
std
::
string
base_path_
;
std
::
string
base_path_
;
std
::
string
run_dir_
;
std
::
string
run_dir_
;
...
@@ -142,7 +147,9 @@ class OutputFileHandler {
...
@@ -142,7 +147,9 @@ class OutputFileHandler {
size_t
file_size_
{};
size_t
file_size_
{};
uint32_t
NOrbits_
{};
uint32_t
NOrbits_
{};
uint32_t
ls_NOrbits_
{};
uint32_t
ls_NOrbits_
{};
uint32_t
ls_NFiles_
{};
uint32_t
run_NOrbits_
{};
uint32_t
run_NOrbits_
{};
uint32_t
run_NFiles_
{};
};
};
#endif
#endif
\ No newline at end of file
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