Skip to content

Commit 8b13632

Browse files
committed
Merge remote branch 'origin/CMSSW_7_0_X' into CMSSW_7_0_X
2 parents c9d84f8 + 70402a6 commit 8b13632

File tree

4 files changed

+93
-107
lines changed

4 files changed

+93
-107
lines changed

PhysicsTools/PatAlgos/python/patInputFiles_cff.py

+38-47
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,52 @@
33

44
# /RelValProdTTbar/CMSSW_7_0_0_pre11-START70_V4-v1/AODSIM
55
filesRelValProdTTbarAODSIM = cms.untracked.vstring(
6-
pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
7-
, relVal = 'RelValProdTTbar'
8-
, globalTag = 'START70_V4'
9-
, dataTier = 'AODSIM'
10-
, maxVersions = 2
11-
, numberOfFiles = 1
12-
)
6+
#pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
7+
#, relVal = 'RelValProdTTbar'
8+
#, globalTag = 'START70_V4'
9+
#, dataTier = 'AODSIM'
10+
#, maxVersions = 1
11+
#, numberOfFiles = 1
12+
#, useDAS = True
13+
#)
14+
'/store/relval/CMSSW_7_0_0_pre11/RelValProdTTbar/AODSIM/START70_V4-v1/00000/D0516C65-766A-E311-B744-00259059642E.root'
1315
)
1416

15-
filesRelValProdTTbarAODSIM = cms.untracked.vstring(
16-
'/store/relval/CMSSW_7_0_0_pre11/RelValProdTTbar/AODSIM/START70_V4-v1/00000/D0516C65-766A-E311-B744-00259059642E.root'
17-
)
18-
19-
# /RelValProdTTbar/CMSSW_7_0_0_pre8-START70_V1-v1/GEN-SIM-RECO
17+
# /RelValProdTTbar/CMSSW_7_0_0_pre11-START70_V4-v1/GEN-SIM-RECO
2018
filesRelValProdTTbarGENSIMRECO = cms.untracked.vstring(
21-
pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
22-
, relVal = 'RelValProdTTbar'
23-
, globalTag = 'START70_V4'
24-
, dataTier = 'GEN-SIM-RECO'
25-
, maxVersions = 2
26-
, numberOfFiles = 1
27-
)
19+
#pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
20+
#, relVal = 'RelValProdTTbar'
21+
#, globalTag = 'START70_V4'
22+
#, dataTier = 'GEN-SIM-RECO'
23+
#, maxVersions = 1
24+
#, numberOfFiles = 1
25+
#, useDAS = True
26+
#)
27+
'/store/relval/CMSSW_7_0_0_pre11/RelValProdTTbar/GEN-SIM-RECO/START70_V4-v1/00000/0EA82C3C-646A-E311-9CB3-0025905A6070.root'
2828
)
2929

30-
# /RelValTTbar/CMSSW_7_0_0_pre8-PU_START70_V1-v1/GEN-SIM-RECO
30+
# /RelValTTbar_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5-v1/GEN-SIM-RECO
3131
filesRelValTTbarPileUpGENSIMRECO = cms.untracked.vstring(
32-
pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
33-
, relVal = 'RelValTTbar_13'
34-
, globalTag = 'PU50ns_POSTLS162_V5'
35-
, dataTier = 'GEN-SIM-RECO'
36-
, maxVersions = 1
37-
, numberOfFiles = 1
38-
)
32+
#pickRelValInputFiles( cmsswVersion = 'CMSSW_7_0_0_pre11'
33+
#, relVal = 'RelValTTbar_13'
34+
#, globalTag = 'PU50ns_POSTLS162_V5'
35+
#, dataTier = 'GEN-SIM-RECO'
36+
#, maxVersions = 1
37+
#, numberOfFiles = 1
38+
#, useDAS = True
39+
#)
40+
'/store/relval/CMSSW_7_0_0_pre11/RelValTTbar_13/GEN-SIM-RECO/PU50ns_POSTLS162_V5-v1/00000/08DFDC0E-796A-E311-8912-5404A63886EC.root'
3941
)
4042

