def Verbose(msg, printHeader=True, verbose=False): if not opts.verbose: return aux.Print(msg, printHeader) return
opts.saveDir = "datacards_combine_multianalysis_%s_%s_%s" % ( opts.postfix, opts.date, opts.time) else: opts.saveDir = "datacards_combine_multianalysis_%s_%s" % ( opts.date, opts.time) if isinstance(opts.dirs, str): pass else: msg = "Datacard directories must be provided as a comma-separated string" raise Exception(es + msg + ns) if "," in opts.dirs: opts.dirs = opts.dirs.split(",") aux.Print( "Will use the following datacard %d directories:" % (len(opts.dirs)), True) for i, d in enumerate(opts.dirs, 1): bIsDir = os.path.isdir(d) if not bIsDir: msg = "The provided path \"%s\" is not a directory!" % d raise Exception(es + msg + ns) else: msg = "%d) %s" % (i, hs + d + ns) Print(msg, False) else: msg = "The datacards directories must be provided in a single argument seperated with a comma (\",\")" raise Exception(es + msg + ns) main(opts)