User Tools

Site Tools


Using batch submission for SFrame jobs

  • Copy BatchSubmission to your analysis directory
cp -r ../../clange/ExoVV/Analysis/BatchSubmission/
  • Create directories AnalysisOutput and AnalysisTemp parallel to BatchSubmissions
mkdir AnalysisOutput AnalysisTemp
  • Make sure you have an updated version of Python (Python 2.6 or later). You can use the Python version of CMSSW doing
cd ...CMSSW_5_3_13/src/
  • Create your list of infiles in an .xml file and store it under BatchSubmission/xmls/. Use only name of infile and lumi (see test.xml):
  <In FileName="dcap://" Lumi="1.0"/>
  <In FileName="dcap://" Lumi="1.0"/>
  <In FileName="dcap://" Lumi="1.0"/>
  • Create new or edit BatchSubmission/ This will be the same for all jobs (signal and background) and should only contain global variables and libraries used (see comments under).
    "libMyTestPackage",        # libraries you are using, order matters (separate by comma)

    "MyTestPackage.par",       # name of your SFrame package+.par

    "../AnalysisPackage",      # name of your SFrame package
  AddUserItems = [      
    ["InputTreeName" ,"tree"], #your global user items
  • Create python script with job specific configurations (one for signal, one for background), see BatchSubmission/ Here you add all job specific item names, name of in and output file etc (see comments under)
#! /usr/bin/python
# -*- coding: utf-8 -*-

path2xml="$HOME/ExoVV/Analysis/BatchSubmission/xmls" //path to xmls
path2tmp="$HOME/ExoVV/Analysis/AnalysisTemp" # path to temporary directory (create this if you have not done so already)
outDir="$HOME/ExoVV/Analysis/AnalysisOutput" # path to output directory
jobName="clTestJob" # name of job (optional name)
cycleName="MyTestAnalysis" # **important!** must match SFrame cycle name (see sframe config file)
nEventsMax=-1 # nr events
nFiles=2 # nr of files per job
postFix = ""

  ["Test", ["test"]], # Output name and name of xml containing in file names

userItems = [
 # ["InputTreeName", "tree"], # job specific item names

jobOptionsFile2=open("", 'r') # name of file containing global item names and libraries
for i in [o for o in jobOptionsFile2.readlines()]:
  if ("#E" + "nd") in i : break
exec command2
userItems += AddUserItems

inputTrees=["ntuplizer/tree"] # name of intput tree
outputTrees=["analysis"] # name of output tree
  • Compile and run from BatchSubmission with
python -j --batch
  • Output files stored under AnalysisOutput
btag/batchsub.txt · Last modified: 2019/10/24 17:25 by iwn