5 from __future__
import print_function
7 import DataQualityUtils.DQHistogramMergeMod
as mod
12 os.environ[
'TDAQ_ERS_NO_SIGNAL_HANDLERS'] =
'1'
19 if __name__ ==
"__main__":
20 parser = argparse.ArgumentParser()
21 parser.add_argument(
'input_list_file_name', help=
'Text file containing input file list (one file per line)')
22 parser.add_argument(
'merged_file_name', help=
'Name of output merged ROOT file')
23 parser.add_argument(
'run_post_processing', nargs=
'?', type=fakebool, default=
False, help=
'False/True/0/1 default=0')
24 parser.add_argument(
'is_incremental_merge', nargs=
'?', type=fakebool, default=
False, help=
'False/True/0/1 default=0')
25 parser.add_argument(
'output_file_compression_level', nargs=
'?', type=int, default=1, help=
'see ROOT TFile doc. default=1')
26 parser.add_argument(
'debugLevel', nargs=
'?', type=int, default=0, help=
'integer default=0')
27 parser.add_argument(
'--excludeDir', help=
'Regex pattern for directories to exclude from merge')
28 parser.add_argument(
'--excludeHist', help=
'Regex pattern for histogram names to exclude from merge\n'
29 'Note that this is just the name - paths cannot be specified')
30 parser.add_argument(
'--doTiming',action =
'store_true', help=
"Print CPU timing per histogram")
32 args = parser.parse_args()
35 runPostProcessing = args.run_post_processing
37 isIncremental = args.is_incremental_merge
39 compressionLevel = args.output_file_compression_level
41 debugLevel = args.debugLevel
44 directoryRegularExpression = f
'^((?!{args.excludeDir}).)*$'
46 directoryRegularExpression =
'.*'
49 histogramRegularExpression = f
'^((?!{args.excludeHist}).)*$'
51 histogramRegularExpression =
'.*'
57 mod.DQHistogramMerge(args.input_list_file_name, args.merged_file_name,
58 runPostProcessing, isIncremental=isIncremental,
59 compressionLevel=compressionLevel, debugLevel=debugLevel,
61 directoryRegularExpression=directoryRegularExpression,
62 histogramRegularExpression=histogramRegularExpression)