CMS 3D CMS Logo

Functions | Variables
shallowTree_test_template Namespace Reference

Functions

def add_rawRelVals (process)
 Ideally to be used, unfortunately sample is not at CERN. More...
 

Variables

 closeFileFast
 
 fileName
 
 fileNames
 
 GlobalTag
 
 input
 
 maxEvents
 Maximal Number of Events. More...
 
 options
 
 process = cms.Process('JustATest')
 
 reportEvery
 
 Rethrow
 
 source
 
 TFileService
 
 wantSummary
 

Function Documentation

◆ add_rawRelVals()

def shallowTree_test_template.add_rawRelVals (   process)

Ideally to be used, unfortunately sample is not at CERN.

from PhysicsTools.PatAlgos.tools.cmsswVersionTools import pickRelValInputFiles filesRelValTTbarPileUpGENSIMRECO = cms.untracked.vstring( pickRelValInputFiles( cmsswVersion = 'CMSSW_9_2_3' , relVal = 'RelValTTbar_13' , globalTag = 'PUpmx25ns_92X_upgrade2017_realistic_v2_earlyBS2017' , dataTier = 'GEN-SIM-RECO' , maxVersions = 1 , numberOfFiles = 1 , useDAS = True ) )

Definition at line 22 of file shallowTree_test_template.py.

References cmssw_das_client.get_data(), python.rootplot.root2matplotlib.replace(), and str.

22 def add_rawRelVals(process):
23  query='dataset file=%s' % process.source.fileNames[0]
24  dataset = cmssw_das_client.get_data(query, limit = 0)
25  if not dataset:
26  raise RuntimeError(
27  'Das returned no dataset parent of the input file: %s \n'
28  'The parenthood is needed to add RAW secondary input files' % process.source.fileNames[0]
29  )
30  raw_dataset = dataset['data'][0]['dataset'][0]['name'].replace('GEN-SIM-RECO','GEN-SIM-DIGI-RAW-HLTDEBUG')
31  raw_files = cmssw_das_client.get_data('file dataset=%s' % raw_dataset, limit=0)['data']
32 
33  if not raw_files:
34  raise RuntimeError('No files found belonging to the GEN-SIM-DIGI-RAW-HLTDEBUG sample!')
35 
36  #convert from unicode into normal string since vstring does not pick it up
37  raw_files = [str(i) for i in raw_files]
38  process.source.secondaryFileNames = cms.untracked.vstring(*raw_files)
39  return process
40 
def add_rawRelVals(process)
Ideally to be used, unfortunately sample is not at CERN.
def replace(string, replacements)
def get_data(query, limit=None, threshold=None, idx=None, host=None, cmd=None)
#define str(s)

Variable Documentation

◆ closeFileFast

shallowTree_test_template.closeFileFast

Definition at line 53 of file shallowTree_test_template.py.

◆ fileName

shallowTree_test_template.fileName

Definition at line 52 of file shallowTree_test_template.py.

◆ fileNames

shallowTree_test_template.fileNames

Definition at line 60 of file shallowTree_test_template.py.

◆ GlobalTag

shallowTree_test_template.GlobalTag

Definition at line 46 of file shallowTree_test_template.py.

◆ input

shallowTree_test_template.input

Definition at line 57 of file shallowTree_test_template.py.

◆ maxEvents

shallowTree_test_template.maxEvents

Maximal Number of Events.

Definition at line 57 of file shallowTree_test_template.py.

◆ options

shallowTree_test_template.options

Definition at line 63 of file shallowTree_test_template.py.

◆ process

shallowTree_test_template.process = cms.Process('JustATest')

Definition at line 41 of file shallowTree_test_template.py.

◆ reportEvery

shallowTree_test_template.reportEvery

Definition at line 64 of file shallowTree_test_template.py.

◆ Rethrow

shallowTree_test_template.Rethrow

Definition at line 67 of file shallowTree_test_template.py.

◆ source

shallowTree_test_template.source

Definition at line 58 of file shallowTree_test_template.py.

◆ TFileService

shallowTree_test_template.TFileService

Definition at line 50 of file shallowTree_test_template.py.

◆ wantSummary

shallowTree_test_template.wantSummary

Definition at line 63 of file shallowTree_test_template.py.