3 import eostools
as castortools
6 """Factor out the magic user hack for use in other classes""" 10 tokens = user.split(
'_')
11 if tokens
and len(tokens) > 1:
17 """Gets the top level directory to use for writing for 'user'""" 22 d =
'root://eoscms.cern.ch//eos/cms/store/cmst3/%s/%s/CMG' % (area,user)
23 exists = castortools.isDirectory( castortools.lfnToCastor(d) )
27 msg =
"The directory '%s' does not exist. Please check the username and area (user/group). You may need to create the directory yourself." % d
28 print >> sys.stderr, msg
32 """Gets the top level directory to use for writing for the current user"""
def castorBaseDir(user=os.environ['USER'], area=None)