2 from __future__
import print_function
4 import eostools
as castortools
7 """Factor out the magic user hack for use in other classes""" 11 tokens = user.split(
'_')
12 if tokens
and len(tokens) > 1:
18 """Gets the top level directory to use for writing for 'user'""" 23 d =
'root://eoscms.cern.ch//eos/cms/store/cmst3/%s/%s/CMG' % (area,user)
24 exists = castortools.isDirectory( castortools.lfnToCastor(d) )
28 msg =
"The directory '%s' does not exist. Please check the username and area (user/group). You may need to create the directory yourself." % d
29 print(msg, file=sys.stderr)
33 """Gets the top level directory to use for writing for the current user"""
S & print(S &os, JobReport::InputFile const &f)
def castorBaseDir(user=os.environ['USER'], area=None)