4143
# /SingleMu/CMSSW_6_2_0_pre8-PRE_62_V8_RelVal_mu2012D-v1/RECO
4244
filesSingleMuRECO = cms.untracked.vstring(
43-
pickRelValInputFiles( cmsswVersion = 'CMSSW_6_2_0_pre8' # no 70X data RelVals at CERN
44-
, relVal = 'SingleMu'
45-
, dataTier = 'RECO'
46-
, globalTag = 'PRE_62_V8_RelVal_mu2012D'
47-
, maxVersions = 1
48-
, numberOfFiles = 1
49-
)
50-
# only one block available at CERN
51-
# FIXME: need to fix DBS query in 'pickRelValInputFiles' to identify them properly
52-
# ==> query for file requiring dataset AND site does not work in DBS :-(
53-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/029F8FA5-D7E0-E211-BCCF-001E67398430.root',
54-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/1A9A0FE7-D5E0-E211-9868-003048F01164.root',
55-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/4E0F44F0-D5E0-E211-9A0A-003048CF6780.root',
56-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/6E43C4C0-DBE0-E211-B452-003048D37366.root',
57-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/A426EC8A-DAE0-E211-BE58-D8D385FF4A94.root',
58-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/A45F6ADF-D8E0-E211-948B-003048FE9D54.root',
59-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/CE1D92A1-D9E0-E211-B7F0-C860001BD934.root',
60-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/D61C12DD-E9E0-E211-8A9E-5404A63886D2.root',
61-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/E4F44285-DFE0-E211-BEA9-0025B3203918.root',
62-
#'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012B-v1/00000/F848CDC3-D6E0-E211-BA88-003048F009C4.root'
45+
#pickRelValInputFiles( cmsswVersion = 'CMSSW_6_2_0_pre8' # no 70X data RelVals at CERN
46+
#, relVal = 'SingleMu'
47+
#, dataTier = 'RECO'
48+
#, globalTag = 'PRE_62_V8_RelVal_mu2012D'
49+
#, maxVersions = 1
50+
#, numberOfFiles = 1
51+
#, useDAS = True
52+
#)
53+
'/store/relval/CMSSW_6_2_0_pre8/SingleMu/RECO/PRE_62_V8_RelVal_mu2012D-v1/00000/005835E9-05E0-E211-BA7B-003048F1C7C0.root'
6354
)

PhysicsTools/PatAlgos/python/tools/cmsswVersionTools.py

