CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
shallowTree_test_template Namespace Reference

Functions

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

Variables

tuple closeFileFast = cms.untracked.bool(True)
 
tuple fileName = cms.string( 'FIXME' )
 
 fileNames = filesRelValTTbarPileUpGENSIMRECO
 Maximal Number of Events. More...
 
tuple process = cms.Process('JustATest')
 
tuple Rethrow
 

Function Documentation

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

Variable Documentation

tuple shallowTree_test_template.closeFileFast = cms.untracked.bool(True)

Definition at line 53 of file shallowTree_test_template.py.

tuple shallowTree_test_template.fileName = cms.string( 'FIXME' )

Definition at line 52 of file shallowTree_test_template.py.

shallowTree_test_template.fileNames = filesRelValTTbarPileUpGENSIMRECO

Maximal Number of Events.

Definition at line 60 of file shallowTree_test_template.py.

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

Definition at line 41 of file shallowTree_test_template.py.

tuple shallowTree_test_template.Rethrow
Initial value:
1 = cms.untracked.vstring('OtherCMS',
2  'StdException',
3  'Unknown',
4  'BadAlloc',
5  'BadExceptionType',
6  'ProductNotFound',
7  'DictionaryNotFound',
8  'InsertFailure',
9  'Configuration',
10  'LogicError',
11  'UnimplementedFeature',
12  'InvalidReference',
13  'NullPointerError',
14  'NoProductSpecified',
15  'EventTimeout',
16  'EventCorruption',
17  'ScheduleExecutionFailure',
18  'EventProcessorFailure',
19  'FileInPathError',
20  'FileOpenError',
21  'FileReadError',
22  'FatalRootError',
23  'MismatchedInputFiles',
24  'ProductDoesNotSupportViews',
25  'ProductDoesNotSupportPtr',
26  'NotFound')

Definition at line 67 of file shallowTree_test_template.py.