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 |
|
|
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 |
57 |
|
if self.sched in ['CAF','LSF']:self.protocol = 'direct' |
58 |
|
|
59 |
+ |
self.forced_path = '/store/user/' |
60 |
+ |
if not self.usePhedex: |
61 |
+ |
self.forced_path = self.user_lfn |
62 |
|
return |
63 |
|
|
64 |
|
def getEndpoint(self): |
86 |
|
if self.protocol == 'direct': |
87 |
|
query=endpoint |
88 |
|
SE_PATH = endpoint |
81 |
– |
### FEDE added SE ### |
89 |
|
SE = self.sched |
90 |
|
else: |
91 |
|
url = 'http://'+endpoint.split('://')[1] |
127 |
|
if int(self.publish_data) == 1 or int(self.usenamespace) == 1: |
128 |
|
if self.sched in ['CAF']: l_User=True |
129 |
|
primaryDataset = self.computePrimaryDataset() |
130 |
< |
lfn = LFNBase(primaryDataset,self.publish_data_name,LocalUser=l_User) + '/${PSETHASH}/' |
130 |
> |
lfn = LFNBase(self.forced_path, primaryDataset, self.publish_data_name, LocalUser=l_User) + '/${PSETHASH}/' |
131 |
|
else: |
132 |
|
if self.sched in ['CAF','LSF']: l_User=True |
133 |
< |
lfn = LFNBase(self.user_remote_dir,LocalUser=l_User) |
133 |
> |
lfn = LFNBase(self.forced_path,self.user_remote_dir,LocalUser=l_User) |
134 |
|
return lfn |
135 |
|
|
136 |
|
def computePrimaryDataset(self): |
218 |
|
msg+=' OriginalSubmission: stageout path is not retrieved from %s \n'%fullurl |
219 |
|
raise CrabException(msg) |
220 |
|
else: |
221 |
< |
stageoutpfn = 'srm://'+self.node+':'+self.user_port+self.user_se_path+self.lfn |
221 |
> |
if self.sched in ['CAF','LSF'] : |
222 |
> |
stageoutpfn = self.user_se_path+self.lfn |
223 |
> |
else: |
224 |
> |
stageoutpfn = 'srm://'+self.node+':'+self.user_port+self.user_se_path+self.lfn |
225 |
|
|
226 |
|
return stageoutpfn |
227 |
|
|