Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-02 22:41:56

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 options = VarParsing.VarParsing('analysis')
0005 
0006 options.register ('input', # input text file with encoded weight groups                             
0007                 'EcalTPGOddWeightGroup.txt', 
0008                 VarParsing.VarParsing.multiplicity.singleton, 
0009                 VarParsing.VarParsing.varType.string,          
0010                 "input")           
0011 options.register ('output', # output file with SQLite format                              
0012                 'EcalTPGOddWeightGroup.db', 
0013                 VarParsing.VarParsing.multiplicity.singleton, 
0014                 VarParsing.VarParsing.varType.string,          
0015                 "output")
0016 options.register ('filetype', # input file format txt/xml                              
0017                 'txt', 
0018                 VarParsing.VarParsing.multiplicity.singleton, 
0019                 VarParsing.VarParsing.varType.string,          
0020                 "filetype")
0021 options.register('outputtag',
0022                  'EcalTPGOddWeightGroup',
0023                  VarParsing.VarParsing.multiplicity.singleton,
0024                  VarParsing.VarParsing.varType.string,
0025                  "outputtag")
0026 options.parseArguments()
0027 
0028 
0029 process = cms.Process("ProcessOne")
0030 
0031 process.MessageLogger = cms.Service("MessageLogger",
0032     cerr = cms.untracked.PSet(
0033         enable = cms.untracked.bool(False)
0034     ),
0035     cout = cms.untracked.PSet(
0036         enable = cms.untracked.bool(True),
0037         threshold = cms.untracked.string('DEBUG')
0038     ),
0039     debugModules = cms.untracked.vstring('*')
0040 )
0041 
0042 process.source = cms.Source("EmptyIOVSource",
0043     lastValue = cms.uint64(100000000000),
0044     timetype = cms.string('runnumber'),
0045     firstValue = cms.uint64(100000000000),
0046     interval = cms.uint64(1)
0047 )
0048 
0049 process.load("CondCore.CondDB.CondDB_cfi")
0050 
0051 process.CondDB.connect = 'sqlite_file:%s'%(options.output)
0052 
0053 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0054   process.CondDB, 
0055   logconnect = cms.untracked.string('sqlite_file:log.db'),   
0056   toPut = cms.VPSet(
0057     cms.PSet(
0058       record = cms.string('EcalTPGOddWeightGroupRcd'),
0059       tag = cms.string(options.outputtag)
0060     )
0061   )
0062 )
0063 
0064 process.Test1 = cms.EDAnalyzer("ExTestEcalTPGOddWeightGroupAnalyzer",
0065   record = cms.string('EcalTPGOddWeightGroupRcd'),
0066   loggingOn= cms.untracked.bool(True),
0067   IsDestDbCheckedInQueryLog=cms.untracked.bool(True),
0068   SinceAppendMode=cms.bool(True),
0069   Source=cms.PSet(
0070     firstRun = cms.string('1'),
0071     lastRun = cms.string('10'),
0072     OnlineDBSID = cms.string(''),
0073     OnlineDBUser = cms.string(''),
0074     OnlineDBPassword = cms.string(''),
0075     LocationSource = cms.string(''),
0076     Location = cms.string(''),
0077     GenTag = cms.string(''),
0078     RunType = cms.string(''),
0079     fileType = cms.string(options.filetype),
0080     fileName = cms.string(options.input),
0081   )
0082 )
0083 
0084 process.p = cms.Path(process.Test1)