** Warning **
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1113.
Last-Modified: Fri, 10 Jul 2025 23:57:11 GMT
Content-Type: text/html; charset=utf-8
/CMSSW_15_1_X_2025-07-10-2300/CondCore/ESSources/test/python/write_beamspot_cfg.py
File indexing completed on 2024-11-25 02:29:19
0001
0002 import time
0003
0004 import FWCore .ParameterSet .Config as cms
0005 import FWCore .ParameterSet .VarParsing as VarParsing
0006 from Configuration .AlCa .autoCond import autoCond
0007
0008 options = VarParsing .VarParsing ()
0009 options .register ('connectionString' ,
0010 'sqlite_file:cms_conditions.db' ,
0011 VarParsing .VarParsing .multiplicity .singleton ,
0012 VarParsing .VarParsing .varType .string ,
0013 "CondDB Connection string" )
0014 options .register ('tag' ,
0015 'BeamSpot_test_updateByLumi_00' ,
0016 VarParsing .VarParsing .multiplicity .singleton ,
0017 VarParsing .VarParsing .varType .string ,
0018 "tag for record BeamSpotObjectsRcd" )
0019 options .register ('runNumber' ,
0020 250000,
0021 VarParsing .VarParsing .multiplicity .singleton ,
0022 VarParsing .VarParsing .varType .int ,
0023 "Run number; default gives latest IOV" )
0024 options .register ('messageLevel' ,
0025 0,
0026 VarParsing .VarParsing .multiplicity .singleton ,
0027 VarParsing .VarParsing .varType .int ,
0028 "Message level; default to 0" )
0029
0030 options .parseArguments ()
0031
0032 process = cms .Process ("TEST" )
0033
0034 process .MessageLogger = cms .Service ("MessageLogger" ,
0035 cout = cms .untracked .PSet (threshold = cms .untracked .string ('INFO' )),
0036 destinations = cms .untracked .vstring ('cout' )
0037 )
0038
0039 CondDBParameters = cms .PSet (
0040 messageLevel = cms .untracked .int32 ( 3 ),
0041 )
0042
0043 process .source = cms .Source ( "EmptySource" ,
0044 firstRun = cms .untracked .uint32 ( 1 ),
0045 firstLuminosityBlock = cms .untracked .uint32 ( 1 ),
0046 numberEventsInRun = cms .untracked .uint32 ( 1 ),
0047 numberEventsInLuminosityBlock = cms .untracked .uint32 ( 1 )
0048 )
0049
0050 process .maxEvents = cms .untracked .PSet ( input = cms .untracked .int32 (1))
0051
0052 process .prod = cms .EDAnalyzer ("LumiTestWriteAnalyzer" ,
0053 connectionString = cms .untracked .string (options .connectionString ),
0054 tagName = cms .untracked .string (options .tag ),
0055 runNumber = cms .untracked .uint32 (options .runNumber ),
0056 numberOfLumis = cms .untracked .uint32 (24),
0057 iovSize = cms .untracked .uint32 (4)
0058 )
0059
0060 process .p = cms .Path ( process .prod )
0061
0062 for name , module in process .es_sources_ ().items ():
0063 print ("ESModules> provider:%s '%s'" % ( name , module .type_ () ))
0064 for name , module in process .es_producers_ ().items ():
0065 print ("ESModules> provider:%s '%s'" % ( name , module .type_ () ))