CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
MatrixInjector.MatrixInjector Class Reference
Inheritance diagram for MatrixInjector.MatrixInjector:

Public Member Functions

def __init__
 
def prepare
 
def submit
 
def upload
 
def uploadConf
 

Public Attributes

 chainDicts
 
 couch
 
 couchCache
 
 count
 
 DbsUrl
 
 defaultChain
 
 defaultHarvest
 
 defaultInput
 
 defaultScratch
 
 defaultTask
 
 dqmgui
 
 group
 
 keep
 
 label
 
 speciallabel
 
 testMode
 
 user
 
 version
 
 wmagent
 

Detailed Description

Definition at line 36 of file MatrixInjector.py.

Constructor & Destructor Documentation

def MatrixInjector.MatrixInjector.__init__ (   self,
  opt,
  mode = 'init',
  options = '' 
)

Definition at line 38 of file MatrixInjector.py.

38 
39  def __init__(self,opt,mode='init',options=''):
40  self.count=1040
41 
42  self.dqmgui=None
43  self.wmagent=None
44  for k in options.split(','):
45  if k.startswith('dqm:'):
46  self.dqmgui=k.split(':',1)[-1]
47  elif k.startswith('wma:'):
48  self.wmagent=k.split(':',1)[-1]
49 
50  self.testMode=((mode!='submit') and (mode!='force'))
51  self.version =1
52  self.keep = opt.keep
53 
54  #wagemt stuff
55  if not self.wmagent:
56  self.wmagent=os.getenv('WMAGENT_REQMGR')
57  if not self.wmagent:
58  if not opt.testbed :
59  self.wmagent = 'cmsweb.cern.ch'
60  self.DbsUrl = "https://"+self.wmagent+"/dbs/prod/global/DBSReader"
61  else :
62  self.wmagent = 'cmsweb-testbed.cern.ch'
63  self.DbsUrl = "https://"+self.wmagent+"/dbs/int/global/DBSReader"
64 
65  if not self.dqmgui:
66  self.dqmgui="https://cmsweb.cern.ch/dqm/relval"
67  #couch stuff
68  self.couch = 'https://'+self.wmagent+'/couchdb'
69 # self.couchDB = 'reqmgr_config_cache'
70  self.couchCache={} # so that we do not upload like crazy, and recyle cfgs
71  self.user = os.getenv('USER')
72  self.group = 'ppd'
73  self.label = 'RelValSet_'+os.getenv('CMSSW_VERSION').replace('-','')+'_v'+str(self.version)
74  self.speciallabel=''
75  if opt.label:
76  self.speciallabel= '_'+opt.label
77 
78 
79  if not os.getenv('WMCORE_ROOT'):
80  print '\n\twmclient is not setup properly. Will not be able to upload or submit requests.\n'
81  if not self.testMode:
82  print '\n\t QUIT\n'
83  sys.exit(-18)
84  else:
85  print '\n\tFound wmclient\n'
86 
87  self.defaultChain={
88  "RequestType" : "TaskChain", #this is how we handle relvals
89  "SubRequestType" : "RelVal", #this is how we handle relvals, now that TaskChain is also used for central MC production
90  "RequestPriority": 500000,
91  "Requestor": self.user, #Person responsible
92  "Group": self.group, #group for the request
93  "CMSSWVersion": os.getenv('CMSSW_VERSION'), #CMSSW Version (used for all tasks in chain)
94  "Campaign": os.getenv('CMSSW_VERSION'), # only for wmstat purpose
95  "ScramArch": os.getenv('SCRAM_ARCH'), #Scram Arch (used for all tasks in chain)
96  "ProcessingVersion": self.version, #Processing Version (used for all tasks in chain)
97  "GlobalTag": None, #Global Tag (overridden per task)
98  "CouchURL": self.couch, #URL of CouchDB containing Config Cache
99  "ConfigCacheURL": self.couch, #URL of CouchDB containing Config Cache
100  "DbsUrl": self.DbsUrl,
101  #- Will contain all configs for all Tasks
102  #"SiteWhitelist" : ["T2_CH_CERN", "T1_US_FNAL"], #Site whitelist
103  "TaskChain" : None, #Define number of tasks in chain.
104  "nowmTasklist" : [], #a list of tasks as we put them in
105  "unmergedLFNBase" : "/store/unmerged",
106  "mergedLFNBase" : "/store/relval",
107  "dashboardActivity" : "relval",
108  "Multicore" : opt.nThreads,
109  "Memory" : 3000,
110  "SizePerEvent" : 1234,
111  "TimePerEvent" : 0.1
112  }
114  self.defaultHarvest={
115  "EnableHarvesting" : "True",
116  "DQMUploadUrl" : self.dqmgui,
117  "DQMConfigCacheID" : None
118  }
119 
120  self.defaultScratch={
121  "TaskName" : None, #Task Name
122  "ConfigCacheID" : None, #Generator Config id
123  "GlobalTag": None,
124  "SplittingAlgo" : "EventBased", #Splitting Algorithm
125  "EventsPerJob" : None, #Size of jobs in terms of splitting algorithm
126  "RequestNumEvents" : None, #Total number of events to generate
127  "Seeding" : "AutomaticSeeding", #Random seeding method
128  "PrimaryDataset" : None, #Primary Dataset to be created
129  "nowmIO": {},
130  "KeepOutput" : False
131  }
132  self.defaultInput={
133  "TaskName" : "DigiHLT", #Task Name
134  "ConfigCacheID" : None, #Processing Config id
135  "GlobalTag": None,
136  "InputDataset" : None, #Input Dataset to be processed
137  "SplittingAlgo" : "LumiBased", #Splitting Algorithm
138  "LumisPerJob" : 10, #Size of jobs in terms of splitting algorithm
139  "nowmIO": {},
140  "KeepOutput" : False
141  }
142  self.defaultTask={
143  "TaskName" : None, #Task Name
144  "InputTask" : None, #Input Task Name (Task Name field of a previous Task entry)
145  "InputFromOutputModule" : None, #OutputModule name in the input task that will provide files to process
146  "ConfigCacheID" : None, #Processing Config id
147  "GlobalTag": None,
148  "SplittingAlgo" : "LumiBased", #Splitting Algorithm
149  "LumisPerJob" : 10, #Size of jobs in terms of splitting algorithm
150  "nowmIO": {},
151  "KeepOutput" : False
152  }
154  self.chainDicts={}
155 

