CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
cmsswVersionTools.PickRelValInputFiles Class Reference


Automatic pick-up of RelVal input files

More...

Inheritance diagram for cmsswVersionTools.PickRelValInputFiles:

Public Member Functions

def __call__
 
def __init__
 
def apply
 
def getDefaultParameters
 
def messageEmptyList
 

Private Attributes

 _comment
 
 _parameters
 

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
 
string _label = 'pickRelValInputFiles'
 

Detailed Description


Automatic pick-up of RelVal input files

Picks up RelVal input files automatically and
  returns a vector of strings with the paths to be used in [PoolSource].fileNames
PickRelValInputFiles( cmsswVersion, relVal, dataTier, condition, globalTag, maxVersions, skipFiles, numberOfFiles, debug )
- useDAS       : switch to perform query in DAS rather than in DBS
                 optional; default: False
- cmsswVersion : CMSSW release to pick up the RelVal files from
                 optional; default: the current release (determined automatically from environment)
- formerVersion: use the last before the last valid CMSSW release to pick up the RelVal files from
                 applies also, if 'cmsswVersion' is set explicitly
                 optional; default: False
- relVal       : RelVal sample to be used
                 optional; default: 'RelValTTbar'
- dataTier     : data tier to be used
                 optional; default: 'GEN-SIM-RECO'
- condition    : identifier of GlobalTag as defined in Configurations/PyReleaseValidation/python/autoCond.py
                 possibly overwritten, if 'globalTag' is set explicitly
                 optional; default: 'startup'
- globalTag    : name of GlobalTag as it is used in the data path of the RelVals
                 optional; default: determined automatically as defined by 'condition' in Configurations/PyReleaseValidation/python/autoCond.py
  !!!            Determination is done for the release one runs in, not for the release the RelVals have been produced in.
  !!!            Example of deviation: data RelVals (CMSSW_4_1_X) might not only have the pure name of the GlobalTag 'GR_R_311_V2' in the full path,
                 but also an extension identifying the data: 'GR_R_311_V2_RelVal_wzMu2010B'
- maxVersions  : max. versioning number of RelVal to check
                 optional; default: 9
- skipFiles    : number of files to skip for a found RelVal sample
                 optional; default: 0
- numberOfFiles: number of files to pick up
                 setting it to negative values, returns all found ('skipFiles' remains active though)
                 optional; default: -1
- debug        : switch to enable enhanced messages in 'stdout'
                 optional; default: False

Definition at line 19 of file cmsswVersionTools.py.

Constructor & Destructor Documentation

def cmsswVersionTools.PickRelValInputFiles.__init__ (   self)

Definition at line 59 of file cmsswVersionTools.py.

References editorTools.UserCodeTool._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, root::helper::RootFunctionAdapter< F, args >.addParameter(), root::helper::RootFunctionHelper< F, args, Tag >.addParameter(), ParameterMgr.addParameter(), fit::RootMinuit< Function >.addParameter(), DropBoxMetadata::Parameters.addParameter(), PythonParameterSet.addParameter(), LutXml.addParameter(), ConfigToolBase.ConfigToolBase.addParameter(), edm::ParameterSet.addParameter(), editorTools.ChangeSource.getDefaultParameters(), and cmsswVersionTools.PickRelValInputFiles.getDefaultParameters().

59 
60  def __init__( self ):
61  ConfigToolBase.__init__( self )
62  self.addParameter( self._defaultParameters, 'useDAS' , False , '' )
63  self.addParameter( self._defaultParameters, 'cmsswVersion' , os.getenv( "CMSSW_VERSION" ) , 'auto from environment' )
64  self.addParameter( self._defaultParameters, 'formerVersion', False , '' )
65  self.addParameter( self._defaultParameters, 'relVal' , 'RelValTTbar' , '' )
66  self.addParameter( self._defaultParameters, 'dataTier' , 'GEN-SIM-RECO' , '' )
67  self.addParameter( self._defaultParameters, 'condition' , 'startup' , '' )
68  gt = autoCond[ self.getDefaultParameters()[ 'condition' ].value ]
69  if isinstance(gt,tuple) or isinstance(gt,list):
70  gt = gt[0]
71  self.addParameter( self._defaultParameters, 'globalTag' , gt[ : -5 ] , 'auto from \'condition\'' )
72  self.addParameter( self._defaultParameters, 'maxVersions' , 3 , '' )
73  self.addParameter( self._defaultParameters, 'skipFiles' , 0 , '' )
74  self.addParameter( self._defaultParameters, 'numberOfFiles', -1 , 'all' )
75  self.addParameter( self._defaultParameters, 'debug' , False , '' )
76  self._parameters = copy.deepcopy( self._defaultParameters )
77  self._comment = ""

Member Function Documentation

def cmsswVersionTools.PickRelValInputFiles.__call__ (   self,
  useDAS = None,
  cmsswVersion = None,
  formerVersion = None,
  relVal = None,
  dataTier = None,
  condition = None,
  globalTag = None,
  maxVersions = None,
  skipFiles = None,
  numberOfFiles = None,
  debug = None 
)

Definition at line 90 of file cmsswVersionTools.py.

References gen::PhotosInterfaceBase.apply(), MatrixReader.MatrixReader.apply, DummyOOTPileupCorrection.apply(), gen::PhotosppInterface.apply(), gen::PhotosInterface.apply(), SurveyParameters.apply(), FWPSetCellEditor.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), BeamSpotAlignmentParameters.apply(), RigidBodyAlignmentParameters.apply(), ConfigToolBase.ConfigToolBase.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.apply(), OOTPileupCorrData.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), AbsOOTPileupCorrection.apply(), TwoBowedSurfacesAlignmentParameters.apply(), Vispa.Gui.BoxContentDialog.BoxContentDialog.apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog.apply(), cmsswVersionTools.PickRelValInputFiles.apply(), npstat::ArrayND< Numeric, StackLen, StackDim >.apply(), Config.ProcessModifier.apply(), editorTools.ChangeSource.getDefaultParameters(), cmsswVersionTools.PickRelValInputFiles.getDefaultParameters(), ora::OraMainTable.setParameter(), ora::IMainTable.setParameter(), PedeReader.setParameter(), ora::PoolMainTable.setParameter(), QIE8Simulator.setParameter(), AbsElectronicODERHS.setParameter(), IntegratedCalibrationBase.setParameter(), SiStripLorentzAngleCalibration.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

90 
91  ):
92  if useDAS is None:
93  useDAS = self.getDefaultParameters()[ 'useDAS' ].value
94  if cmsswVersion is None:
95  cmsswVersion = self.getDefaultParameters()[ 'cmsswVersion' ].value
96  if formerVersion is None:
97  formerVersion = self.getDefaultParameters()[ 'formerVersion' ].value
98  if relVal is None:
99  relVal = self.getDefaultParameters()[ 'relVal' ].value
100  if dataTier is None:
101  dataTier = self.getDefaultParameters()[ 'dataTier' ].value
102  if condition is None:
103  condition = self.getDefaultParameters()[ 'condition' ].value
104  if globalTag is None:
105  globalTag = autoCond[ condition ][ : -5 ] # auto from 'condition'
106  if maxVersions is None:
107  maxVersions = self.getDefaultParameters()[ 'maxVersions' ].value
108  if skipFiles is None:
109  skipFiles = self.getDefaultParameters()[ 'skipFiles' ].value
110  if numberOfFiles is None:
111  numberOfFiles = self.getDefaultParameters()[ 'numberOfFiles' ].value
112  if debug is None:
113  debug = self.getDefaultParameters()[ 'debug' ].value
114  self.setParameter( 'useDAS' , useDAS )
115  self.setParameter( 'cmsswVersion' , cmsswVersion )
116  self.setParameter( 'formerVersion', formerVersion )
117  self.setParameter( 'relVal' , relVal )
118  self.setParameter( 'dataTier' , dataTier )
119  self.setParameter( 'condition' , condition )
120  self.setParameter( 'globalTag' , globalTag )
121  self.setParameter( 'maxVersions' , maxVersions )
122  self.setParameter( 'skipFiles' , skipFiles )
123  self.setParameter( 'numberOfFiles', numberOfFiles )
124  self.setParameter( 'debug' , debug )
125  return self.apply()
def cmsswVersionTools.PickRelValInputFiles.apply (   self)

