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.18 by fanzago, Mon Dec 8 16:37:46 2008 UTC vs.
Revision 1.24 by slacapra, Thu May 7 08:04:55 2009 UTC

# Line 15 | Line 15 | class PhEDExDatasvcInfo:
15          self.datasvc_url = cfg_params.get("USER.datasvc_url",url)
16  
17          self.FacOps_savannah = 'https://savannah.cern.ch/support/?func=additem&group=cmscompinfrasup'
18 <        stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabFaq#How_to_store_output_with_CRAB_2'
18 >        stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabHowTo#Stageout_and_publication'
19          self.dataPub_faq = 'https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabForPublication'
20  
21          self.srm_version = cfg_params.get("USER.srm_version",'srmv2')
# Line 58 | Line 58 | class PhEDExDatasvcInfo:
58              raise CrabException(msg)
59          self.sched = common.scheduler.name().upper()
60          self.protocol = self.srm_version
61 +
62 +        self.forced_path = '/store/user/'
63          if self.sched in ['CAF','LSF']:
64              self.protocol = 'direct'
65              self.SE = {'CAF':'caf.cern.ch', 'LSF':''}
66 <
67 <        self.forced_path = '/store/user/'
66 >            if self.sched == 'CAF': self.forced_path = '/store/caf/user/'
67 >            
68          if not self.usePhedex:
69              self.forced_path = self.user_remote_dir
70          return
# Line 102 | Line 104 | class PhEDExDatasvcInfo:
104                  SE_PATH = endpoint.split(host)[1]
105              USER = (query.split('user')[1]).split('/')[1]
106          else:
107 +            #### to test #####
108 +           # url = 'http://'+endpoint.split('://')[1]
109 +           # scheme, host, path, params, query, fragment = urlparse(url)
110 +           # SE = host.split(':')[0]
111 +           # SE_PATH = endpoint.split(host)[1]
112              SE = self.node
113              SE_PATH = self.user_se_path + self.user_remote_dir
114              try:
# Line 134 | Line 141 | class PhEDExDatasvcInfo:
141          if int(self.publish_data) == 1 or int(self.usenamespace) == 1:
142              if self.sched in ['CAF']: l_User=True
143              primaryDataset = self.computePrimaryDataset()
144 <            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name, LocalUser=l_User)  + '/${PSETHASH}/'    
144 >            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name)  + '/${PSETHASH}/'    
145          else:
146              if self.sched in ['CAF','LSF']: l_User=True
147 <            lfn = LFNBase(self.forced_path,self.user_remote_dir,LocalUser=l_User)
147 >            lfn = LFNBase(self.forced_path,self.user_remote_dir)
148          return lfn
149  
150      def computePrimaryDataset(self):
# Line 160 | Line 167 | class PhEDExDatasvcInfo:
167          params = {'node' : self.node , 'lfn': self.lfn , 'protocol': self.protocol}
168          params = urllib.urlencode(params)
169          datasvc_lfn2pfn="%s/lfn2pfn"%self.datasvc_url
163        urlresults = urllib.urlopen(datasvc_lfn2pfn, params)
170          try:
171 +            urlresults = urllib.urlopen(datasvc_lfn2pfn, params)
172              urlresults = parse(urlresults)
173 +        except IOError:
174 +            msg="Unable to access PhEDEx Data Service at %s"%datasvc_lfn2pfn
175 +            raise CrabException(msg)
176          except:
177              urlresults = None
178  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines