25 |
|
""" |
26 |
|
|
27 |
|
try: |
28 |
< |
userprocessedData = cfg_params['USER.publish_data_name'] |
28 |
> |
self.userprocessedData = cfg_params['USER.publish_data_name'] |
29 |
|
self.processedData = None |
30 |
|
except KeyError: |
31 |
|
raise CrabException('Cannot publish output data, because you did not specify USER.publish_data_name parameter in the crab.cfg file') |
32 |
|
|
33 |
|
try: |
34 |
< |
if (int(cfg_params['USER.copy_data']) != 1): raise KeyError |
34 |
> |
if (int(cfg_params['USER.copy_data']) != 1): |
35 |
> |
raise KeyError |
36 |
|
except KeyError: |
37 |
< |
raise CrabException('You can not publish data because you did not selected *** copy_data = 1 *** in the crab.cfg file') |
37 |
> |
msg = 'You can not publish data because you did not selected \n' |
38 |
> |
msg += '\t*** copy_data = 1 or publish_data = 1 *** in the crab.cfg file' |
39 |
> |
raise CrabException(msg) |
40 |
|
try: |
41 |
|
self.pset = cfg_params['CMSSW.pset'] |
42 |
|
except KeyError: |
97 |
|
msg += "Source DBS: %s\n" % globalDBS |
98 |
|
msg += "Destination DBS: %s\n" % self.DBSURL |
99 |
|
common.logger.message(msg) |
100 |
+ |
common.logger.write(str(ex)) |
101 |
|
return 1 |
102 |
|
return 0 |
103 |
|
|
147 |
|
#### for production data |
148 |
|
self.processedData = dataset['ProcessedDataset'] |
149 |
|
if (dataset['PrimaryDataset'] == 'null'): |
150 |
< |
dataset['PrimaryDataset'] = dataset['ProcessedDataset'] |
151 |
< |
else: # add parentage from input dataset |
150 |
> |
#dataset['PrimaryDataset'] = dataset['ProcessedDataset'] |
151 |
> |
dataset['PrimaryDataset'] = self.userprocessedData |
152 |
> |
#else: # add parentage from input dataset |
153 |
> |
elif self.datasetpath.upper() != 'NONE': |
154 |
|
dataset['ParentDataset']= self.datasetpath |
155 |
|
|
156 |
|
dataset['PSetContent']=self.content |
202 |
|
# lumi info are now in run hash |
203 |
|
file.runs = {} |
204 |
|
for ds in file.dataset: |
199 |
– |
### FEDE FOR NEW LFN ### |
200 |
– |
#ds['ProcessedDataset']=procdataset |
201 |
– |
######################## |
205 |
|
### Fede for production |
206 |
|
if (ds['PrimaryDataset'] == 'null'): |
207 |
< |
ds['PrimaryDataset']=procdataset |
207 |
> |
#ds['PrimaryDataset']=procdataset |
208 |
> |
ds['PrimaryDataset']=self.userprocessedData |
209 |
|
filestopublish.append(file) |
210 |
|
else: |
211 |
|
self.noEventsFiles.append(file['LFN']) |
235 |
|
good_list=[] |
236 |
|
for fjr in file_list: |
237 |
|
reports = readJobReport(fjr) |
238 |
< |
if reports[0].status == "Success": |
239 |
< |
good_list.append(fjr) |
238 |
> |
if len(reports)>0: |
239 |
> |
if reports[0].status == "Success": |
240 |
> |
good_list.append(fjr) |
241 |
|
file_list=good_list |
242 |
|
## |
243 |
|
common.logger.debug(6, "file_list = "+str(file_list)) |