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.26.2.1 by fanzago, Wed Sep 16 16:28:24 2009 UTC vs.
Revision 1.29 by spiga, Sat Sep 19 11:11:01 2009 UTC

# Line 7 | Line 7 | from urlparse import urlparse
7   from LFNBaseName import *
8  
9   class PhEDExDatasvcInfo:
10 <    def __init__( self , cfg_params ):
10 >    def __init__( self , cfg_params=None, config=None ):
11  
12          ## PhEDEx Data Service URL
13 <        url="https://cmsweb.cern.ch/phedex/datasvc/xml/prod"
14 <        self.datasvc_url = cfg_params.get("USER.datasvc_url",url)
13 >        self.datasvc_url="https://cmsweb.cern.ch/phedex/datasvc/xml/prod"
14  
15          self.FacOps_savannah = 'https://savannah.cern.ch/support/?func=additem&group=cmscompinfrasup'
16          stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabHowTo#Stageout_and_publication'
17          self.dataPub_faq = 'https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabForPublication'
18  
19 +        self.usePhedex = True
20 +        self.sched = common.scheduler.name().upper()
21 +
22 +        if config!=None:
23 +            self.checkConfig(config)  
24 +        else:
25 +            self.checkCfgConfig(cfg_params)  
26 +
27 +        self.protocol = self.srm_version
28 +
29 +
30 +    def checkConfig(self,config):
31 +        """
32 +        """
33 +        self.srm_version = config.get("srm_version",'srmv2')
34 +        self.node = config.get('storage_element',None)
35 +        self.lfn='/store/'
36 +
37 +    def checkCfgConfig(self,cfg_params):
38 +        """
39 +        """
40 +        self.datasvc_url = cfg_params.get("USER.datasvc_url",self.datasvc_url)
41          self.srm_version = cfg_params.get("USER.srm_version",'srmv2')
42          self.node = cfg_params.get('USER.storage_element',None)
22        
23
43  
25        self.user_lfn = cfg_params.get("USER.lfn",'')
44          self.publish_data = cfg_params.get("USER.publish_data",0)
45          self.usenamespace = cfg_params.get("USER.usenamespace",0)
46          self.user_remote_dir = cfg_params.get("USER.user_remote_dir",'')
47          if self.user_remote_dir:
48              if ( self.user_remote_dir[-1] != '/' ) : self.user_remote_dir = self.user_remote_dir + '/'
31        if self.user_lfn:    
32            msg  = 'Warning: lfn has been deprecated, CRAB will ignore it.\n'
33            msg += '\t Please use only user_remote_dir removing lfn from your crab.cfg\n'
34            msg += '\t For further information please visit : \n\t%s'%stage_out_faq
35            common.logger.info(msg)
49            
50          self.datasetpath = cfg_params.get("CMSSW.datasetpath")
51          self.publish_data_name = cfg_params.get('USER.publish_data_name','')
# Line 43 | Line 56 | class PhEDExDatasvcInfo:
56              if ( self.user_se_path[-1] != '/' ) : self.user_se_path = self.user_se_path + '/'
57                                                      
58          #check if using "private" Storage
46        self.usePhedex = True
59          if not self.node :
60              msg = 'Please specify the storage_element name in your crab.cfg section [USER].\n'
61              msg +='\tFor further information please visit : %s'%stage_out_faq
# Line 55 | Line 67 | class PhEDExDatasvcInfo:
67              msg += '\t must specify both user_remote_dir and storage_path in the crab.cfg section [USER].\n '
68              msg += '\t For further information please visit : \n\t%s'%stage_out_faq
69              raise CrabException(msg)
58        self.sched = common.scheduler.name().upper()
59        self.protocol = self.srm_version
70  
71          self.forced_path = '/store/user/'
72          if self.sched in ['CAF','LSF']:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines