test
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" : 1, # do not set multicore for the whole chain
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  "Multicore" : 1 # hardcode Multicore to be 1 for Harvest
119  }
120 
121  self.defaultScratch={
122  "TaskName" : None, #Task Name
123  "ConfigCacheID" : None, #Generator Config id
124  "GlobalTag": None,
125  "SplittingAlgo" : "EventBased", #Splitting Algorithm
126  "EventsPerJob" : None, #Size of jobs in terms of splitting algorithm
127  "RequestNumEvents" : None, #Total number of events to generate
128  "Seeding" : "AutomaticSeeding", #Random seeding method
129  "PrimaryDataset" : None, #Primary Dataset to be created
130  "nowmIO": {},
131  "Multicore" : opt.nThreads, # this is the per-taskchain Multicore; it's the default assigned to a task if it has no value specified
132  "KeepOutput" : False
133  }
134  self.defaultInput={
135  "TaskName" : "DigiHLT", #Task Name
136  "ConfigCacheID" : None, #Processing Config id
137  "GlobalTag": None,
138  "InputDataset" : None, #Input Dataset to be processed
139  "SplittingAlgo" : "LumiBased", #Splitting Algorithm
140  "LumisPerJob" : 10, #Size of jobs in terms of splitting algorithm
141  "nowmIO": {},
142  "Multicore" : opt.nThreads, # this is the per-taskchain Multicore; it's the default assigned to a task if it has no value specified
143  "KeepOutput" : False
144  }
145  self.defaultTask={
146  "TaskName" : None, #Task Name
147  "InputTask" : None, #Input Task Name (Task Name field of a previous Task entry)
148  "InputFromOutputModule" : None, #OutputModule name in the input task that will provide files to process
149  "ConfigCacheID" : None, #Processing Config id
150  "GlobalTag": None,
151  "SplittingAlgo" : "LumiBased", #Splitting Algorithm
152  "LumisPerJob" : 10, #Size of jobs in terms of splitting algorithm
153  "nowmIO": {},
154  "Multicore" : opt.nThreads, # this is the per-taskchain Multicore; it's the default assigned to a task if it has no value specified
155  "KeepOutput" : False
156  }
158  self.chainDicts={}
159 

Member Function Documentation

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

Definition at line 160 of file MatrixInjector.py.

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

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

Definition at line 467 of file MatrixInjector.py.

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

468  def submit(self):
469  try:
470  from modules.wma import makeRequest,approveRequest
471  from wmcontrol import random_sleep
472  print '\n\tFound wmcontrol\n'
473  except:
474  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
475  if not self.testMode:
476  print '\n\t QUIT\n'
477  sys.exit(-17)
478 
479  import pprint
480  for (n,d) in self.chainDicts.items():
481  if self.testMode:
482  print "Only viewing request",n
483  print pprint.pprint(d)
484  else:
485  #submit to wmagent each dict
486  print "For eyes before submitting",n
487  print pprint.pprint(d)
488  print "Submitting",n,"..........."
489  workFlow=makeRequest(self.wmagent,d,encodeDict=True)
490  approveRequest(self.wmagent,workFlow)
491  print "...........",n,"submitted"
492  random_sleep()
493 
494 
495 
def MatrixInjector.MatrixInjector.upload (   self)

Definition at line 447 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.uploadConf().

448  def upload(self):
449  for (n,d) in self.chainDicts.items():
450  for it in d:
451  if it.startswith("Task") and it!='TaskChain':
452  #upload
453  couchID=self.uploadConf(d[it]['ConfigCacheID'],
454  str(n)+d[it]['TaskName'],
455  d['CouchURL']
456  )
457  print d[it]['ConfigCacheID']," uploaded to couchDB for",str(n),"with ID",couchID
458  d[it]['ConfigCacheID']=couchID
459  if it =='DQMConfigCacheID':
460  couchID=self.uploadConf(d['DQMConfigCacheID'],
461  str(n)+'harvesting',
462  d['CouchURL']
463  )
464  print d['DQMConfigCacheID'],"uploaded to couchDB for",str(n),"with ID",couchID
465  d['DQMConfigCacheID']=couchID
466 
def MatrixInjector.MatrixInjector.uploadConf (   self,
  filePath,
  label,
  where 
)

Definition at line 420 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.couchCache, TmCcu.count, TmModule.count, TmApvPair.count, TmPsu.count, MatrixInjector.MatrixInjector.count, ValidationMisalignedTracker.count, SiStripDetSummary::Values.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::RpcDataT.user, popcon::RpcObGasData.user, popcon::RPCObPVSSmapData.user, popcon::RpcDataV.user, popcon::RpcDataUXC.user, popcon::RpcDataI.user, popcon::RpcDataS.user, popcon::RpcDataGasMix.user, popcon::RpcDataFebmap.user, MatrixInjector.MatrixInjector.user, and conddblib.TimeType.user.

Referenced by MatrixInjector.MatrixInjector.upload().

421  def uploadConf(self,filePath,label,where):
422  labelInCouch=self.label+'_'+label
423  cacheName=filePath.split('/')[-1]
424  if self.testMode:
425  self.count+=1
426  print '\tFake upload of',filePath,'to couch with label',labelInCouch
427  return self.count
428  else:
429  try:
430  from modules.wma import upload_to_couch,DATABASE_NAME
431  except:
432  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
433  print '\n\t QUIT\n'
434  sys.exit(-16)
435 
436  if cacheName in self.couchCache:
437  print "Not re-uploading",filePath,"to",where,"for",label
438  cacheId=self.couchCache[cacheName]
439  else:
440  print "Loading",filePath,"to",where,"for",label
441  ## totally fork the upload to couch to prevent cross loading of process configurations
442  pool = multiprocessing.Pool(1)
443  cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.user,self.group,where)] )
444  cacheId = cacheIds[0]
445  self.couchCache[cacheName]=cacheId
446  return cacheId

Member Data Documentation

MatrixInjector.MatrixInjector.chainDicts

Definition at line 157 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 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 133 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultScratch

Definition at line 120 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultTask

Definition at line 144 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().