ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/PhEDExDatasvcInfo.py
(Generate patch)

Comparing COMP/CRAB/python/PhEDExDatasvcInfo.py (file contents):
Revision 1.41 by fanzago, Fri Aug 5 15:39:08 2011 UTC vs.
Revision 1.42 by fanzago, Mon Aug 29 09:48:03 2011 UTC

# Line 79 | Line 79 | class PhEDExDatasvcInfo:
79                  add += '      Please remove it by hand'
80              msg += add
81              raise CrabException(msg)
82            #########################################
82  
83          self.forced_path = '/store/user/'
84 <        if self.sched in ['CAF','LSF','PBS']:
84 >        if self.sched in ['LSF','PBS']:
85              self.srm_version = 'direct'
86 <            self.SE = {'CAF':'caf.cern.ch', 'LSF':'', 'PBS':''}
88 <            if self.sched == 'CAF': self.forced_path = '/store/caf/user/'
86 >            self.SE = {'LSF':'', 'PBS':''}
87              
88 +        if self.sched == 'CAF':
89 +            #### FEDE TEST FOR XROOTD
90 +            ######### first solution ################
91 +            #eos = cfg_params.get("USER.caf_eos_area", 0)
92 +            #if eos == 0:
93 +            #    self.forced_path = '/store/caf/user/'
94 +            #else:    
95 +            #    self.forced_path = '/store/eos/user'
96 +            #########################################
97 +            ######### second solution ###############
98 +            self.forced_path = cfg_params.get("USER.caf_lfn", '/store/caf/user')
99 +            #########################################
100 +            print "--->>> FORCING THE FIRST PART OF LFN WITH ", self.forced_path
101 +            self.SE = {'CAF':'caf.cern.ch'}
102 +            self.srm_version = 'stageout'
103 +            print "--->>> query with 'stageout' "
104 +            #########################################
105 +
106          if not self.usePhedex:
107              self.forced_path = self.user_remote_dir
108          return
# Line 104 | Line 120 | class PhEDExDatasvcInfo:
120          #extract SE name an SE_PATH (needed for publication)
121          SE, SE_PATH, User = self.splitEndpoint(endpoint)
122  
123 +        #### FEDE FOR XROOTD #####
124 +        #print "in getEndpoint di PhEDExDatasvcInfo.py: "
125 +        #print "    SE = ", SE
126 +        #print "    SE_PATH = ", SE_PATH
127 +        #print "    User = ", User
128 +        #print "    endpoint = ", endpoint
129 +        ##############################
130 +
131          return endpoint, self.lfn , SE, SE_PATH, User        
132        
133      def splitEndpoint(self, endpoint):
# Line 114 | Line 138 | class PhEDExDatasvcInfo:
138          SE_PATH = ''
139          USER = getUserName()
140          if self.usePhedex:
141 <            if self.protocol == 'direct':
142 <                query=endpoint
119 <                SE_PATH = endpoint
141 >            ### FEDE PER TEST WITH XROOTD
142 >            if (self.protocol == 'direct' or self.protocol == 'stageout'):
143                  SE = self.SE[self.sched]
144 +                SE_PATH = endpoint
145 +                #############################  
146 +                #print "    SE_PATH = ", SE_PATH
147              else:
148                  url = 'http://'+endpoint.split('://')[1]
149                  scheme, host, path, params, query, fragment = urlparse(url)
# Line 237 | Line 263 | class PhEDExDatasvcInfo:
263              params = {'node' : self.node , 'lfn': self.lfn , 'protocol': self.protocol}
264              datasvc_lfn2pfn="%s/lfn2pfn"%self.datasvc_url
265              fullurl="%s/lfn2pfn?node=%s&lfn=%s&protocol=%s"%(self.datasvc_url,self.node,self.lfn,self.protocol)
266 +            print "--->>> fullurl = ", fullurl
267              domlfn2pfn = self.domPhedex(params,datasvc_lfn2pfn)
268              if not domlfn2pfn :
269                  msg="Unable to get info from %s"%fullurl

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines