Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:21

0001 import FWCore.ParameterSet.Config as cms
0002 import os
0003 
0004 process = cms.Process("summary")
0005 
0006 import FWCore.ParameterSet.VarParsing as VarParsing
0007 options = VarParsing.VarParsing()
0008 options.register('outputDB',
0009                  'sqlite_file:SiPixelStatusScenarios_2017StuckTBM.db', #default value
0010                  VarParsing.VarParsing.multiplicity.singleton,
0011                  VarParsing.VarParsing.varType.string,
0012                  "output conditions DB")
0013 options.register('outputTag',
0014                  'SiPixelFEDChannelContainer_StuckTBM_2017_v1_mc', #default value
0015                  VarParsing.VarParsing.multiplicity.singleton,
0016                  VarParsing.VarParsing.varType.string,
0017                  "output conditions tag")
0018 options.register('inputTag',
0019                  'SiPixelQualityOffline_2017_threshold1percent_stuckTBM', #default value
0020                  VarParsing.VarParsing.multiplicity.singleton,
0021                  VarParsing.VarParsing.varType.string,
0022                  "input conditions tag")
0023 options.register('firstIOV',
0024                  1318907147190984, #default value
0025                  VarParsing.VarParsing.multiplicity.singleton,
0026                  VarParsing.VarParsing.varType.int,
0027                  "first IOV")
0028 options.register('lastIOV',
0029                  1318907147190984, #default value
0030                  VarParsing.VarParsing.multiplicity.singleton,
0031                  VarParsing.VarParsing.varType.int,
0032                  "last IOV")
0033 options.parseArguments()
0034 
0035 ##
0036 ## MessageLogger
0037 ##
0038 process.load('FWCore.MessageService.MessageLogger_cfi')   
0039 process.MessageLogger.cout.enable = True
0040 process.MessageLogger.FastSiPixelFEDChannelContainerFromQuality=dict()  
0041 process.MessageLogger.SiPixelFEDChannelContainer=dict()  
0042 process.MessageLogger.cout = cms.untracked.PSet(
0043     threshold = cms.untracked.string("INFO"),
0044     enableStatistics = cms.untracked.bool(True),
0045     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),                       
0046     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0047                                    reportEvery = cms.untracked.int32(1000)
0048                                    ),                                                      
0049     FastSiPixelFEDChannelContainerFromQuality = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0050     SiPixelFEDChannelContainer           = cms.untracked.PSet( limit = cms.untracked.int32(-1))
0051     )
0052   
0053 ##
0054 ## Empty Source
0055 ##                                      
0056 process.source = cms.Source("EmptySource",
0057     numberEventsInRun = cms.untracked.uint32(1),
0058     firstRun = cms.untracked.uint32(1)
0059 )
0060 
0061 process.maxEvents = cms.untracked.PSet(
0062     input = cms.untracked.int32(1)
0063 )
0064 
0065 ##
0066 ## Output database (in this case local sqlite file)
0067 ##
0068 process.load("CondCore.CondDB.CondDB_cfi")
0069 process.CondDB.connect = options.outputDB
0070 #process.CondDB.connect = 'sqlite_file:SiPixelStatusScenarios_2017StuckTBM.db'
0071 #process.CondDB.connect = 'sqlite_file:SiPixelStatusScenarios_2017Prompt.db'
0072 #process.CondDB.connect = 'sqlite_file:SiPixelStatusScenarios_2017Other.db'
0073 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0074                                           process.CondDB,
0075                                           timetype = cms.untracked.string('runnumber'),
0076                                           toPut = cms.VPSet(cms.PSet(record = cms.string('SiPixelStatusScenariosRcd'),
0077                                                                      tag = cms.string(options.outputTag)
0078                                                                      #tag = cms.string('SiPixelFEDChannelContainer_StuckTBM_2017_v1_mc')
0079                                                                      #tag = cms.string('SiPixelFEDChannelContainer_Prompt_2017_v1_mc')
0080                                                                      #tag = cms.string('SiPixelFEDChannelContainer_Other_2017_v1_mc')
0081                                                                      )
0082                                                             )
0083                                           )
0084 
0085 ##
0086 ## Configuration of the module
0087 ##
0088 
0089 print("Processing %s from %s to %s " % (options.inputTag,options.firstIOV,options.lastIOV) )
0090 
0091 process.load("CondTools.SiPixel.FastSiPixelFEDChannelContainerFromQuality_cfi")
0092 process.FastSiPixelFEDChannelContainerFromQuality.qualityTagName  = options.inputTag
0093 process.FastSiPixelFEDChannelContainerFromQuality.startIOV = options.firstIOV
0094 process.FastSiPixelFEDChannelContainerFromQuality.endIOV   = options.lastIOV
0095 process.FastSiPixelFEDChannelContainerFromQuality.output   = "summary_StuckTBM_test.txt"
0096 
0097 #process.FastSiPixelFEDChannelContainerFromQuality.qualityTagName  = "SiPixelQualityOffline_2017_threshold1percent_stuckTBM"
0098 #process.FastSiPixelFEDChannelContainerFromQuality.startIOV = 1268368267018245
0099 #process.FastSiPixelFEDChannelContainerFromQuality.endIOV   = 1318907147191631
0100 #process.FastSiPixelFEDChannelContainerFromQuality.output   = "summary2017_StuckTBM.txt"
0101 
0102 #process.FastSiPixelFEDChannelContainerFromQuality.qualityTagName  = "SiPixelQualityOffline_2017_threshold1percent_prompt"
0103 #process.FastSiPixelFEDChannelContainerFromQuality.startIOV = 1268368267018245
0104 #process.FastSiPixelFEDChannelContainerFromQuality.endIOV   = 1318907147191657
0105 #process.FastSiPixelFEDChannelContainerFromQuality.output   = "summary2017_Prompt.txt"
0106 
0107 #process.FastSiPixelFEDChannelContainerFromQuality.qualityTagName  = "SiPixelQualityOffline_2017_threshold1percent_other"
0108 #process.FastSiPixelFEDChannelContainerFromQuality.startIOV = 1268368267018245
0109 #process.FastSiPixelFEDChannelContainerFromQuality.endIOV   = 1318907147191657
0110 #process.FastSiPixelFEDChannelContainerFromQuality.output   = "summary2017_Other.txt"
0111 
0112 process.p = cms.Path(process.FastSiPixelFEDChannelContainerFromQuality)