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 | Static Public Attributes
MatrixInjector.MatrixInjector Class Reference
Inheritance diagram for MatrixInjector.MatrixInjector:

Public Member Functions

def __init__
 
def prepare
 
def submit
 
def upload
 
def uploadConf
 provide the number of tasks More...
 

Public Attributes

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

Static Public Attributes

int itask = 0
 the info are not in the task specific dict but in the general dict t_input.update(copy.deepcopy(self.defaultHarvest)) t_input['DQMConfigCacheID']=t_second['ConfigCacheID'] More...
 
list primary = t_second['nowmIO']
 
list t_input = chainDict['nowmTasklist']
 
list t_second = chainDict['nowmTasklist']
 

Detailed Description

Definition at line 37 of file MatrixInjector.py.

Constructor & Destructor Documentation

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

Definition at line 39 of file MatrixInjector.py.

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

Member Function Documentation

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

Definition at line 164 of file MatrixInjector.py.

References bitset_utilities.append(), MatrixInjector.MatrixInjector.batchName, MatrixInjector.MatrixInjector.batchTime, MatrixInjector.MatrixInjector.defaultChain, MatrixInjector.MatrixInjector.defaultInput, MatrixInjector.MatrixInjector.defaultScratch, MatrixInjector.MatrixInjector.defaultTask, spr.find(), reco.if(), cmsHarvester.index, MatrixInjector.MatrixInjector.memoryOffset, MatrixInjector.MatrixInjector.memPerCore, SiPixelLorentzAngle_cfi.read, python.rootplot.root2matplotlib.replace(), MatrixInjector.MatrixInjector.speciallabel, and split.

165  def prepare(self,mReader, directories, mode='init'):
166  try:
167  #from Configuration.PyReleaseValidation.relval_steps import wmsplit
168  wmsplit = {}
169  wmsplit['DIGIHI']=5
170  wmsplit['RECOHI']=5
171  wmsplit['HLTD']=5
172  wmsplit['RECODreHLT']=2
173  wmsplit['DIGIPU']=4
174  wmsplit['DIGIPU1']=4
175  wmsplit['RECOPU1']=1
176  wmsplit['DIGIUP15_PU50']=1
177  wmsplit['RECOUP15_PU50']=1
178  wmsplit['DIGIUP15_PU25']=1
179  wmsplit['RECOUP15_PU25']=1
180  wmsplit['DIGIUP15_PU25HS']=1
181  wmsplit['RECOUP15_PU25HS']=1
182  wmsplit['DIGIHIMIX']=5
183  wmsplit['RECOHIMIX']=5
184  wmsplit['RECODSplit']=1
185  wmsplit['SingleMuPt10_UP15_ID']=1
186  wmsplit['DIGIUP15_ID']=1
187  wmsplit['RECOUP15_ID']=1
188  wmsplit['TTbar_13_ID']=1
189  wmsplit['SingleMuPt10FS_ID']=1
190  wmsplit['TTbarFS_ID']=1
191  wmsplit['RECODR2_50nsreHLT']=5
192  wmsplit['RECODR2_25nsreHLT']=5
193  wmsplit['RECODR2_2016reHLT']=5
194  wmsplit['RECODR2_50nsreHLT_HIPM']=5
195  wmsplit['RECODR2_25nsreHLT_HIPM']=5
196  wmsplit['RECODR2_2016reHLT_HIPM']=1
197  wmsplit['RECODR2_2016reHLT_skimSingleMu']=1
198  wmsplit['RECODR2_2016reHLT_skimDoubleEG']=1
199  wmsplit['RECODR2_2016reHLT_skimMuonEG']=1
200  wmsplit['RECODR2_2016reHLT_skimJetHT']=1
201  wmsplit['RECODR2_2016reHLT_skimMET']=1
202  wmsplit['RECODR2_2016reHLT_skimSinglePh']=1
203  wmsplit['RECODR2_2016reHLT_skimMuOnia']=1
204  wmsplit['RECODR2_2016reHLT_skimSingleMu_HIPM']=1
205  wmsplit['RECODR2_2016reHLT_skimDoubleEG_HIPM']=1
206  wmsplit['RECODR2_2016reHLT_skimMuonEG_HIPM']=1
207  wmsplit['RECODR2_2016reHLT_skimJetHT_HIPM']=1
208  wmsplit['RECODR2_2016reHLT_skimMET_HIPM']=1
209  wmsplit['RECODR2_2016reHLT_skimSinglePh_HIPM']=1
210  wmsplit['RECODR2_2016reHLT_skimMuOnia_HIPM']=1
211  wmsplit['HLTDR2_50ns']=1
212  wmsplit['HLTDR2_25ns']=1
213  wmsplit['HLTDR2_2016']=1
214  wmsplit['Hadronizer']=1
215  wmsplit['DIGIUP15']=1
216  wmsplit['RECOUP15']=1
217  wmsplit['RECOAODUP15']=5
218  wmsplit['DBLMINIAODMCUP15NODQM']=5
219  wmsplit['DigiFull']=5
220  wmsplit['RecoFull']=5
221  wmsplit['DigiFullPU']=1
222  wmsplit['RecoFullPU']=1
223  wmsplit['RECOHID11']=1
224 
225  #import pprint
226  #pprint.pprint(wmsplit)
227  except:
228  print "Not set up for step splitting"
229  wmsplit={}
230 
231  acqEra=False
232  for (n,dir) in directories.items():
233  chainDict=copy.deepcopy(self.defaultChain)
234  print "inspecting",dir
235  nextHasDSInput=None
236  for (x,s) in mReader.workFlowSteps.items():
237  #x has the format (num, prefix)
238  #s has the format (num, name, commands, stepList)
239  if x[0]==n:
240  #print "found",n,s[3]
241  #chainDict['RequestString']='RV'+chainDict['CMSSWVersion']+s[1].split('+')[0]
242  index=0
243  splitForThisWf=None
244  thisLabel=self.speciallabel
245  #if 'HARVESTGEN' in s[3]:
246  if len( [step for step in s[3] if "HARVESTGEN" in step] )>0:
247  chainDict['TimePerEvent']=0.01
248  thisLabel=thisLabel+"_gen"
249  # for double miniAOD test
250  if len( [step for step in s[3] if "DBLMINIAODMCUP15NODQM" in step] )>0:
251  thisLabel=thisLabel+"_dblMiniAOD"
252  processStrPrefix=''
253  setPrimaryDs=None
254  for step in s[3]:
255 
256  if 'INPUT' in step or (not isinstance(s[2][index],str)):
257  nextHasDSInput=s[2][index]
258 
259  else:
260 
261  if (index==0):
262  #first step and not input -> gen part
263  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultScratch))
264  try:
265  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
266  except:
267  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
268  return -15
269 
270  chainDict['nowmTasklist'][-1]['PrimaryDataset']='RelVal'+s[1].split('+')[0]
271  if not '--relval' in s[2][index]:
272  print 'Impossible to create task from scratch without splitting information with --relval'
273  return -12
274  else:
275  arg=s[2][index].split()
276  ns=map(int,arg[arg.index('--relval')+1].split(','))
277  chainDict['nowmTasklist'][-1]['RequestNumEvents'] = ns[0]
278  chainDict['nowmTasklist'][-1]['EventsPerJob'] = ns[1]
279  if 'FASTSIM' in s[2][index] or '--fast' in s[2][index]:
280  thisLabel+='_FastSim'
281  if 'lhe' in s[2][index] in s[2][index]:
282  chainDict['nowmTasklist'][-1]['LheInputFiles'] =True
283 
284  elif nextHasDSInput:
285  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultInput))
286  try:
287  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
288  except:
289  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
290  return -15
291  chainDict['nowmTasklist'][-1]['InputDataset']=nextHasDSInput.dataSet
292  splitForThisWf=nextHasDSInput.split
293  chainDict['nowmTasklist'][-1]['LumisPerJob']=splitForThisWf
294  if step in wmsplit:
295  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit[step]
296  # get the run numbers or #events
297  if len(nextHasDSInput.run):
298  chainDict['nowmTasklist'][-1]['RunWhitelist']=nextHasDSInput.run
299  if len(nextHasDSInput.ls):
300  chainDict['nowmTasklist'][-1]['LumiList']=nextHasDSInput.ls
301  #print "what is s",s[2][index]
302  if '--data' in s[2][index] and nextHasDSInput.label:
303  thisLabel+='_RelVal_%s'%nextHasDSInput.label
304  if 'filter' in chainDict['nowmTasklist'][-1]['nowmIO']:
305  print "This has an input DS and a filter sequence: very likely to be the PyQuen sample"
306  processStrPrefix='PU_'
307  setPrimaryDs = 'RelVal'+s[1].split('+')[0]
308  if setPrimaryDs:
309  chainDict['nowmTasklist'][-1]['PrimaryDataset']=setPrimaryDs
310  nextHasDSInput=None
311  else:
312  #not first step and no inputDS
313  chainDict['nowmTasklist'].append(copy.deepcopy(self.defaultTask))
314  try:
315  chainDict['nowmTasklist'][-1]['nowmIO']=json.loads(open('%s/%s.io'%(dir,step)).read())
316  except:
317  print "Failed to find",'%s/%s.io'%(dir,step),".The workflows were probably not run on cfg not created"
318  return -15
319  if splitForThisWf:
320  chainDict['nowmTasklist'][-1]['LumisPerJob']=splitForThisWf
321  if step in wmsplit:
322  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit[step]
323 
324  # change LumisPerJob for Hadronizer steps.
325  if 'Hadronizer' in step:
326  chainDict['nowmTasklist'][-1]['LumisPerJob']=wmsplit['Hadronizer']
327 
328  #print step
329  chainDict['nowmTasklist'][-1]['TaskName']=step
330  if setPrimaryDs:
331  chainDict['nowmTasklist'][-1]['PrimaryDataset']=setPrimaryDs
332  chainDict['nowmTasklist'][-1]['ConfigCacheID']='%s/%s.py'%(dir,step)
333  chainDict['nowmTasklist'][-1]['GlobalTag']=chainDict['nowmTasklist'][-1]['nowmIO']['GT'] # copy to the proper parameter name
334  chainDict['GlobalTag']=chainDict['nowmTasklist'][-1]['nowmIO']['GT'] #set in general to the last one of the chain
335  if 'pileup' in chainDict['nowmTasklist'][-1]['nowmIO']:
336  chainDict['nowmTasklist'][-1]['MCPileup']=chainDict['nowmTasklist'][-1]['nowmIO']['pileup']
337  if '--pileup ' in s[2][index]: # catch --pileup (scenarion) and not --pileup_ (dataset to be mixed) => works also making PRE-MIXed dataset
338  processStrPrefix='PU_' # take care of pu overlay done with GEN-SIM mixing
339  if ( s[2][index].split()[ s[2][index].split().index('--pileup')+1 ] ).find('25ns') > 0 :
340  processStrPrefix='PU25ns_'
341  elif ( s[2][index].split()[ s[2][index].split().index('--pileup')+1 ] ).find('50ns') > 0 :
342  processStrPrefix='PU50ns_'
343  if 'DIGIPREMIX_S2' in s[2][index] : # take care of pu overlay done with DIGI mixing of premixed events
344  if s[2][index].split()[ s[2][index].split().index('--pileup_input')+1 ].find('25ns') > 0 :
345  processStrPrefix='PUpmx25ns_'
346  elif s[2][index].split()[ s[2][index].split().index('--pileup_input')+1 ].find('50ns') > 0 :
347  processStrPrefix='PUpmx50ns_'
348 
349  if acqEra:
350  #chainDict['AcquisitionEra'][step]=(chainDict['CMSSWVersion']+'-PU_'+chainDict['nowmTasklist'][-1]['GlobalTag']).replace('::All','')+thisLabel
351  chainDict['AcquisitionEra'][step]=chainDict['CMSSWVersion']
352  chainDict['ProcessingString'][step]=processStrPrefix+chainDict['nowmTasklist'][-1]['GlobalTag'].replace('::All','').replace('-','_')+thisLabel
353  else:
354  #chainDict['nowmTasklist'][-1]['AcquisitionEra']=(chainDict['CMSSWVersion']+'-PU_'+chainDict['nowmTasklist'][-1]['GlobalTag']).replace('::All','')+thisLabel
355  chainDict['nowmTasklist'][-1]['AcquisitionEra']=chainDict['CMSSWVersion']
356  chainDict['nowmTasklist'][-1]['ProcessingString']=processStrPrefix+chainDict['nowmTasklist'][-1]['GlobalTag'].replace('::All','').replace('-','_')+thisLabel
357 
358  if (self.batchName):
359  chainDict['nowmTasklist'][-1]['Campaign'] = chainDict['nowmTasklist'][-1]['AcquisitionEra']+self.batchName
360 
361  # specify different ProcessingString for double miniAOD dataset
362  if ('DBLMINIAODMCUP15NODQM' in step):
363  chainDict['nowmTasklist'][-1]['ProcessingString']=chainDict['nowmTasklist'][-1]['ProcessingString']+'_miniAOD'
364 
365  if( chainDict['nowmTasklist'][-1]['Multicore'] ):
366  # the scaling factor of 1.2GB / thread is empirical and measured on a SECOND round of tests with PU samples
367  # the number of threads is NO LONGER assumed to be the same for all tasks
368  # https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/3509/1/1/1.html
369  # now change to 1.5GB / additional thread according to discussion:
370  # https://hypernews.cern.ch/HyperNews/CMS/get/relval/4817/1/1.html
371 # chainDict['nowmTasklist'][-1]['Memory'] = 3000 + int( chainDict['nowmTasklist'][-1]['Multicore'] -1 )*1500
372  chainDict['nowmTasklist'][-1]['Memory'] = self.memoryOffset + int( chainDict['nowmTasklist'][-1]['Multicore'] -1 ) * self.memPerCore
373 
374  index+=1
375  #end of loop through steps
376  chainDict['RequestString']='RV'+chainDict['CMSSWVersion']+s[1].split('+')[0]
377  if processStrPrefix or thisLabel:
378  chainDict['RequestString']+='_'+processStrPrefix+thisLabel
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 514 of file MatrixInjector.py.

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

