Пример #1
0
 def plotProfiles(self):
   return BooleanStr.treatVar('_plotProfiles', self.__dict__, NotSet)
Пример #2
0
 def supportTriggers(self):
   return BooleanStr.treatVar('_supportTriggers', self.__dict__, NotSet)
Пример #3
0
 def toMatlab(self):
   return BooleanStr.treatVar('_toMatlab', self.__dict__, True)
Пример #4
0
 def plotMeans(self):
   return BooleanStr.treatVar('_plotMeans', self.__dict__, NotSet)
Пример #5
0
 def useTRT(self):
   return BooleanStr.treatVar('_useTRT', self.__dict__, False)
Пример #6
0
 def standardCaloVariables(self):
   return BooleanStr.treatVar('_standardCaloVariables', self.__dict__, False)
Пример #7
0
 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
Пример #9
0
    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, 
Пример #10
0
 def doCompress(self):
     return BooleanStr.treatVar("_doCompress", self.__dict__, True)
Пример #11
0
 def doMatlab(self):
     return BooleanStr.treatVar("_doMatlab", self.__dict__, True)
Пример #12
0
 def doMonitoring(self):
     return BooleanStr.treatVar("_doMonitoring", self.__dict__, True)
Пример #13
0
 def compress(self):
   return BooleanStr.treatVar('_compress', self.__dict__, False)