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
production_tasks.CheckForMask Class Reference
Inheritance diagram for production_tasks.CheckForMask:
production_tasks.Task

Public Member Functions

def __init__
 
def addOption
 
def run
 
- Public Member Functions inherited from production_tasks.Task
def __init__
 
def addOption
 
def getname
 
def run
 

Public Attributes

 user
 
- Public Attributes inherited from production_tasks.Task
 dataset
 
 instance
 
 name
 
 options
 
 user
 

Detailed Description

Tests if a file mask, created by edmIntegrityCheck.py, is present already and reads it if so.

Definition at line 223 of file production_tasks.py.

Constructor & Destructor Documentation

def production_tasks.CheckForMask.__init__ (   self,
  dataset,
  user,
  options 
)

Definition at line 225 of file production_tasks.py.

226  def __init__(self, dataset, user, options):
Task.__init__(self,'CheckForMask', dataset, user, options)

Member Function Documentation

def production_tasks.CheckForMask.addOption (   self,
  parser 
)

Definition at line 227 of file production_tasks.py.

228  def addOption(self, parser):
parser.add_option("-c", "--check", dest="check", default=False, action='store_true',help='Check filemask if available')
def production_tasks.CheckForMask.run (   self,
  input 
)

Definition at line 229 of file production_tasks.py.

230  def run(self, input):
231  #skip for DBS
232  if self.user == 'CMS':
233  return {'MaskPresent':True,'Report':'Files taken from DBS'}
234 
235  dir = input['FindOnCastor']['Directory']
236  mask = "IntegrityCheck"
237  file_mask = []
238 
239  report = None
240  if (hasattr(self.options,'check') and self.options.check) or not hasattr(self.options,'check'):
241  file_mask = castortools.matchingFiles(dir, '^%s_.*\.txt$' % mask)
242 
243  if file_mask:
244  p = PublishToFileSystem(mask)
245  report = p.get(dir)
return {'MaskPresent':report is not None,'Report':report}

Member Data Documentation

production_tasks.CheckForMask.user

Definition at line 231 of file production_tasks.py.

Referenced by cmsPerfSuite.PerfSuite.optionParse().