Skip to content

Commit

Permalink
Sychronizing RDataFrame logger with the global one
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Oct 19, 2023
1 parent d345653 commit 61f090c
Show file tree
Hide file tree
Showing 4 changed files with 303 additions and 208 deletions.
22 changes: 11 additions & 11 deletions bin/fccanalysis
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ class MultiLineFormatter(logging.Formatter):

def main():
parser = argparse.ArgumentParser(description='FCCAnalyses parser')
parser.add_argument('-v', '--verbose',
action='store_true',
help='make output more verbose')
parser.add_argument('--verbosity-level',
type=str,
help='Set verbosity level')
verbosity_argument_group = parser.add_mutually_exclusive_group()
verbosity_argument_group.add_argument('-v', '--verbose',
action='store_true',
help='make output verbose')
verbosity_argument_group.add_argument('-vv', '--more-verbose',
action='store_true',
help='make output more verbose')
verbosity_argument_group.add_argument('-vvv', '--most-verbose',
action='store_true',
help='make output most verbose')

subparsers = parser.add_subparsers(help='types of running modes', dest='command')
parser_init = subparsers.add_parser('init', help="generate a RDataFrame based FCC analysis")
Expand All @@ -60,11 +64,7 @@ def main():
args = parser.parse_args()

verbosity_level = logging.INFO
if args.verbosity_level:
user_level = getattr(logging, args.verbosity_level.upper(), None)
if isinstance(user_level, int):
verbosity_level = user_level
if args.verbose:
if args.verbose or args.more_verbose or args.most_verbose:
verbosity_level = logging.DEBUG

logger = logging.getLogger('FCCAnalyses')
Expand Down
2 changes: 1 addition & 1 deletion examples/FCCee/higgs/mH-recoil/mumu/analysis_stage1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mandatory: List of processes
processList = {
'p8_ee_ZZ_ecm240':{},#Run the full statistics in one output file named <outputDir>/p8_ee_ZZ_ecm240.root
'p8_ee_ZZ_ecm240':{'fraction':0.005},#Run the full statistics in one output file named <outputDir>/p8_ee_ZZ_ecm240.root
'p8_ee_WW_ecm240':{'fraction':0.5, 'chunks':2}, #Run 50% of the statistics in two files named <outputDir>/p8_ee_WW_ecm240/chunk<N>.root
'p8_ee_ZH_ecm240':{'fraction':0.2, 'output':'p8_ee_ZH_ecm240_out'} #Run 20% of the statistics in one file named <outputDir>/p8_ee_ZH_ecm240_out.root (example on how to change the output name)
}
Expand Down
24 changes: 21 additions & 3 deletions man/man1/fccanalysis.1
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
.\" Manpage for fccanalysis
.\" Contact [email protected] to correct errors or typos.
.TH FCCANALYSIS 1 "24 May 2023" "0.7.0" "fccanalysis man page"
.TH FCCANALYSIS 1 "19 Oct 2023" "0.7.0" "fccanalysis man page"
.SH NAME
fccanalysis \- build and run your FCC analysis
.SH SYNOPSIS
.sp
.nf
\fIfccanalysis\fR [\-h | \-\-help] <command> [<args>]
\fIfccanalysis\fR [\-h] [\-v | \-vv | \-vvv] <command> [<args>]
.fi
.sp
.SH DESCRIPTION
\fIfccanalysis\fR is the manager program for the FCC analysis, which can build,
run or submit analysis to the batch\&.
.SH OPTIONS
.PP
\-\-help
\-h, \-\-help
.RS 4
Prints short help message and exits\&.
.RE
.PP
\-v, \-\-verbose
.RS 4
Makes output verbose. RDataFrame verbosity level is set to
ROOT.Experimental.ELogLevel.kInfo\&.
.RE
.PP
\-vv, \-\-more\-verbose
.RS 4
Makes output more verbose. RDataFrame verbosity level is set to
ROOT.Experimental.ELogLevel.kDebug\&.
.RE
.PP
\-vvv, \-\-most\-verbose
.RS 4
Makes output even more verbose. RDataFrame verbosity level is set to
ROOT.Experimental.ELogLevel.kDebug+10 \-\-\- outputs also generated code\&.
.RE
.SH COMMANDS
.PP
\fBfccanalysis-init\fR
Expand Down
Loading

0 comments on commit 61f090c

Please sign in to comment.