Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JZCaPA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Riccardo Longo
JZCaPA
Commits
a4ed697f
Commit
a4ed697f
authored
3 years ago
by
Chad Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Added verbosity flag for event and resource usage
parent
a8c2ea4c
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
Analysis/userFunctions/AnalysisExample2021.cpp
+8
-3
8 additions, 3 deletions
Analysis/userFunctions/AnalysisExample2021.cpp
with
8 additions
and
3 deletions
Analysis/userFunctions/AnalysisExample2021.cpp
+
8
−
3
View file @
a4ed697f
...
...
@@ -22,7 +22,7 @@ namespace {
void
PrintUsage
()
{
std
::
cout
<<
" Usage: AnalysisExample2021 [-d /path/to/input/files/ ] [-f /list/of.root /files/here.root]"
<<
std
::
endl
<<
" [-o /output/directory/] [-c /config/file.xml] [-a /alignment/file.xml]"
<<
std
::
endl
<<
" [-t /timing/file.txt] [-n #events] [--help]"
<<
std
::
endl
;
<<
" [-t /timing/file.txt] [-n #events]
[-v (verbose)]
[--help]"
<<
std
::
endl
;
}
}
...
...
@@ -37,6 +37,7 @@ void PrintHelp(){
std
::
cout
<<
" c Configuration file to be used"
<<
std
::
endl
;
std
::
cout
<<
" a Alignment file to be used"
<<
std
::
endl
;
std
::
cout
<<
" t Timing file to be used"
<<
std
::
endl
;
std
::
cout
<<
" v Verbose. Currently prints event#, CPU/RAM usage if flag is used. Takes no argument"
<<
std
::
endl
;
}
...
...
@@ -79,6 +80,7 @@ int main(int argc, char *argv[]){
std
::
string
config_file
=
""
;
std
::
string
alignment_file
=
""
;
std
::
string
timing_file
=
(
std
::
string
)
std
::
getenv
(
"JZCaPA"
)
+
"/Utils/Timing_data/2021_PreliminaryTiming.txt"
;
int
verbosity
=
0
;
std
::
vector
<
std
::
string
>
root_files
;
...
...
@@ -99,6 +101,7 @@ int main(int argc, char *argv[]){
else
if
(
TString
(
argv
[
i
])
==
"-c"
)
config_file
=
argv
[
i
+
1
];
else
if
(
TString
(
argv
[
i
])
==
"-a"
)
alignment_file
=
argv
[
i
+
1
];
else
if
(
TString
(
argv
[
i
])
==
"-t"
)
timing_file
=
argv
[
i
+
1
];
else
if
(
TString
(
argv
[
i
])
==
"-v"
)
verbosity
=
1
;
else
if
(
TString
(
argv
[
i
])
==
"--help"
)
PrintHelp
();
else
{
PrintUsage
();
...
...
@@ -160,11 +163,13 @@ int main(int argc, char *argv[]){
std
::
cout
<<
"~=~=~=~=~=~ Run Start"
<<
std
::
endl
;
r
->
EnablePlotLabel
();
if
(
maxEvents
!=
0
)
r
->
SetMaxEvents
(
maxEvents
);
EventTimer
timer
(
1000
,
r
,
kFALSE
);
timer
.
TurnOn
();
if
(
verbosity
>
0
)
timer
.
TurnOn
();
std
::
cout
<<
"~=~=~=~=~=~ Run Start"
<<
std
::
endl
;
r
->
Run
();
timer
.
TurnOff
();
if
(
verbosity
>
0
)
timer
.
TurnOff
();
std
::
cout
<<
std
::
endl
<<
"~=~=~=~=~=~ Run Stop"
<<
std
::
endl
;
delete
r
;
...
...
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