+53-58
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,12 @@ def apply( self ):
268268
print '%s DEBUG: Querying dataset \'%s\' with'%( self._label, dataset )
269269
print ' \'%s\''%( dasQuery )
270270
# partially stolen from das_client.py for option '--format=plain', needs filter ("grep") in the query
271-
dasData = das_client.get_data( 'https://cmsweb.cern.ch', dasQuery, 0, dasLimit, False )
272-
jsondict = json.loads( dasData )
271+
jsondict = das_client.get_data( 'https://cmsweb.cern.ch', dasQuery, 0, dasLimit, False )
273272
if debug:
274-
print '%s DEBUG: Received DAS data:'%( self._label )
275-
print ' \'%s\''%( dasData )
276-
print '%s DEBUG: Determined JSON dictionary:'%( self._label )
273+
print '%s DEBUG: Received DAS JSON dictionary:'%( self._label )
277274
print ' \'%s\''%( jsondict )
278275
if jsondict[ 'status' ] != 'ok':
279-
print 'There was a problem while querying DAS with query \'%s\'. Server reply was:\n %s' % (dasQuery, dasData)
276+
print 'There was a problem while querying DAS with query \'%s\'. Server reply was:\n %s' % (dasQuery, jsondict)
280277
exit( 1 )
281278
mongo_query = jsondict[ 'mongo_query' ]
282279
filters = mongo_query[ 'filters' ]
@@ -289,20 +286,17 @@ def apply( self ):
289286
print '%s DEBUG: Data in JSON dictionary:'%( self._label )
290287
print ' \'%s\''%( data )
291288
for row in data:
292-
filePath = [ r for r in das_client.get_value( row, filters ) ][ 0 ]
289+
filePath = [ r for r in das_client.get_value( row, filters[ 'grep' ] ) ][ 0 ]
293290
if debug:
294291
print '%s DEBUG: Testing file entry \'%s\''%( self._label, filePath )
295292
if len( filePath ) > 0:
296293
if validVersion != version:
297-
dasTest = das_client.get_data( 'https://cmsweb.cern.ch', 'site dataset=%s | grep site.name'%( dataset ), 0, 999, False )
298-
jsontestdict = json.loads( dasTest )
294+
jsontestdict = das_client.get_data( 'https://cmsweb.cern.ch', 'site dataset=%s | grep site.name'%( dataset ), 0, 999, False )
299295
mongo_testquery = jsontestdict[ 'mongo_query' ]
300296
testfilters = mongo_testquery[ 'filters' ]
301297
testdata = jsontestdict[ 'data' ]
302298
if debug:
303-
print '%s DEBUG: Received DAS data (site test):'%( self._label )
304-
print ' \'%s\''%( dasTest )
305-
print '%s DEBUG: Determined JSON dictionary (site test):'%( self._label )
299+
print '%s DEBUG: Received DAS JSON dictionary (site test):'%( self._label )
306300
print ' \'%s\''%( jsontestdict )
307301
print '%s DEBUG: Query in JSON dictionary (site test):'%( self._label )
308302
print ' \'%s\''%( mongo_testquery )
@@ -312,7 +306,7 @@ def apply( self ):
312306
print ' \'%s\''%( testdata )
313307
foundSE = False
314308
for testrow in testdata:
315-
siteName = [ tr for tr in das_client.get_value( testrow, testfilters ) ][ 0 ]
309+
siteName = [ tr for tr in das_client.get_value( testrow, testfilters[ 'grep' ] ) ][ 0 ]
316310
if siteName == domainSE:
317311
foundSE = True
318312
break
@@ -343,57 +337,58 @@ def apply( self ):
343337
else:
344338
if debug:
345339
print '%s DEBUG: Using DBS query'%( self._label )
346-
for version in range( maxVersions, 0, -1 ):
347-
filePaths = []
348-
fileCount = 0
349-
dataset = '/%s/%s-%s-v%i/%s'%( relVal, cmsswVersion, globalTag, version, dataTier )
350-
dbsQuery = 'find file where dataset = %s'%( dataset )
351-
if debug:
352-
print '%s DEBUG: Querying dataset \'%s\' with'%( self._label, dataset )
353-
print ' \'%s\''%( dbsQuery )
354-
foundSE = False
355-
for line in os.popen( 'dbs search --query="%s"'%( dbsQuery ) ):
356-
if line.find( '.root' ) != -1:
357-
if validVersion != version:
358-
if not foundSE:
359-
dbsSiteQuery = 'find dataset where dataset = %s and site = %s'%( dataset, domainSE )
360-
if debug:
361-
print '%s DEBUG: Querying site \'%s\' with'%( self._label, domainSE )
362-
print ' \'%s\''%( dbsSiteQuery )
363-
for lineSite in os.popen( 'dbs search --query="%s"'%( dbsSiteQuery ) ):
364-
if lineSite.find( dataset ) != -1:
365-
foundSE = True
366-
break
367-
if not foundSE:
368-
if debug:
369-
print '%s DEBUG: Possible version \'v%s\' not available on SE \'%s\''%( self._label, version, domainSE )
370-
break
371-
validVersion = version
372-
if debug:
373-
print '%s DEBUG: Valid version set to \'v%i\''%( self._label, validVersion )
374-
if numberOfFiles == 0:
375-
break
376-
filePath = line.replace( '\n', '' )
377-
if debug:
378-
print '%s DEBUG: File \'%s\' found'%( self._label, filePath )
379-
fileCount += 1
380-
if fileCount > skipFiles:
381-
filePaths.append( filePath )
382-
if not numberOfFiles < 0:
383-
if numberOfFiles <= len( filePaths ):
384-
break
385-
if validVersion > 0:
386-
if numberOfFiles == 0 and debug:
387-
print '%s DEBUG: No files requested'%( self._label )
388-
break
340+
print '%s WARNING: DBS query disabled for DBS3 transition to new API'%( self._label )
341+
#for version in range( maxVersions, 0, -1 ):
342+
#filePaths = []
343+
#fileCount = 0
344+
#dataset = '/%s/%s-%s-v%i/%s'%( relVal, cmsswVersion, globalTag, version, dataTier )
345+
#dbsQuery = 'find file where dataset = %s'%( dataset )
346+
#if debug:
347+
#print '%s DEBUG: Querying dataset \'%s\' with'%( self._label, dataset )
348+
#print ' \'%s\''%( dbsQuery )
349+
#foundSE = False
350+
#for line in os.popen( 'dbs search --query="%s"'%( dbsQuery ) ).readlines():
351+
#if line.find( '.root' ) != -1:
352+
#if validVersion != version:
353+
#if not foundSE:
354+
#dbsSiteQuery = 'find dataset where dataset = %s and site = %s'%( dataset, domainSE )
355+
#if debug:
356+
#print '%s DEBUG: Querying site \'%s\' with'%( self._label, domainSE )
357+
#print ' \'%s\''%( dbsSiteQuery )
358+
#for lineSite in os.popen( 'dbs search --query="%s"'%( dbsSiteQuery ) ).readlines():
359+
#if lineSite.find( dataset ) != -1:
360+
#foundSE = True
361+
#break
362+
#if not foundSE:
363+
#if debug:
364+
#print '%s DEBUG: Possible version \'v%s\' not available on SE \'%s\''%( self._label, version, domainSE )
365+
#break
366+
#validVersion = version
367+
#if debug:
368+
#print '%s DEBUG: Valid version set to \'v%i\''%( self._label, validVersion )
369+
#if numberOfFiles == 0:
370+
#break
371+
#filePath = line.replace( '\n', '' )
372+
#if debug:
373+
#print '%s DEBUG: File \'%s\' found'%( self._label, filePath )
374+
#fileCount += 1
375+
#if fileCount > skipFiles:
376+
#filePaths.append( filePath )
377+
#if not numberOfFiles < 0:
378+
#if numberOfFiles <= len( filePaths ):
379+
#break
380+
#if validVersion > 0:
381+
#if numberOfFiles == 0 and debug:
382+
#print '%s DEBUG: No files requested'%( self._label )
383+
#break
389384