Definition at line 130 of file cmsswVersionTools.py.

References ElectronCalibrator.EmbeddedElectronCalibrator._label, editorTools.UserCodeTool._label, MagneticFieldMapESProducer._label, TrackerInteractionGeometryESProducer._label, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._label, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._label, ConfigToolBase.ConfigToolBase._label, editorTools.ChangeSource._label, LHECOMWeightProducer._label, cmsswVersionTools.PickRelValInputFiles._label, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool._label, Vispa.Views.LineDecayView.DecayLine._label, editorTools.UserCodeTool._parameters, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, ConfigToolBase.ConfigToolBase._parameters, editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, TAbsFitParticle._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, communicate(), cmsRelvalreport.exit, editorTools.ChangeSource.getDefaultParameters(), cmsswVersionTools.PickRelValInputFiles.getDefaultParameters(), cmsswVersionTools.PickRelValInputFiles.messageEmptyList(), and split.

Referenced by heavyIonTools.ConfigureHeavyIons.__call__(), editorTools.UserCodeTool.__call__(), HiCoreTools.RestrictInputToAOD.__call__(), coreTools.RunOnData.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), heavyIonTools.ProductionDefaults.__call__(), editorTools.ChangeSource.__call__(), HiCoreTools.RemoveMCMatching.__call__(), cmsswVersionTools.PickRelValInputFiles.__call__(), coreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), heavyIonTools.SelectionDefaults.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), heavyIonTools.DisbaleMonteCarloDeps.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), jetTools.AddJetCollection.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.SwitchJetCollection.__call__(), jetTools.UpdateJetCollection.__call__(), jetTools.AddJetID.__call__(), and jetTools.SetTagInfos.__call__().

