Ejemplo n.º 1
0

###################################
# preliminaries 
###################################

dataSetName_ = "DUMMY_DATASET_NAME"
#process.myProducerLabel = cms.EDProducer('Ntuple')
from DavisRunIITauTau.TupleConfigurations.ConfigNtupleContent_cfi import *

########################################
# figure out what dataset and type
# we have asked for

from DavisRunIITauTau.TupleConfigurations.getSampleInfoForDataSet import getSampleInfoForDataSet
sampleData = getSampleInfoForDataSet(dataSetName_)


##################
# print the run settings 
print '******************************************'
print '********  running Ntuple job over dataset with the following parameters : ' 
print '******************************************'

print sampleData
print '******************************************'
print '******************************************'


if COMPUTE_SVMASS :
	print 'will compute SVmass (@ NTUPLE level) with log_m term = ', SVMASS_LOG_M
Ejemplo n.º 2
0
  os.system(makeCrabDir)


############################
# begin reading in list of samples
# and check that the metadata is known to our code
#srcDir = os.environ['CMSSW_BASE']+"/src"
#crabConfigDir = srcDir+"/DavisRunIITauTau/CrabJobSubmissionHelper/"

sampleNames = [] # list of lists [dataset, requestName, tempJobConfigName]


for line in fileinput.input(str(args.dataSetList[0])):
    if '#' in line:
        continue 
    sampleData = getSampleInfoForDataSet(str(line.strip()))

    # seems kind of clumsy, but works for now
    version =  ((str(sampleData.getParameter("CodeVersion")).strip("cms.double('")).strip("')")).replace('.','_') 
    requestName = ((str(sampleData.getParameter("KeyName")).strip("cms.string('")).strip("')"))
    requestName = requestName+"_version_"+version

    tempConfigName = crabJobLocation+"/"+requestName+".py"

    # some sed swaps in the job config file (really just putting the dataset name in)
    sedHappySampleName = str(line.strip()).replace("/","\/")
    sed_command = "cat "+os.environ['CMSSW_BASE']+"/src/DavisRunIITauTau/CrabJobSubmissionHelper"
    sed_command = sed_command + "/Templates/V0/runIIoneStepFlatTuple_v0.py | "
    sed_command = sed_command + "sed \'s/DUMMY_DATASET_NAME/"+sedHappySampleName+"/g\'"+" >& "+tempConfigName

    os.system(sed_command)