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.6 by afanfani, Wed Oct 1 18:28:28 2008 UTC vs.
Revision 1.11 by spiga, Wed Oct 15 13:11:05 2008 UTC

# Line 22 | Line 22 | class PhEDExDatasvcInfo:
22          
23          self.publish_data = cfg_params.get("USER.publish_data",0)
24          self.usenamespace = cfg_params.get("USER.usenamespace",0)
25 <        self.user_remote_dir = cfg_params.get("USER.remote_dir",'')
25 >        self.user_remote_dir = cfg_params.get("USER.user_remote_dir",'')
26 >        if self.user_remote_dir:
27 >            if ( self.user_remote_dir[-1] != '/' ) : self.user_remote_dir = self.user_remote_dir + '/'
28 >            
29          self.datasetpath = cfg_params.get("CMSSW.datasetpath")
30          self.publish_data_name = cfg_params.get('USER.publish_data_name','')
31  
32          self.user_lfn = cfg_params.get("USER.lfn",'')
33 +        if self.user_lfn:
34 +            if ( self.user_lfn[-1] != '/' ) : self.user_lfn = self.user_lfn + '/'
35 +            
36 +        self.user_port = cfg_params.get("USER.storage_port",'8443')
37          self.user_se_path = cfg_params.get("USER.storage_path",'')
38 +        if self.user_se_path:
39 +            if ( self.user_se_path[-1] != '/' ) : self.user_se_path = self.user_se_path + '/'
40 +                                                    
41        
42          #check if using "private" Storage
43          self.usePhedex = True
44 +        stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabFaq#How_to_store_output_with_CRAB_2'
45 +        if not self.node :
46 +            msg = 'Please specify the storage_element name in your crab.cfg section [USER].\n'
47 +            msg +='      For further information please visit : %s'%stage_out_faq
48 +            raise CrabException(msg)
49          if (self.node.find('T1_') + self.node.find('T2_')+self.node.find('T3_')) == -3: self.usePhedex = False
50          if not self.usePhedex and ( self.user_lfn == '' or self.user_se_path == '' ):
51              msg = 'You are asking to stage out without using CMS Storage Name convention. In this case you \n'
52              msg += '      must specify both lfn and storage_path in the crab.cfg section [USER].\n '
53 <            msg += '      For further information please visit: ADD_TWIKI_LINK'
53 >            msg += '      For further information please visit : %s'%stage_out_faq
54              raise CrabException(msg)
55          self.sched = common.scheduler.name().upper()
56          self.protocol = self.srm_version
# Line 68 | Line 83 | class PhEDExDatasvcInfo:
83              if self.protocol == 'direct':
84                  query=endpoint
85                  SE_PATH = endpoint
86 +                ### FEDE added SE ###
87 +                SE = self.sched
88              else:
89                  url = 'http://'+endpoint.split('://')[1]
90                  # python > 2.4
# Line 199 | Line 216 | class PhEDExDatasvcInfo:
216                  msg+='       OriginalSubmission: stageout path is not retrieved from %s \n'%fullurl
217                  raise CrabException(msg)
218          else:
219 <            stageoutpfn = 'srm://'+self.node+':8443'+self.user_se_path+self.lfn
219 >            if self.sched in ['CAF','LSF'] :
220 >                stageoutpfn = self.user_port+self.user_se_path+self.lfn
221 >            else:
222 >                stageoutpfn = 'srm://'+self.node+':'+self.user_port+self.user_se_path+self.lfn
223  
224          return stageoutpfn
225  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines