Skip to content

Commit

Permalink
python print migration CondCore/ESSources
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlange6 committed Jul 21, 2018
1 parent 509583d commit ce88ca4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CondCore/ESSources/python/GlobalTag.py
@@ -1,3 +1,4 @@
from __future__ import print_function
import sys

from Configuration.AlCa.autoCond import aliases
Expand Down Expand Up @@ -54,7 +55,7 @@ def checkPrefix(self, inputGTParams):
""" Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match
or -1 in case of no match. """
if inputGTParams[0][0].find("_") == -1:
print "Invalid GT name. It does not contain an _, it cannot be used for replacements."
print("Invalid GT name. It does not contain an _, it cannot be used for replacements.")
sys.exit(1)
prefix = inputGTParams[0][0].split("_")[0]
for i in range(0, len(self.gtParams)):
Expand Down
5 changes: 3 additions & 2 deletions CondCore/ESSources/test/python/load_from_globaltag_cfg.py
@@ -1,3 +1,4 @@
from __future__ import print_function
import FWCore.ParameterSet.Config as cms

process = cms.Process("TEST")
Expand Down Expand Up @@ -33,8 +34,8 @@
process.GlobalTag.connect = cms.string(globalTag.connect())
process.GlobalTag.globaltag = globalTag.gt()

print "Final connection string =", process.GlobalTag.connect
print "Final globalTag =", process.GlobalTag.globaltag
print("Final connection string =", process.GlobalTag.connect)
print("Final globalTag =", process.GlobalTag.globaltag)


# process.GlobalTag.connect = cms.string(connectString)
Expand Down
@@ -1,3 +1,4 @@
from __future__ import print_function
import time

import FWCore.ParameterSet.Config as cms
Expand Down Expand Up @@ -161,6 +162,6 @@
process.schedule_().append( process.esout )

for name, module in six.iteritems(process.es_sources_()):
print "ESModules> provider:%s '%s'" % ( name, module.type_() )
print("ESModules> provider:%s '%s'" % ( name, module.type_() ))
for name, module in six.iteritems(process.es_producers_()):
print "ESModules> provider:%s '%s'" % ( name, module.type_() )
print("ESModules> provider:%s '%s'" % ( name, module.type_() ))
@@ -1,3 +1,4 @@
from __future__ import print_function
import time

import FWCore.ParameterSet.Config as cms
Expand Down Expand Up @@ -157,6 +158,6 @@
process.schedule_().append( process.esout )

for name, module in six.iteritems(process.es_sources_()):
print "ESModules> provider:%s '%s'" % ( name, module.type_() )
print("ESModules> provider:%s '%s'" % ( name, module.type_() ))
for name, module in six.iteritems(process.es_producers_()):
print "ESModules> provider:%s '%s'" % ( name, module.type_() )
print("ESModules> provider:%s '%s'" % ( name, module.type_() ))

0 comments on commit ce88ca4

Please sign in to comment.