515  def submit(self):
516  try:
517  from modules.wma import makeRequest,approveRequest
518  from wmcontrol import random_sleep
519  print '\n\tFound wmcontrol\n'
520  except:
521  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
522  if not self.testMode:
523  print '\n\t QUIT\n'
524  sys.exit(-17)
525 
526  import pprint
527  for (n,d) in self.chainDicts.items():
528  if self.testMode:
529  print "Only viewing request",n
530  print pprint.pprint(d)
531  else:
532  #submit to wmagent each dict
533  print "For eyes before submitting",n
534  print pprint.pprint(d)
535  print "Submitting",n,"..........."
536  workFlow=makeRequest(self.wmagent,d,encodeDict=True)
537  print "...........",n,"submitted"
538  random_sleep()
539 
540 
541 
def MatrixInjector.MatrixInjector.upload (   self)

Definition at line 494 of file MatrixInjector.py.

References MatrixInjector.MatrixInjector.uploadConf().

495  def upload(self):
496  for (n,d) in self.chainDicts.items():
497  for it in d:
498  if it.startswith("Task") and it!='TaskChain':
499  #upload
500  couchID=self.uploadConf(d[it]['ConfigCacheID'],
501  str(n)+d[it]['TaskName'],
502  d['ConfigCacheUrl']
503  )
504  print d[it]['ConfigCacheID']," uploaded to couchDB for",str(n),"with ID",couchID
505  d[it]['ConfigCacheID']=couchID
506  if it =='DQMConfigCacheID':
507  couchID=self.uploadConf(d['DQMConfigCacheID'],
508  str(n)+'harvesting',
509  d['ConfigCacheUrl']
510  )
511  print d['DQMConfigCacheID'],"uploaded to couchDB for",str(n),"with ID",couchID
512  d['DQMConfigCacheID']=couchID
513 
def uploadConf
provide the number of tasks
def MatrixInjector.MatrixInjector.uploadConf (   self,
  filePath,
  label,
  where 
)

provide the number of tasks

Definition at line 467 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, classes.PlotData.label, TtEvent::HypoClassKeyStringToEnum.label, HcalLutSet.label, DTDQMHarvesting.DTDQMHarvesting.label, DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.label, DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.label, DTAnalysisResiduals.DTAnalysisResiduals.label, DTDQMValidation.DTDQMValidation.label, L1GtBoardTypeStringToEnum.label, DTResidualCalibration.DTResidualCalibration.label, DTTTrigValid.DTTTrigValid.label, DTTTrigResidualCorr.DTTTrigResidualCorr.label, L1GtPsbQuadStringToEnum.label, MatrixInjector.MatrixInjector.label, ValidationMisalignedTracker.label, L1GtConditionTypeStringToEnum.label, L1GtConditionCategoryStringToEnum.label, PhysicsTools::Calibration::Comparator.label, MatrixInjector.MatrixInjector.testMode, EcalTPGParamReaderFromDB.user, popcon::RpcDataV.user, popcon::RpcObGasData.user, popcon::RPCObPVSSmapData.user, popcon::RpcDataT.user, popcon::RpcDataUXC.user, popcon::RpcDataFebmap.user, popcon::RpcDataGasMix.user, popcon::RpcDataS.user, popcon::RpcDataI.user, MatrixInjector.MatrixInjector.user, and conddblib.TimeType.user.

Referenced by MatrixInjector.MatrixInjector.upload().

468  def uploadConf(self,filePath,label,where):
469  labelInCouch=self.label+'_'+label
470  cacheName=filePath.split('/')[-1]
471  if self.testMode:
472  self.count+=1
473  print '\tFake upload of',filePath,'to couch with label',labelInCouch
474  return self.count
475  else:
476  try:
477  from modules.wma import upload_to_couch,DATABASE_NAME
478  except:
479  print '\n\tUnable to find wmcontrol modules. Please include it in your python path\n'
480  print '\n\t QUIT\n'
481  sys.exit(-16)
482 
483  if cacheName in self.couchCache:
484  print "Not re-uploading",filePath,"to",where,"for",label
485  cacheId=self.couchCache[cacheName]
486  else:
487  print "Loading",filePath,"to",where,"for",label
488  ## totally fork the upload to couch to prevent cross loading of process configurations
489  pool = multiprocessing.Pool(1)
490  cacheIds = pool.map( upload_to_couch_oneArg, [(filePath,labelInCouch,self.user,self.group,where)] )
491  cacheId = cacheIds[0]
492  self.couchCache[cacheName]=cacheId
493  return cacheId
def uploadConf
provide the number of tasks

Member Data Documentation

MatrixInjector.MatrixInjector.batchName

Definition at line 55 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.batchTime

Definition at line 56 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.chainDicts

Definition at line 161 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.couch

Definition at line 74 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.couchCache

Definition at line 76 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.count

Definition at line 40 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.uploadConf().

MatrixInjector.MatrixInjector.DbsUrl

Definition at line 66 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.defaultChain

Definition at line 93 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultHarvest

Definition at line 117 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.defaultInput

Definition at line 137 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultScratch

Definition at line 124 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.defaultTask

Definition at line 148 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.dqmgui

Definition at line 42 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.group

Definition at line 78 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.uploadConf().

int MatrixInjector.MatrixInjector.itask = 0
static

the info are not in the task specific dict but in the general dict t_input.update(copy.deepcopy(self.defaultHarvest)) t_input['DQMConfigCacheID']=t_second['ConfigCacheID']

batch name appended to Campaign name chainDict['Campaign'] = chainDict['AcquisitionEra'] clean things up now

Definition at line 438 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.keep

Definition at line 52 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.label

Definition at line 79 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.memoryOffset

Definition at line 53 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

MatrixInjector.MatrixInjector.memPerCore

Definition at line 54 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

list MatrixInjector.MatrixInjector.primary = t_second['nowmIO']
static

Definition at line 396 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.speciallabel

Definition at line 80 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.prepare().

list MatrixInjector.MatrixInjector.t_input = chainDict['nowmTasklist']
static

Definition at line 398 of file MatrixInjector.py.

list MatrixInjector.MatrixInjector.t_second = chainDict['nowmTasklist']
static

Definition at line 392 of file MatrixInjector.py.

MatrixInjector.MatrixInjector.testMode

Definition at line 50 of file MatrixInjector.py.

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

MatrixInjector.MatrixInjector.user

Definition at line 77 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 51 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 43 of file MatrixInjector.py.

Referenced by MatrixInjector.MatrixInjector.submit().