CMS 3D CMS Logo

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__ (self, dataset, user, options)
 
def addOption (self, parser)
 
def run (self, input)
 
- Public Member Functions inherited from production_tasks.Task
def __init__ (self, name, dataset, user, options, instance=None)
 
def addOption (self, parser)
 
def getname (self)
 
def run (self, input)
 

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 227 of file production_tasks.py.

Constructor & Destructor Documentation

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

Definition at line 229 of file production_tasks.py.

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

Member Function Documentation

def production_tasks.CheckForMask.addOption (   self,
  parser 
)

Definition at line 231 of file production_tasks.py.

231  def addOption(self, parser):
232  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 233 of file production_tasks.py.

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

Member Data Documentation

production_tasks.CheckForMask.user