131  def apply( self ):
132  useDAS = self._parameters[ 'useDAS' ].value
133  cmsswVersion = self._parameters[ 'cmsswVersion' ].value
134  formerVersion = self._parameters[ 'formerVersion' ].value
135  relVal = self._parameters[ 'relVal' ].value
136  dataTier = self._parameters[ 'dataTier' ].value
137  condition = self._parameters[ 'condition' ].value # only used for GT determination in initialization, if GT not explicitly given
138  globalTag = self._parameters[ 'globalTag' ].value
139  maxVersions = self._parameters[ 'maxVersions' ].value
140  skipFiles = self._parameters[ 'skipFiles' ].value
141  numberOfFiles = self._parameters[ 'numberOfFiles' ].value
142  debug = self._parameters[ 'debug' ].value
143 
144  filePaths = []
145 
146  # Determine corresponding CMSSW version for RelVals
147  preId = '_pre'
148  patchId = '_patch' # patch releases
149  hltPatchId = '_hltpatch' # HLT patch releases
150  dqmPatchId = '_dqmpatch' # DQM patch releases
151  slhcId = '_SLHC' # SLHC releases
152  rootId = '_root' # ROOT test releases
153  ibId = '_X_' # IBs
154  if patchId in cmsswVersion:
155  cmsswVersion = cmsswVersion.split( patchId )[ 0 ]
156  elif hltPatchId in cmsswVersion:
157  cmsswVersion = cmsswVersion.split( hltPatchId )[ 0 ]
158  elif dqmPatchId in cmsswVersion:
159  cmsswVersion = cmsswVersion.split( dqmPatchId )[ 0 ]
160  elif rootId in cmsswVersion:
161  cmsswVersion = cmsswVersion.split( rootId )[ 0 ]
162  elif slhcId in cmsswVersion:
163  cmsswVersion = cmsswVersion.split( slhcId )[ 0 ]
164  elif ibId in cmsswVersion or formerVersion:
165  outputTuple = Popen( [ 'scram', 'l -c CMSSW' ], stdout = PIPE, stderr = PIPE ).communicate()
166  if len( outputTuple[ 1 ] ) != 0:
167  print '%s INFO : SCRAM error'%( self._label )
168  if debug:
169  print ' from trying to determine last valid releases before \'%s\''%( cmsswVersion )
170  print
171  print outputTuple[ 1 ]
172  print
173  self.messageEmptyList()
174  return filePaths
175  versions = { 'last' :''
176  , 'lastToLast':''
177  }
178  for line in outputTuple[ 0 ].splitlines():
179  version = line.split()[ 1 ]
180  if cmsswVersion.split( ibId )[ 0 ] in version or cmsswVersion.rpartition( '_' )[ 0 ] in version:
181  if not ( patchId in version or hltPatchId in version or dqmPatchId in version or slhcId in version or ibId in version or rootId in version ):
182  versions[ 'lastToLast' ] = versions[ 'last' ]
183  versions[ 'last' ] = version
184  if version == cmsswVersion:
185  break
186  # FIXME: ordering of output problematic ('XYZ_pre10' before 'XYZ_pre2', no "formerVersion" for 'XYZ_pre1')
187  if formerVersion:
188  # Don't use pre-releases as "former version" for other releases than CMSSW_X_Y_0
189  if preId in versions[ 'lastToLast' ] and not preId in versions[ 'last' ] and not versions[ 'last' ].endswith( '_0' ):
190  versions[ 'lastToLast' ] = versions[ 'lastToLast' ].split( preId )[ 0 ] # works only, if 'CMSSW_X_Y_0' esists ;-)
191  # Use pre-release as "former version" for CMSSW_X_Y_0
192  elif versions[ 'last' ].endswith( '_0' ) and not ( preId in versions[ 'lastToLast' ] and versions[ 'lastToLast' ].startswith( versions[ 'last' ] ) ):
193  versions[ 'lastToLast' ] = ''
194  for line in outputTuple[ 0 ].splitlines():
195  version = line.split()[ 1 ]
196  versionParts = version.partition( preId )
197  if versionParts[ 0 ] == versions[ 'last' ] and versionParts[ 1 ] == preId:
198  versions[ 'lastToLast' ] = version
199  elif versions[ 'lastToLast' ] != '':
200  break
201  # Don't use CMSSW_X_Y_0 as "former version" for pre-releases
202  elif preId in versions[ 'last' ] and not preId in versions[ 'lastToLast' ] and versions[ 'lastToLast' ].endswith( '_0' ):
203  versions[ 'lastToLast' ] = '' # no alternative :-(
204  cmsswVersion = versions[ 'lastToLast' ]
205  else:
206  cmsswVersion = versions[ 'last' ]
207 
208  # Debugging output
209  if debug:
210  print '%s DEBUG: Called with...'%( self._label )
211  for key in self._parameters.keys():
212  print ' %s:\t'%( key ),
213  print self._parameters[ key ].value,
214  if self._parameters[ key ].value is self.getDefaultParameters()[ key ].value:
215  print ' (default)'
216  else:
217  print
218  if key == 'cmsswVersion' and cmsswVersion != self._parameters[ key ].value:
219  if formerVersion:
220  print ' ==> modified to last to last valid release %s (s. \'formerVersion\' parameter)'%( cmsswVersion )
221  else:
222  print ' ==> modified to last valid release %s'%( cmsswVersion )
223 
224  # Check domain
225  domain = socket.getfqdn().split( '.' )
226  domainSE = ''
227  if len( domain ) == 0:
228  print '%s INFO : Cannot determine domain of this computer'%( self._label )
229  if debug:
230  self.messageEmptyList()
231  return filePaths
232  elif os.uname()[0] == "Darwin":
233  print '%s INFO : Running on MacOSX without direct access to RelVal files.'%( self._label )
234  if debug:
235  self.messageEmptyList()
236  return filePaths
237  elif len( domain ) == 1:
238  print '%s INFO : Running on local host \'%s\' without direct access to RelVal files'%( self._label, domain[ 0 ] )
239  if debug:
240  self.messageEmptyList()
241  return filePaths
242  if not ( ( domain[ -2 ] == 'cern' and domain[ -1 ] == 'ch' ) or ( domain[ -2 ] == 'fnal' and domain[ -1 ] == 'gov' ) ):
243  print '%s INFO : Running on site \'%s.%s\' without direct access to RelVal files'%( self._label, domain[ -2 ], domain[ -1 ] )
244  if debug:
245  self.messageEmptyList()
246  return filePaths
247  if domain[ -2 ] == 'cern':
248  domainSE = 'T2_CH_CERN'
249  elif domain[ -2 ] == 'fnal':
250  domainSE = 'T1_US_FNAL_MSS'
251  if debug:
252  print '%s DEBUG: Running at site \'%s.%s\''%( self._label, domain[ -2 ], domain[ -1 ] )
253  print '%s DEBUG: Looking for SE \'%s\''%( self._label, domainSE )
254 
255  # Find files
256  validVersion = 0
257  dataset = ''
258  datasetAll = '/%s/%s-%s-v*/%s'%( relVal, cmsswVersion, globalTag, dataTier )
259  if useDAS:
260  if debug:
261  print '%s DEBUG: Using DAS query'%( self._label )
262  dasLimit = numberOfFiles
263  if dasLimit <= 0:
264  dasLimit += 1
265  for version in range( maxVersions, 0, -1 ):
266  filePaths = []
267  filePathsTmp = []
268  fileCount = 0
269  dataset = '/%s/%s-%s-v%i/%s'%( relVal, cmsswVersion, globalTag, version, dataTier )
270  dasQuery = 'file dataset=%s | grep file.name'%( dataset )
271  if debug:
272  print '%s DEBUG: Querying dataset \'%s\' with'%( self._label, dataset )
273  print ' \'%s\''%( dasQuery )
274  # partially stolen from das_client.py for option '--format=plain', needs filter ("grep") in the query
275  jsondict = das_client.get_data( 'https://cmsweb.cern.ch', dasQuery, 0, dasLimit, False )
276  if debug:
277  print '%s DEBUG: Received DAS JSON dictionary:'%( self._label )
278  print ' \'%s\''%( jsondict )
279  if jsondict[ 'status' ] != 'ok':
280  print 'There was a problem while querying DAS with query \'%s\'. Server reply was:\n %s' % (dasQuery, jsondict)
281  exit( 1 )
282  mongo_query = jsondict[ 'mongo_query' ]
283  filters = mongo_query[ 'filters' ]
284  data = jsondict[ 'data' ]
285  if debug:
286  print '%s DEBUG: Query in JSON dictionary:'%( self._label )
287  print ' \'%s\''%( mongo_query )
288  print '%s DEBUG: Filters in query:'%( self._label )
289  print ' \'%s\''%( filters )
290  print '%s DEBUG: Data in JSON dictionary:'%( self._label )
291  print ' \'%s\''%( data )
292  for row in data:
293  filePath = [ r for r in das_client.get_value( row, filters[ 'grep' ] ) ][ 0 ]
294  if debug:
295  print '%s DEBUG: Testing file entry \'%s\''%( self._label, filePath )
296  if len( filePath ) > 0:
297  if validVersion != version:
298  jsontestdict = das_client.get_data( 'https://cmsweb.cern.ch', 'site dataset=%s | grep site.name'%( dataset ), 0, 999, False )
299  mongo_testquery = jsontestdict[ 'mongo_query' ]
300  testfilters = mongo_testquery[ 'filters' ]
301  testdata = jsontestdict[ 'data' ]
302  if debug:
303  print '%s DEBUG: Received DAS JSON dictionary (site test):'%( self._label )
304  print ' \'%s\''%( jsontestdict )
305  print '%s DEBUG: Query in JSON dictionary (site test):'%( self._label )
306  print ' \'%s\''%( mongo_testquery )
307  print '%s DEBUG: Filters in query (site test):'%( self._label )
308  print ' \'%s\''%( testfilters )
309  print '%s DEBUG: Data in JSON dictionary (site test):'%( self._label )
310  print ' \'%s\''%( testdata )
311  foundSE = False
312  for testrow in testdata:
313  siteName = [ tr for tr in das_client.get_value( testrow, testfilters[ 'grep' ] ) ][ 0 ]
314  if siteName == domainSE:
315  foundSE = True
316  break
317  if not foundSE:
318  if debug:
319  print '%s DEBUG: Possible version \'v%s\' not available on SE \'%s\''%( self._label, version, domainSE )
320  break
321  validVersion = version
322  if debug:
323  print '%s DEBUG: Valid version set to \'v%i\''%( self._label, validVersion )
324  if numberOfFiles == 0:
325  break
326  # protect from double entries ( 'unique' flag in query does not work here)
327  if not filePath in filePathsTmp:
328  filePathsTmp.append( filePath )
329  if debug:
330  print '%s DEBUG: File \'%s\' found'%( self._label, filePath )
331  fileCount += 1
332  # needed, since and "limit" overrides "idx" in 'get_data' (==> "idx" set to '0' rather than "skipFiles")
333  if fileCount > skipFiles:
334  filePaths.append( filePath )
335  elif debug:
336  print '%s DEBUG: File \'%s\' found again'%( self._label, filePath )
337  if validVersion > 0:
338  if numberOfFiles == 0 and debug:
339  print '%s DEBUG: No files requested'%( self._label )
340  break
341  else:
342  if debug:
343  print '%s DEBUG: Using DBS query'%( self._label )
344  print '%s WARNING: DBS query disabled for DBS3 transition to new API'%( self._label )
345  #for version in range( maxVersions, 0, -1 ):
346  #filePaths = []
347  #fileCount = 0
348  #dataset = '/%s/%s-%s-v%i/%s'%( relVal, cmsswVersion, globalTag, version, dataTier )
349  #dbsQuery = 'find file where dataset = %s'%( dataset )
350  #if debug:
351  #print '%s DEBUG: Querying dataset \'%s\' with'%( self._label, dataset )
352  #print ' \'%s\''%( dbsQuery )
353  #foundSE = False
354  #for line in os.popen( 'dbs search --query="%s"'%( dbsQuery ) ).readlines():
355  #if line.find( '.root' ) != -1:
356  #if validVersion != version:
357  #if not foundSE:
358  #dbsSiteQuery = 'find dataset where dataset = %s and site = %s'%( dataset, domainSE )
359  #if debug:
360  #print '%s DEBUG: Querying site \'%s\' with'%( self._label, domainSE )
361  #print ' \'%s\''%( dbsSiteQuery )
362  #for lineSite in os.popen( 'dbs search --query="%s"'%( dbsSiteQuery ) ).readlines():
363  #if lineSite.find( dataset ) != -1:
364  #foundSE = True
365  #break
366  #if not foundSE:
367  #if debug:
368  #print '%s DEBUG: Possible version \'v%s\' not available on SE \'%s\''%( self._label, version, domainSE )
369  #break
370  #validVersion = version
371  #if debug:
372  #print '%s DEBUG: Valid version set to \'v%i\''%( self._label, validVersion )
373  #if numberOfFiles == 0:
374  #break
375  #filePath = line.replace( '\n', '' )
376  #if debug:
377  #print '%s DEBUG: File \'%s\' found'%( self._label, filePath )
378  #fileCount += 1
379  #if fileCount > skipFiles:
380  #filePaths.append( filePath )
381  #if not numberOfFiles < 0:
382  #if numberOfFiles <= len( filePaths ):
383  #break
384  #if validVersion > 0:
385  #if numberOfFiles == 0 and debug:
386  #print '%s DEBUG: No files requested'%( self._label )
387  #break
388 
389  # Check output and return
390  if validVersion == 0:
391  print '%s WARNING : No RelVal file(s) found at all in datasets \'%s*\' on SE \'%s\''%( self._label, datasetAll, domainSE )
392  if debug:
393  self.messageEmptyList()
394  elif len( filePaths ) == 0:
395  print '%s WARNING : No RelVal file(s) picked up in dataset \'%s\''%( self._label, dataset )
396  if debug:
397  self.messageEmptyList()
398  elif len( filePaths ) < numberOfFiles:
399  print '%s INFO : Only %i RelVal file(s) instead of %i picked up in dataset \'%s\''%( self._label, len( filePaths ), numberOfFiles, dataset )
400 
401  if debug:
402  print '%s DEBUG: returning %i file(s):\n%s'%( self._label, len( filePaths ), filePaths )
403  return filePaths
static void * communicate(void *obj)
Definition: DQMNet.cc:1246
double split
Definition: MVATrainer.cc:139
def cmsswVersionTools.PickRelValInputFiles.getDefaultParameters (   self)

Definition at line 56 of file cmsswVersionTools.py.

References editorTools.UserCodeTool._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, editorTools.ChangeSource._defaultParameters, and cmsswVersionTools.PickRelValInputFiles._defaultParameters.

Referenced by cmsswVersionTools.PickRelValInputFiles.__call__(), cmsswVersionTools.PickRelValInputFiles.__init__(), and cmsswVersionTools.PickRelValInputFiles.apply().

56 
57  def getDefaultParameters( self ):
58  return self._defaultParameters
def cmsswVersionTools.PickRelValInputFiles.messageEmptyList (   self)

Definition at line 126 of file cmsswVersionTools.py.

References ElectronCalibrator.EmbeddedElectronCalibrator._label, editorTools.UserCodeTool._label, MagneticFieldMapESProducer._label, TrackerInteractionGeometryESProducer._label, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._label, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._label, editorTools.ChangeSource._label, ConfigToolBase.ConfigToolBase._label, LHECOMWeightProducer._label, cmsswVersionTools.PickRelValInputFiles._label, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool._label, and Vispa.Views.LineDecayView.DecayLine._label.

Referenced by cmsswVersionTools.PickRelValInputFiles.apply().

127  def messageEmptyList( self ):
128  print '%s DEBUG: Empty file list returned'%( self._label )
129  print ' This might be overwritten by providing input files explicitly to the source module in the main configuration file.'