390385
# Check output and return
391386
if validVersion == 0:
392-
print '%s INFO : No RelVal file(s) found at all in datasets \'%s*\' on SE \'%s\''%( self._label, datasetAll, domainSE )
387+
print '%s WARNING : No RelVal file(s) found at all in datasets \'%s*\' on SE \'%s\''%( self._label, datasetAll, domainSE )
393388
if debug:
394389
self.messageEmptyList()
395390
elif len( filePaths ) == 0:
396-
print '%s INFO : No RelVal file(s) picked up in dataset \'%s\''%( self._label, dataset )
391+
print '%s WARNING : No RelVal file(s) picked up in dataset \'%s\''%( self._label, dataset )
397392
if debug:
398393
self.messageEmptyList()
399394
elif len( filePaths ) < numberOfFiles:

RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstMuonMVA.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class PFRecoTauDiscriminationAgainstMuonMVA : public PFTauDiscriminationProducer
8888
~PFRecoTauDiscriminationAgainstMuonMVA()
8989
{
9090
delete mvaReader_;
91-
delete mvaInput_;
91+
delete[] mvaInput_;
9292
for ( std::vector<TFile*>::iterator it = inputFilesToDelete_.begin();
9393
it != inputFilesToDelete_.end(); ++it ) {
9494
delete (*it);

RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce
9999
~PFRecoTauDiscriminationByIsolationMVA2()
100100
{
101101
delete mvaReader_;
102-
delete mvaInput_;
102+
delete[] mvaInput_;
103103
for ( std::vector<TFile*>::iterator it = inputFilesToDelete_.begin();
104104
it != inputFilesToDelete_.end(); ++it ) {
105105
delete (*it);

0 commit comments

Comments
 (0)