Skip to content

Commit

Permalink
Merge pull request cms-sw#3653 from hidaspal/SiPixelGenErrorDBObjectR…
Browse files Browse the repository at this point in the history
…eader_small_changes_on_2014-05-02-0200

DB -- Si pixel gen error db object reader small changes on 2014 05 02 0200
  • Loading branch information
ktf committed May 4, 2014
2 parents ed3ecc2 + a794819 commit c103e6a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 19 deletions.
11 changes: 11 additions & 0 deletions CondTools/SiPixel/test/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

Some data files are found in the external area, see CMSSW_SEARCH_PATH for its location.
The files are visible in the search path (CMSSW_SEARCH_PATH) assuming
all the files are accessed with FileInPath, instead of direct filesystem calls.

These files can be found under the same path, as they would be under the usual software area.

Examples:

CalibTracker/SiPixelESProducers/data is the location of template and generror data

24 changes: 16 additions & 8 deletions CondTools/SiPixel/test/SiPixelGenErrorDBObjectReader_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
process = cms.Process("SiPixelGenErrorDBReaderTest")
process.load("CondCore.DBCommon.CondDBSetup_cfi")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.load("CalibTracker.SiPixelESProducers.SiPixelGenErrorDBObjectESProducer_cfi")
#process.load("CalibTracker.SiPixelESProducers.SiPixelGenErrorDBObjectESProducer_cfi")

magfield = float(sys.argv[2])
#version = "v3"
version = sys.argv[3]
#magfield and version are argument #1 and #2
#magfield = float(sys.argv[2])
#version = sys.argv[3]

#magfield and version are hardcoded for the record
magfield = 38
version = "v1"

## Change to False if you do not want to test the global tag
testGlobalTag = False
Expand Down Expand Up @@ -60,9 +64,13 @@
record = cms.string('SiPixelGenErrorDBObjectRcd'),
tag = cms.string('SiPixelGenErrorDBObject' + magfieldString + version)
)),
timetype = cms.string('runnumber'),
connect = cms.string('sqlite_file:siPixelGenErrors' + magfieldString + '.db')
)
timetype = cms.string('runnumber'),
#when arguments used
connect = cms.string('sqlite_file:siPixelGenErrors' + magfieldString + version + '.db')
#when parameters hardcoded
#connect = cms.string('sqlite_file:siPixelGenErrors38Tv1.db')
#connect = cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERCALIB/Pixels/PixelDB2014/SiPixelGenErrorDBObject/SiPixelGenErrorDBObject_710pre7/builder/siPixelGenErrors38T.db')
)
process.PoolDBESSource.DBParameters.authenticationPath='.'
process.PoolDBESSource.DBParameters.messageLevel=0

Expand All @@ -74,7 +82,7 @@
TestGlobalTag = cms.bool(testGlobalTag)
)

process.myprint = cms.OutputModule("AsciiOutputModule")
#process.myprint = cms.OutputModule("AsciiOutputModule")

process.p = cms.Path(process.reader)

Expand Down
22 changes: 11 additions & 11 deletions CondTools/SiPixel/test/SiPixelGenErrorDBObjectUploader_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
version = sys.argv[3]

if ( MagFieldValue==0 ):
MagFieldString = '0'
MagFieldString = '0T'
files_to_upload = cms.vstring(
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0022.out",
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0023.out")
theDetIds = cms.vuint32( 1, 2) # 0 is for all, 1 is Barrel, 2 is EndCap theGenErrorIds = cms.vuint32(22,23)
elif ( MagFieldValue==4 or MagFieldValue==40 ):
MagFieldString = '4'
MagFieldString = '4T'
files_to_upload = cms.vstring(
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0018.out",
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0019.out")
theDetIds = cms.vuint32( 1, 2)
theGenErrorIds = cms.vuint32(18,19)
elif ( MagFieldValue==3.8 or MagFieldValue==38 ):
MagFieldString = '38'
MagFieldString = '38T'
files_to_upload = cms.vstring(
# "CalibTracker/SiPixelESProducers/data/generror_summary_zp0020.out",
# "CalibTracker/SiPixelESProducers/data/generror_summary_zp0021.out")
Expand All @@ -40,21 +40,21 @@
theDetIds = cms.vuint32( 1, 2)
theGenErrorIds = cms.vuint32(30,31)
elif ( MagFieldValue==2 or MagFieldValue==20 ):
MagFieldString = '2'
MagFieldString = '2T'
files_to_upload = cms.vstring(
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0030.out",
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0031.out")
theDetIds = cms.vuint32( 1, 2)
theGenErrorIds = cms.vuint32(30,31)
elif ( MagFieldValue==3 or MagFieldValue==30 ):
MagFieldString = '3'
MagFieldString = '3T'
files_to_upload = cms.vstring(
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0032.out",
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0033.out")
theDetIds = cms.vuint32( 1, 2)
theGenErrorIds = cms.vuint32(32,33)
elif( MagFieldValue==3.5 or MagFieldValue==35 ):
MagFieldString = '35'
MagFieldString = '35T'
files_to_upload = cms.vstring(
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0034.out",
"CalibTracker/SiPixelESProducers/data/generror_summary_zp0035.out")
Expand All @@ -63,10 +63,10 @@



generror_base = 'SiPixelGenErrorDBObject' + MagFieldString + 'T'
generror_base = 'SiPixelGenErrorDBObject' + MagFieldString + version
#theGenErrorBaseString = cms.string(generic_base)

print '\nUploading %s%s with record SiPixelGenErrorDBObjectRcd in file siPixelGenErrors%sT.db\n' % (generror_base,version,MagFieldString)
print '\nUploading %s with record SiPixelGenErrorDBObjectRcd in file siPixelGenErrors%s%s.db\n' % (generror_base,MagFieldString,version)

process.source = cms.Source("EmptyIOVSource",
timetype = cms.string('runnumber'),
Expand All @@ -85,10 +85,10 @@
authenticationPath = cms.untracked.string('.')
),
timetype = cms.untracked.string('runnumber'),
connect = cms.string('sqlite_file:siPixelGenErrors' + MagFieldString + 'T.db'),
connect = cms.string('sqlite_file:siPixelGenErrors' + MagFieldString + version + '.db'),
toPut = cms.VPSet(cms.PSet(
record = cms.string('SiPixelGenErrorDBObjectRcd'),
tag = cms.string(generror_base + version)
tag = cms.string(generror_base)
))
)

Expand All @@ -105,6 +105,6 @@
process.myprint = cms.OutputModule("AsciiOutputModule")

process.p = cms.Path(process.uploader)
process.CondDBCommon.connect = 'sqlite_file:siPixelGenErrors' + MagFieldString + 'T.db'
process.CondDBCommon.connect = 'sqlite_file:siPixelGenErrors' + MagFieldString + '.db'
process.CondDBCommon.DBParameters.messageLevel = 0
process.CondDBCommon.DBParameters.authenticationPath = './'

0 comments on commit c103e6a

Please sign in to comment.