Member Data Documentation

cmsswVersionTools.PickRelValInputFiles._comment
private

Definition at line 76 of file cmsswVersionTools.py.

Referenced by runJetUncertainties.RunJetUncertainties.__init__(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__().

tuple cmsswVersionTools.PickRelValInputFiles._defaultParameters = dicttypes.SortedKeysDict()
staticprivate

Definition at line 54 of file cmsswVersionTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.__call__(), coreTools.RunOnData.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), HiCoreTools.RemoveMCMatching.__call__(), coreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), jetTools.AddJetCollection.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.SwitchJetCollection.__call__(), jetTools.UpdateJetCollection.__call__(), jetTools.AddJetID.__call__(), jetTools.SetTagInfos.__call__(), metTools.AddMETCollection.__init__(), trackTools.MakeAODTrackCandidates.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), coreTools.RunOnData.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), HiCoreTools.RemoveMCMatching.__init__(), cmsswVersionTools.PickRelValInputFiles.__init__(), coreTools.RemoveMCMatching.__init__(), trackTools.MakePATTrackCandidates.__init__(), trigTools.SwitchOnTrigger.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), trigTools.SwitchOnTriggerStandAlone.__init__(), trackTools.MakeTrackCandidates.__init__(), tauTools.AddTauCollection.__init__(), trigTools.SwitchOnTriggerMatching.__init__(), HiCoreTools.RemoveCleaning.__init__(), jetTools.AddJetCollection.__init__(), HiCoreTools.AddCleaning.__init__(), trigTools.SwitchOnTriggerMatchingStandAlone.__init__(), trigTools.SwitchOnTriggerMatchEmbedding.__init__(), jetTools.SwitchJetCollection.__init__(), jetTools.UpdateJetCollection.__init__(), jetTools.AddJetID.__init__(), jetTools.SetTagInfos.__init__(), ConfigToolBase.ConfigToolBase.dumpPython(), ConfigToolBase.ConfigToolBase.getAllowedValues(), heavyIonTools.ConfigureHeavyIons.getDefaultParameters(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), coreTools.RunOnData.getDefaultParameters(), trackTools.MakeAODTrackCandidates.getDefaultParameters(), metTools.AddMETCollection.getDefaultParameters(), heavyIonTools.ProductionDefaults.getDefaultParameters(), cmsswVersionTools.PickRelValInputFiles.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), coreTools.RemoveMCMatching.getDefaultParameters(), trackTools.MakePATTrackCandidates.getDefaultParameters(), trigTools.SwitchOnTrigger.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getDefaultParameters(), heavyIonTools.SelectionDefaults.getDefaultParameters(), HiCoreTools.RemoveAllPATObjectsBut.getDefaultParameters(), heavyIonTools.DisbaleMonteCarloDeps.getDefaultParameters(), HiCoreTools.RemoveSpecificPATObjects.getDefaultParameters(), trigTools.SwitchOnTriggerStandAlone.getDefaultParameters(), trackTools.MakeTrackCandidates.getDefaultParameters(), tauTools.AddTauCollection.getDefaultParameters(), trigTools.SwitchOnTriggerMatching.getDefaultParameters(), HiCoreTools.RemoveCleaning.getDefaultParameters(), HiCoreTools.AddCleaning.getDefaultParameters(), jetTools.AddJetCollection.getDefaultParameters(), trigTools.SwitchOnTriggerMatchingStandAlone.getDefaultParameters(), trigTools.SwitchOnTriggerMatchEmbedding.getDefaultParameters(), jetTools.SwitchJetCollection.getDefaultParameters(), jetTools.UpdateJetCollection.getDefaultParameters(), jetTools.AddJetID.getDefaultParameters(), jetTools.SetTagInfos.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.initializeInputTag(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

string cmsswVersionTools.PickRelValInputFiles._label = 'pickRelValInputFiles'
staticprivate

Definition at line 53 of file cmsswVersionTools.py.

Referenced by cmsswVersionTools.PickRelValInputFiles.apply(), validation.SimpleSample.digest(), validation.SimpleSample.label(), cmsswVersionTools.PickRelValInputFiles.messageEmptyList(), trigTools.SwitchOnTrigger.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), and trigTools.SwitchOnTriggerMatchEmbedding.toolCode().

cmsswVersionTools.PickRelValInputFiles._parameters
private

Definition at line 75 of file cmsswVersionTools.py.

Referenced by runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), cmsswVersionTools.PickRelValInputFiles.apply(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createSmearedJetModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getUnclusteredVariationsForMVAMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), HiCoreTools.RestrictInputToAOD.toolCode(), coreTools.RunOnData.toolCode(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), runJetUncertainties.RunJetUncertainties.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), coreTools.RemoveMCMatching.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTrigger.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.toolCode(), trackTools.MakeTrackCandidates.toolCode(), tauTools.AddTauCollection.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), jetTools.AddJetCollection.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.SwitchJetCollection.toolCode(), jetTools.UpdateJetCollection.toolCode(), jetTools.AddJetID.toolCode(), jetTools.SetTagInfos.toolCode(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.updateJECs().