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

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

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

Definition at line 440 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.uploadConf().

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

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

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