129 parser = argparse.ArgumentParser(description=
'Read from HDF5 file and write to HDF5 file')
130 parser.add_argument(
'input', help=
"Name of file to read")
131 parser.add_argument(
'name', nargs=
'+', help=
"Name of the global tag.")
133 parser.add_argument(
'--exclude',
'-e', nargs=
'*', help =
'list of records to exclude from the file (can not be used with --include)')
134 parser.add_argument(
'--include',
'-i', nargs=
'*', help =
'lost of the only records that should be included in the file (can not be used with --exclude')
135 parser.add_argument(
'--output',
'-o', default=
'test.h5cond', help=
'name of hdf5 output file to write')
136 parser.add_argument(
'--compressor',
'-c', default=
'zlib', choices=[
'zlib',
'lzma',
'none'], help=
"compress data using 'zlib', 'lzma' or 'none'")
137 args = parser.parse_args()
139 if args.exclude
and args.include:
140 print(
"Can not use --exclude and --include at the same time")
143 excludeRecords = set()
145 excludeRecords = set(args.exclude)
146 includeRecords = set()
148 includeRecords = set(args.include)
150 writeH5File(args.output, args.name, excludeRecords, includeRecords,
lambda x: H5GlobalTag(args.input, x), args.compressor)
def writeH5File(fileName, globalTags, excludeRecords, includeRecords, tagReader, compressorName)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)