CMS 3D CMS Logo

Functions
shallowTree_test_template Namespace Reference

Functions

def add_rawRelVals (process)
 

Function Documentation

def shallowTree_test_template.add_rawRelVals (   process)

Definition at line 6 of file shallowTree_test_template.py.

References das.query(), python.rootplot.root2matplotlib.replace(), and harvestTrackValidationPlots.str.

6 def add_rawRelVals(process):
7  dataset = das.query('dataset file=%s' % process.source.fileNames[0], verbose=True)
8  if not dataset:
9  raise RuntimeError(
10  'Das returned no dataset parent of the input file: %s \n'
11  'The parenthood is needed to add RAW secondary input files' % process.source.fileNames[0]
12  )
13  raw_dataset = dataset[0].replace('GEN-SIM-RECO','GEN-SIM-DIGI-RAW-HLTDEBUG')
14  raw_files = das.query('file dataset=%s' % raw_dataset, verbose=True)
15  if not raw_files:
16  raise RuntimeError('No files found belonging to the GEN-SIM-DIGI-RAW-HLTDEBUG sample!')
17  #convert from unicode into normal string since vstring does not pick it up
18  raw_files = [str(i) for i in raw_files]
19  process.source.secondaryFileNames = cms.untracked.vstring(*raw_files)
20  return process
21 
def replace(string, replacements)
def query(query_str, verbose=False)
Definition: das.py:5