CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
production_tasks.FindOnCastor Class Reference
Inheritance diagram for production_tasks.FindOnCastor:
production_tasks.Task

Public Member Functions

def __init__ (self, dataset, user, options)
 
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

Checks that the sample specified exists in the CASTOR area of the user specified. The directory must exist.

Definition at line 209 of file production_tasks.py.

Constructor & Destructor Documentation

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

Definition at line 211 of file production_tasks.py.

211  def __init__(self, dataset, user, options):
212  Task.__init__(self,'FindOnCastor', dataset, user, options)
def __init__(self, dataset, user, options)

Member Function Documentation

def production_tasks.FindOnCastor.run (   self,
  input 
)

Definition at line 213 of file production_tasks.py.

213  def run(self, input):
214  if self.user == 'CMS':
215  return {'Topdir':None,'Directory':None}
216  topdir = castortools.lfnToCastor(castorBaseDir(user=self.user))
217  directory = '%s/%s' % (topdir,self.dataset)
218  # directory = directory.replace('//','/')
219  if not castortools.fileExists(directory):
220  if hasattr(self,'create') and self.create:
221  castortools.createCastorDir(directory)
222  #castortools.chmod(directory,'775')
223  if not castortools.isDirectory(directory):
224  raise Exception("Dataset directory '%s' does not exist or could not be created" % directory)
225  return {'Topdir':topdir,'Directory':directory}
226 

Member Data Documentation

production_tasks.FindOnCastor.user