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.45 by spiga, Mon Jan 30 12:16:04 2012 UTC vs.
Revision 1.49 by fanzago, Fri Oct 12 13:36:22 2012 UTC

# Line 14 | Line 14 | class PhEDExDatasvcInfo:
14          self.datasvc_url="https://cmsweb.cern.ch/phedex/datasvc/xml/prod"
15  
16          self.FacOps_savannah = 'https://savannah.cern.ch/support/?func=additem&group=cmscompinfrasup'
17 <        self.stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabHowTo#Stageout_and_publication'
17 >        self.stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCrabFaq#Stageout_and_publication'
18          self.dataPub_faq = 'https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabForPublication'
19  
20          self.usePhedex = True
# Line 119 | Line 119 | class PhEDExDatasvcInfo:
119          #extract the PFN for the given node,LFN,protocol
120          endpoint = self.getStageoutPFN()
121          if ( endpoint[-1] != '/' ) : endpoint = endpoint + '/'
122 +        ### FEDE bug fix 93573
123 +        if ( self.lfn[-1] != '/' ) : self.lfn = self.lfn + '/'
124 +
125 +        if int(self.publish_data) == 1 or  int(self.usenamespace) == 1:
126 +            self.lfn = self.lfn  + '${PSETHASH}/'
127 +            endpoint = endpoint  + '${PSETHASH}/'
128    
129          #extract SE name an SE_PATH (needed for publication)
130          SE, SE_PATH, User = self.splitEndpoint(endpoint)
# Line 186 | Line 192 | class PhEDExDatasvcInfo:
192              primaryDataset = self.computePrimaryDataset()
193              ### added the case lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name, publish=True)
194              ### for the publication in order to be able to check the lfn length  
195 <            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name, publish=True)  + '/${PSETHASH}/'    
195 >            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name, publish=True)
196          elif int(self.usenamespace) == 1:
197              if self.sched in ['CAF']: l_User=True
198              primaryDataset = self.computePrimaryDataset()
199 <            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name)  + '/${PSETHASH}/'    
199 >            lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name)
200          else:
201              if self.sched in ['CAF','LSF']: l_User=True
202              lfn = LFNBase(self.forced_path,self.user_remote_dir)
203  
198        if lfn.find('${PSETHASH}')>1:
199            psethash = runCommand('edmConfigHash < %s| tail -1'%self.pset)
200            lfn = string.replace(lfn,'${PSETHASH}',string.strip(psethash))
204          if ( lfn[-1] != '/' ) : lfn = lfn + '/'
205  
206          return lfn
# Line 292 | Line 295 | class PhEDExDatasvcInfo:
295                  raise CrabException(msg)
296          else:
297              if self.sched in ['CAF','LSF','PBS'] :
298 <                stageoutpfn = self.user_se_path+self.lfn
298 >                if (self.user_se_path[-1]=='/') and (self.lfn[0]=='/'):
299 >                    stageoutpfn = self.user_se_path+(self.lfn).lstrip('/')
300 >                else:            
301 >                    stageoutpfn = self.user_se_path+self.lfn
302              else:
303                  stageoutpfn = 'srm://'+self.node+':'+self.user_port+self.user_se_path+self.lfn
304  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines