def plotProfiles(self): return BooleanStr.treatVar('_plotProfiles', self.__dict__, NotSet)
def supportTriggers(self): return BooleanStr.treatVar('_supportTriggers', self.__dict__, NotSet)
def toMatlab(self): return BooleanStr.treatVar('_toMatlab', self.__dict__, True)
def plotMeans(self): return BooleanStr.treatVar('_plotMeans', self.__dict__, NotSet)
def useTRT(self): return BooleanStr.treatVar('_useTRT', self.__dict__, False)
def standardCaloVariables(self): return BooleanStr.treatVar('_standardCaloVariables', self.__dict__, False)
except (IndexError, TypeError,): if len(args.inputFiles) > 1: cOutputName = appendToFileName( args.outputFile, str(idx) ) else: cOutputName = args.outputFile cOutputName = ensureExtension( cOutputName, 'tgz|tar.gz' ) if m: file_format = m.group(1) wantedFormat = re.compile(r'.*\.' + file_format + r'(\.[0-9]*)?$') isSame = [ bool(wantedFormat.match(filename)) for filename in fileCollection ] from RingerCore.util import cat_files_py if all(isSame): if file_format in ("tgz", "tar.gz"): cat_files_py( fileCollection, cOutputName, args.writeMethod, mainLogger ) elif file_format == "pic": if BooleanStr.retrieve(args.allowTmpFiles): import tempfile tmpFolderPath=tempfile.mkdtemp() for inputFile in progressbar(fileCollection, len(fileCollection), prefix="Compressing: ", disp = True if mainLogger is not None else False, step = 10, logger = mainLogger, level = LoggingLevel.INFO ): import subprocess import os.path lFile = os.path.split(inputFile)[-1] subprocess.Popen(['tar', '-czf', tmpFolderPath + '/' + ensureExtension( lFile, '.tgz|.tar.gz'), os.path.relpath(inputFile)]) cat_files_py( expandFolders( tmpFolderPath ), cOutputName, args.writeMethod, mainLogger ) import shutil shutil.rmtree(tmpFolderPath) else:
except DataIdentifierNotFound, e: raise RuntimeError("Could not retrieve number of files on informed data DID. Rucio error:\n%s" % str(e)) except ImportError, e: raise ImportError("rucio environment was not set, please set rucio and try again. Full error:\n%s" % str(e)) # Fix secondaryDSs string if using refFile refPerfArg = "" if args.refFileDS: args.grid_secondaryDS = "REF_FILE:1:%s" % ( args.refFileDS ) args.grid_reusableSecondary = "REF_FILE" refPerfArg = "%REF_FILE" # Set output: args.grid_outputs = '"pic:crossValStat.pic","mat:crossValStat.mat"' # FIXME The default is to create the root files. Change this to a more automatic way. if args._doMonitoring is NotSet or BooleanStr.retrieve( args._doMonitoring ): args.grid_outputs += ',"root:crossValStat_monitoring.root"' args.grid_nJobs = 1 startBin = True for jobFiles, nFiles, jobFilter in zip(jobFileCollection, nFilesCollection, jobFilters): if startBin: if args.grid_outTarBall is None and not args.grid_inTarBall: args.grid_outTarBall = 'workspace.tar' startBin = False else: if args.grid_outTarBall is not None: # Swap outtar with intar args.grid_inTarBall = args.grid_outTarBall args.grid_outTarBall = None
nargs='+', help="The input files that will be used to generate a unique file") mainMergeParser.add_argument('-o', '--outputFile', action='store', metavar='OutputFile', required=True, help="The output file generated") mainMergeParser.add_argument('-wm', '--writeMethod', default=WriteMethod.retrieve("ShUtil"), type=WriteMethod, help="The write method to use.") mainMergeParser.add_argument( '--allowTmpFiles', default=BooleanStr.retrieve("True"), type=BooleanStr, help= "When reading .pic files, whether the creation of temporary files is enabled." ) optMergeParser = mainParser.add_argument_group("optional arguments", "") optMergeParser.add_argument( '--binFilters', action='store', default=NotSet, help="""This option filter the files types from each job. It can be a string with the name of a class defined on python/CrossValidStat dedicated to automatically separate the files or a comma separated list of patterns that identify unique group of files for each bin. A python list can also be speficied. E.g.: You can specify 'group001,group002' if you have file001.group001.pic,
def doCompress(self): return BooleanStr.treatVar("_doCompress", self.__dict__, True)
def doMatlab(self): return BooleanStr.treatVar("_doMatlab", self.__dict__, True)
def doMonitoring(self): return BooleanStr.treatVar("_doMonitoring", self.__dict__, True)
def compress(self): return BooleanStr.treatVar('_compress', self.__dict__, False)