diff --git a/CondTools/SiPixel/test/README b/CondTools/SiPixel/test/README new file mode 100644 index 0000000000000..6bbe0416642da --- /dev/null +++ b/CondTools/SiPixel/test/README @@ -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 + diff --git a/CondTools/SiPixel/test/SiPixelGenErrorDBObjectReader_cfg.py b/CondTools/SiPixel/test/SiPixelGenErrorDBObjectReader_cfg.py index 64ad9c67ab6b7..a29970a295295 100644 --- a/CondTools/SiPixel/test/SiPixelGenErrorDBObjectReader_cfg.py +++ b/CondTools/SiPixel/test/SiPixelGenErrorDBObjectReader_cfg.py @@ -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 @@ -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 @@ -74,7 +82,7 @@ TestGlobalTag = cms.bool(testGlobalTag) ) -process.myprint = cms.OutputModule("AsciiOutputModule") +#process.myprint = cms.OutputModule("AsciiOutputModule") process.p = cms.Path(process.reader) diff --git a/CondTools/SiPixel/test/SiPixelGenErrorDBObjectUploader_cfg.py b/CondTools/SiPixel/test/SiPixelGenErrorDBObjectUploader_cfg.py index 16aebfbc88780..598a4d4ac1215 100644 --- a/CondTools/SiPixel/test/SiPixelGenErrorDBObjectUploader_cfg.py +++ b/CondTools/SiPixel/test/SiPixelGenErrorDBObjectUploader_cfg.py @@ -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") @@ -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") @@ -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'), @@ -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) )) ) @@ -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 = './'