Member Function Documentation

def MatrixInjector.MatrixInjector.prepare (   self,
  mReader,
  directories,
  mode = 'init' 
)

Definition at line 156 of file MatrixInjector.py.

References python.multivaluedict.append(), MatrixInjector.MatrixInjector.chainDicts, MatrixInjector.MatrixInjector.defaultChain, MatrixInjector.MatrixInjector.defaultHarvest, MatrixInjector.MatrixInjector.defaultInput, MatrixInjector.MatrixInjector.defaultScratch, MatrixInjector.MatrixInjector.defaultTask, spr.find(), cmsHarvester.index, MatrixInjector.MatrixInjector.keep, python.multivaluedict.map(), SiPixelLorentzAngle_cfi.read, python.rootplot.root2matplotlib.replace(), MatrixInjector.MatrixInjector.speciallabel, split, and makeHLTPrescaleTable.values.

157  def prepare(self,mReader, directories, mode='init'):
158  try:
159  #from Configuration.PyReleaseValidation.relval_steps import wmsplit
160  wmsplit = {}
161  wmsplit['DIGIHI']=5
162  wmsplit['RECOHI']=5
163  wmsplit['HLTD']=5
164  wmsplit['RECODreHLT']=2
165  wmsplit['DIGIPU']=4
166  wmsplit['DIGIPU1']=4
167  wmsplit['RECOPU1']=1
168  wmsplit['DIGIUP15_PU50']=1
169  wmsplit['RECOUP15_PU50']=1
170  wmsplit['DIGIUP15_PU25']=1
171  wmsplit['RECOUP15_PU25']=1
172  wmsplit['DIGIHIMIX']=5
173  wmsplit['RECOHIMIX']=5
174  wmsplit['RECODSplit']=1
175  wmsplit['SingleMuPt10_UP15_ID']=1
176  wmsplit['DIGIUP15_ID']=1
177  wmsplit['RECOUP15_ID']=1
178  wmsplit['TTbar_13_ID']=1
179  wmsplit['SingleMuPt10FS_ID']=1
180  wmsplit['TTbarFS_ID']=1
181  wmsplit['RECODR2_50nsreHLT']=1
182  wmsplit['RECODR2_25nsreHLT']=1
183  wmsplit['HLTDR2_50ns']=1
184  wmsplit['HLTDR2_25ns']=1
185  wmsplit['Hadronizer']=1
186  wmsplit['REMINIAODPROD']=1
187  wmsplit['REMINIAOD']=1
188  wmsplit['REMINIAOD_PU50']=1
189  wmsplit['REMINIAOD_PU25']=1
190  wmsplit['REMINIAODDR2_50ns']=1
191  wmsplit['REMINIAODDR2_25ns']=1
192 
193  #import pprint
194  #pprint.pprint(wmsplit)
195  except:
196  print "Not set up for step splitting"
197  wmsplit={}
198 
199  acqEra=False
200  for (n,dir) in directories.items():
201  chainDict=copy.deepcopy(self.defaultChain)
202  print "inspecting",dir
203  nextHasDSInput=None
204  for (x,s) in mReader.workFlowSteps.items():
205  #x has the format (num, prefix)
206  #s has the format (num, name, commands, stepList)
207  if x[0]==n:
208  #print "found",n,s[3]
209  #chainDict['RequestString']='RV'+chainDict['CMSSWVersion']+s[1].split('+')[0]
210  index=0
211  splitForThisWf=None
212  thisLabel=self.speciallabel
213  #if 'HARVESTGEN' in s[3]:
214  if len( [step for step in s[3] if "HARVESTGEN" in step] )>0:
215  chainDict['TimePerEvent']=0.01
216  thisLabel=thisLabel+"_gen"
217  # for re-miniAOD test
218  if len( [step for step in s[3] if "REMINIAOD" in step] )>0:
219  thisLabel=thisLabel+"_ReMiniAOD"
220  processStrPrefix=''
221  setPrimaryDs=None
222  for step in s[3]:
223 
224  if 'INPUT' in step or (not isinstance(s[2][index],str)):
225  nextHasDSInput=s[2][index]
226 
227  else:
228 
229  if (index==0):
230  #first step and not input -> gen part
231  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultScratch))
232  try:
233  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
234  except:
235  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
236  return -15
237 
238  chainDict['nowmTasklist'][-1]['PrimaryDataset']='RelVal'+s[1].split('+')[0]
239  if not '--relval' in s[2][index]:
240  print 'Impossible to create task from scratch without splitting information with --relval'
241  return -12
242  else:
243  arg=s[2][index].split()
244  ns=map(int,arg[arg.index('--relval')+1].split(','))
245  chainDict['nowmTasklist'][-1]['RequestNumEvents'] = ns[0]
246  chainDict['nowmTasklist'][-1]['EventsPerJob'] = ns[1]
247  if 'FASTSIM' in s[2][index] or '--fast' in s[2][index]:
248  thisLabel+='_FastSim'
249  if 'lhe' in s[2][index] in s[2][index]:
250  chainDict['nowmTasklist'][-1]['LheInputFiles'] =True
251 
252  elif nextHasDSInput:
253  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultInput))
254  try:
255  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
256  except:
257  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
258  return -15
259  chainDict['nowmTasklist'][-1]['InputDataset']=nextHasDSInput.dataSet
260  splitForThisWf=nextHasDSInput.split
261  chainDict['nowmTasklist'][-1]['LumisPerJob']=splitForThisWf
262  if step in wmsplit:
263  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit[step]
264  # get the run numbers or #events
265  if len(nextHasDSInput.run):
266  chainDict['nowmTasklist'][-1]['RunWhitelist']=nextHasDSInput.run
267  if len(nextHasDSInput.ls):
268  chainDict['nowmTasklist'][-1]['LumiList']=nextHasDSInput.ls
269  #print "what is s",s[2][index]
270  if '--data' in s[2][index] and nextHasDSInput.label:
271  thisLabel+='_RelVal_%s'%nextHasDSInput.label
272  if 'filter' in chainDict['nowmTasklist'][-1]['nowmIO']:
273  print "This has an input DS and a filter sequence: very likely to be the PyQuen sample"
274  processStrPrefix='PU_'
275  setPrimaryDs = 'RelVal'+s[1].split('+')[0]
276  if setPrimaryDs:
277  chainDict['nowmTasklist'][-1]['PrimaryDataset']=setPrimaryDs
278  nextHasDSInput=None
279  else:
280  #not first step and no inputDS
281  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultTask))
282  try:
283  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
284  except:
285  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
286  return -15
287  if splitForThisWf:
288  chainDict['nowmTasklist'][-1]['LumisPerJob']=splitForThisWf
289  if step in wmsplit:
290  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit[step]
291 
292  # change LumisPerJob for Hadronizer steps.
293  if 'Hadronizer' in step:
294  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit['Hadronizer']
295 
296  #print step
297  chainDict['nowmTasklist'][-1]['TaskName']=step
298  if setPrimaryDs:
299  chainDict['nowmTasklist'][-1]['PrimaryDataset']=setPrimaryDs
300  chainDict['nowmTasklist'][-1]['ConfigCacheID']='%s/%s.py'%(dir,step)
301  chainDict['nowmTasklist'][-1]['GlobalTag']=chainDict['nowmTasklist'][-1]['nowmIO']['GT'] # copy to the proper parameter name
302  chainDict['GlobalTag']=chainDict['nowmTasklist'][-1]['nowmIO']['GT'] #set in general to the last one of the chain
303  if 'pileup' in chainDict['nowmTasklist'][-1]['nowmIO']:
304  chainDict['nowmTasklist'][-1]['MCPileup']=chainDict['nowmTasklist'][-1]['nowmIO']['pileup']
305  if '--pileup ' in s[2][index]: # catch --pileup (scenarion) and not --pileup_ (dataset to be mixed) => works also making PRE-MIXed dataset
306  processStrPrefix='PU_' # take care of pu overlay done with GEN-SIM mixing
307  if ( s[2][index].split()[ s[2][index].split().index('--pileup')+1 ] ).find('25ns') > 0 :
308  processStrPrefix='PU25ns_'
309  elif ( s[2][index].split()[ s[2][index].split().index('--pileup')+1 ] ).find('50ns') > 0 :
310  processStrPrefix='PU50ns_'
311  if 'DIGIPREMIX_S2' in s[2][index] : # take care of pu overlay done with DIGI mixing of premixed events
312  if s[2][index].split()[ s[2][index].split().index('--pileup_input')+1 ].find('25ns') > 0 :
313  processStrPrefix='PUpmx25ns_'
314  elif s[2][index].split()[ s[2][index].split().index('--pileup_input')+1 ].find('50ns') > 0 :
315  processStrPrefix='PUpmx50ns_'
316 
317  if acqEra:
318  #chainDict['AcquisitionEra'][step]=(chainDict['CMSSWVersion']+'-PU_'+chainDict['nowmTasklist'][-1]['GlobalTag']).replace('::All','')+thisLabel
319  chainDict['AcquisitionEra'][step]=chainDict['CMSSWVersion']
320  chainDict['ProcessingString'][step]=processStrPrefix+chainDict['nowmTasklist'][-1]['GlobalTag'].replace('::All','')+thisLabel
321  else:
322  #chainDict['nowmTasklist'][-1]['AcquisitionEra']=(chainDict['CMSSWVersion']+'-PU_'+chainDict['nowmTasklist'][-1]['GlobalTag']).replace('::All','')+thisLabel
323  chainDict['nowmTasklist'][-1]['AcquisitionEra']=chainDict['CMSSWVersion']
324  chainDict['nowmTasklist'][-1]['ProcessingString']=processStrPrefix+chainDict['nowmTasklist'][-1]['GlobalTag'].replace('::All','')+thisLabel
325 
326  index+=1
327  #end of loop through steps
328  chainDict['RequestString']='RV'+chainDict['CMSSWVersion']+s[1].split('+')[0]
329  if processStrPrefix or thisLabel:
330  chainDict['RequestString']+='_'+processStrPrefix+thisLabel
331 
332 
333 
334  #wrap up for this one
335  import pprint
336  #print 'wrapping up'
337  #pprint.pprint(chainDict)
338  #loop on the task list
339  for i_second in reversed(range(len(chainDict['nowmTasklist']))):
340  t_second=chainDict['nowmTasklist'][i_second]
341  #print "t_second taskname", t_second['TaskName']
342  if 'primary' in t_second['nowmIO']:
343  #print t_second['nowmIO']['primary']
344  primary=t_second['nowmIO']['primary'][0].replace('file:','')
345  for i_input in reversed(range(0,i_second)):
346  t_input=chainDict['nowmTasklist'][i_input]
347  for (om,o) in t_input['nowmIO'].items():
348  if primary in o:
349  #print "found",primary,"procuced by",om,"of",t_input['TaskName']
350  t_second['InputTask'] = t_input['TaskName']
351  t_second['InputFromOutputModule'] = om
352  #print 't_second',pprint.pformat(t_second)
353  if t_second['TaskName'].startswith('HARVEST'):
354  chainDict.update(copy.deepcopy(self.defaultHarvest))
355  chainDict['DQMConfigCacheID']=t_second['ConfigCacheID']
356  ## the info are not in the task specific dict but in the general dict
357  #t_input.update(copy.deepcopy(self.defaultHarvest))
358  #t_input['DQMConfigCacheID']=t_second['ConfigCacheID']
359  break
360 
361  ## there is in fact only one acquisition era
362  #if len(set(chainDict['AcquisitionEra'].values()))==1:
363  # print "setting only one acq"
364  if acqEra:
365  chainDict['AcquisitionEra'] = chainDict['AcquisitionEra'].values()[0]
366 
367  ## clean things up now
368  itask=0
369  if self.keep:
370  for i in self.keep:
371  if type(i)==int and i < len(chainDict['nowmTasklist']):
372  chainDict['nowmTasklist'][i]['KeepOutput']=True
373  for (i,t) in enumerate(chainDict['nowmTasklist']):
374  if t['TaskName'].startswith('HARVEST'):
375  continue
376  if not self.keep:
377  t['KeepOutput']=True
378  elif t['TaskName'] in self.keep:
379  t['KeepOutput']=True
380  t.pop('nowmIO')
381  itask+=1
382  chainDict['Task%d'%(itask)]=t
383 
384 
385  ##
386 
387 
388  ## provide the number of tasks
389  chainDict['TaskChain']=itask#len(chainDict['nowmTasklist'])
390 
391  chainDict.pop('nowmTasklist')
392  self.chainDicts[n]=chainDict
393 
394 
395  return 0
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double split
Definition: MVATrainer.cc:139
def MatrixInjector.MatrixInjector.submit (   self)

