1 |
|
#!/usr/bin/env python |
2 |
|
import exceptions |
3 |
< |
import DBS2API.dbsApi |
4 |
< |
from DBS2API.dbsApiException import * |
3 |
> |
import DBSAPI.dbsApi |
4 |
> |
from DBSAPI.dbsApiException import * |
5 |
|
import common |
6 |
|
|
7 |
|
|
90 |
|
try: |
91 |
|
dbs_url=self.cfg_params['CMSSW.dbs_url'] |
92 |
|
except KeyError: |
93 |
< |
dbs_url="http://cmsdoc.cern.ch/cms/test/aprom/DBS/CGIServer/prodquery" |
93 |
> |
dbs_url="http://cmsdbsprod.cern.ch/cms_dbs_prod_global/servlet/DBSServlet" |
94 |
> |
|
95 |
> |
## get DBS URL |
96 |
> |
try: |
97 |
> |
dbs_version=self.cfg_params['CMSSW.dbs_version'] |
98 |
> |
except KeyError: |
99 |
> |
dbs_version="v00_00_06" |
100 |
> |
|
101 |
> |
common.logger.debug(3,"Accessing DBS at: "+dbs_url+" with version: "+dbs_version) |
102 |
> |
|
103 |
|
|
104 |
|
## service API |
105 |
|
args = {} |
106 |
< |
args['url']=dbs_url |
106 |
> |
args['url'] = dbs_url |
107 |
> |
args['version'] = dbs_version |
108 |
> |
args['level'] = 'CRITICAL' |
109 |
|
|
110 |
< |
common.logger.debug(3,"Accessing DBS at: "+dbs_url) |
100 |
< |
|
101 |
< |
api = DBS2API.dbsApi.DbsApi(args) |
110 |
> |
api = DBSAPI.dbsApi.DbsApi(args) |
111 |
|
try: |
112 |
|
files = api.listFiles(self.datasetPath) |
113 |
|
except DbsBadRequest, msg: |
114 |
< |
raise DataDiscoveryError(msg) |
114 |
> |
raise DataDiscoveryError_DBS2(msg) |
115 |
|
except DBSError_DBS2, msg: |
116 |
< |
raise DataDiscoveryError(msg) |
116 |
> |
raise DataDiscoveryError_DBS2(msg) |
117 |
|
|
118 |
|
# parse files and fill arrays |
119 |
|
for file in files : |
139 |
|
# total number of events |
140 |
|
self.maxEvents += events |
141 |
|
|
142 |
+ |
for block in self.eventsPerBlock.keys() : |
143 |
+ |
common.logger.debug(6,"DBSInfo: total nevts %i in block %s "%(self.eventsPerBlock[block],block)) |
144 |
+ |
|
145 |
|
if len(self.eventsPerBlock) <= 0: |
146 |
< |
raise NotExistingDatasetError (("\nNo data for %s in DBS\nPlease check" |
146 |
> |
raise NotExistingDatasetError_DBS2 (("\nNo data for %s in DBS\nPlease check" |
147 |
|
+ " dataset path variables in crab.cfg") |
148 |
|
% self.datasetPath) |
149 |
|
|