Definition at line 443 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.testMode, and MatrixInjector.MatrixInjector.wmagent.

444  def submit(self):
445  try:
446  from modules.wma import makeRequest,approveRequest
447  from wmcontrol import random_sleep
448  print '\n\tFound wmcontrol\n'
449  except:
450  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
451  if not self.testMode:
452  print '\n\t QUIT\n'
453  sys.exit(-17)
454 
455  import pprint
456  for (n,d) in self.chainDicts.items():
457  if self.testMode:
458  print "Only viewing request",n
459  print pprint.pprint(d)
460  else:
461  #submit to wmagent each dict
462  print "For eyes before submitting",n
463  print pprint.pprint(d)
464  print "Submitting",n,"..........."
465  workFlow=makeRequest(self.wmagent,d,encodeDict=True)
466  approveRequest(self.wmagent,workFlow)
467  print "...........",n,"submitted"
468  random_sleep()
469 
470 
471 
def MatrixInjector.MatrixInjector.upload (   self)

Definition at line 423 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.uploadConf().

424  def upload(self):
425  for (n,d) in self.chainDicts.items():
426  for it in d:
427  if it.startswith("Task") and it!='TaskChain':
428  #upload
429  couchID=self.uploadConf(d[it]['ConfigCacheID'],
430  str(n)+d[it]['TaskName'],
431  d['CouchURL']
432  )
433  print d[it]['ConfigCacheID']," uploaded to couchDB for",str(n),"with ID",couchID
434  d[it]['ConfigCacheID']=couchID
435  if it =='DQMConfigCacheID':
436  couchID=self.uploadConf(d['DQMConfigCacheID'],
437  str(n)+'harvesting',
438  d['CouchURL']
439  )
440  print d['DQMConfigCacheID'],"uploaded to couchDB for",str(n),"with ID",couchID
441  d['DQMConfigCacheID']=couchID
442 
def MatrixInjector.MatrixInjector.uploadConf (   self,
  filePath,
  label,
  where 
)

Definition at line 396 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.couchCache, TmCcu.count, TmApvPair.count, TmModule.count, TmPsu.count, MatrixInjector.MatrixInjector.count, ValidationMisalignedTracker.count, SiStripDetSummary::Values.count, web_results_display.WebResultsDisplay.count, MD5.count, MatrixInjector.MatrixInjector.group, ElectronLikelihoodCategoryData.label, entry< T >.label, SiPixelFedFillerWordEventNumber.label, TtEvent::HypoClassKeyStringToEnum.label, HcalLutSet.label, DTDQMHarvesting.DTDQMHarvesting.label, DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.label, DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.label, DTDQMValidation.DTDQMValidation.label, DTAnalysisResiduals.DTAnalysisResiduals.label, L1GtBoardTypeStringToEnum.label, DTResidualCalibration.DTResidualCalibration.label, DTTTrigValid.DTTTrigValid.label, DTTTrigResidualCorr.DTTTrigResidualCorr.label, MatrixInjector.MatrixInjector.label, L1GtPsbQuadStringToEnum.label, ValidationMisalignedTracker.label, L1GtConditionTypeStringToEnum.label, L1GtConditionCategoryStringToEnum.label, PhysicsTools::Calibration::Comparator.label, conddblib.GlobalTagMap.label, MatrixInjector.MatrixInjector.testMode, EcalTPGParamReaderFromDB.user, popcon::RPCObPVSSmapData.user, popcon::RpcDataT.user, popcon::RpcObGasData.user, popcon::RpcDataV.user, popcon::RpcDataI.user, popcon::RpcDataGasMix.user, popcon::RpcDataFebmap.user, popcon::RpcDataUXC.user, popcon::RpcDataS.user, MatrixInjector.MatrixInjector.user, and conddblib.TimeType.user.

Referenced by MatrixInjector.MatrixInjector.upload().

397  def uploadConf(self,filePath,label,where):
398  labelInCouch=self.label+'_'+label
399  cacheName=filePath.split('/')[-1]
400  if self.testMode:
401  self.count+=1
402  print '\tFake upload of',filePath,'to couch with label',labelInCouch
403  return self.count
404  else:
405  try:
406  from modules.wma import upload_to_couch,DATABASE_NAME
407  except:
408  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
409  print '\n\t QUIT\n'
410  sys.exit(-16)
411 
412  if cacheName in self.couchCache:
413  print "Not re-uploading",filePath,"to",where,"for",label
414  cacheId=self.couchCache[cacheName]
415  else:
416  print "Loading",filePath,"to",where,"for",label
417  ## totally fork the upload to couch to prevent cross loading of process configurations
418  pool = multiprocessing.Pool(1)
419  cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.user,self.group,where)] )
420  cacheId = cacheIds[0]
421  self.couchCache[cacheName]=cacheId
422  return cacheId

Member Data Documentation

MatrixInjector.MatrixInjector.chainDicts

Definition at line 153 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.couch

Definition at line 67 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.couchCache

Definition at line 69 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.count

Definition at line 39 of file MatrixInjector.py.

Referenced by NodeCut.MatchLessSeen.match(), NodeCut.MatchLessHit.match(), and MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.DbsUrl

Definition at line 59 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.defaultChain

Definition at line 86 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultHarvest

Definition at line 113 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultInput

Definition at line 131 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultScratch

Definition at line 119 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultTask

Definition at line 141 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.dqmgui

Definition at line 41 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.group

Definition at line 71 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.keep

Definition at line 51 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.label

Definition at line 72 of file MatrixInjector.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor._sort_list(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), python.rootplot.root2matplotlib.Hist.errorbar(), python.rootplot.root2matplotlib.Hist.errorbarh(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.foundIn(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.fullFilename(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.inputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.outputEventContent(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.process(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.properties(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.readConnections(), core.AutoHandle.AutoHandle.ReallyLoad(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.updateProcess(), MatrixInjector.MatrixInjector.uploadConf(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.usedBy().

MatrixInjector.MatrixInjector.speciallabel

Definition at line 73 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.testMode

Definition at line 49 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.submit(), and MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.user

Definition at line 70 of file MatrixInjector.py.

Referenced by cmsPerfSuite.PerfSuite.optionParse(), dataset.BaseDataset.printInfo(), production_tasks.CheckDatasetExists.run(), production_tasks.GenerateMask.run(), production_tasks.SourceCFG.run(), production_tasks.FullCFG.run(), production_tasks.MonitorJobs.run(), production_tasks.CleanJobFiles.run(), and MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.version

Definition at line 50 of file MatrixInjector.py.

Referenced by python.rootplot.argparse._VersionAction.__call__(), validation.Sample.datasetpattern(), validation.Sample.filename(), argparse.ArgumentParser.format_version(), and python.rootplot.argparse.ArgumentParser.format_version().

MatrixInjector.MatrixInjector.wmagent

Definition at line 42 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.submit().