Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:29:39

0001 # -*- coding: utf-8 -*-
0002 # The following comments couldn't be translated into the new config version:
0003 
0004 # upload to database 
0005 
0006 #string timetype = "timestamp"    
0007 
0008 import FWCore.ParameterSet.Config as cms
0009 
0010 process = cms.Process("Reader")
0011 
0012 # Use this to have also debug info (WARNING: the resulting file is > 200MB.
0013 process.MessageLogger = cms.Service("MessageLogger",
0014     cerr = cms.untracked.PSet(
0015         enable = cms.untracked.bool(False)
0016     ),
0017     debugModules = cms.untracked.vstring('*'),
0018     files = cms.untracked.PSet(
0019         DelayReaderDebug = cms.untracked.PSet(
0020             threshold = cms.untracked.string('DEBUG')
0021         ),
0022         DelayReaderSummary = cms.untracked.PSet(
0023             threshold = cms.untracked.string('INFO')
0024         )
0025     )
0026 )
0027 
0028 # How to use the EmptyIOVSource:
0029 # the EmptyIOVSource will generate N events with a given interval.
0030 # the N events must be specified in the maxEvents as usual but the
0031 # first value, last value, timetype (runnumber, timestamp or lumiid) must be specified
0032 # in the EmptyIOVSource configuration block. It will then generate events with the given
0033 # interval.
0034 # To generate one event per run in a given range of runs you should then use:
0035 # - first - last value as the run range
0036 # - interval == 1 (means move of one run unit at a time)
0037 # - maxEvents = lastValue - firstValue (so that there is one event per run
0038 # otherwise it will stop before completing the range or it will go beyond (to infinity).
0039 
0040 process.maxEvents = cms.untracked.PSet(
0041     input = cms.untracked.int32(5)
0042 )
0043 process.source = cms.Source("EmptyIOVSource",
0044     timetype   = cms.string('runnumber'),
0045     firstValue = cms.uint64(97),
0046     lastValue  = cms.uint64(102),
0047     interval = cms.uint64(1)
0048 )
0049 
0050 process.load("CalibTracker.SiStripESProducers.SiStripDelayESProducer_cfi")
0051 
0052 # Need to specify the Record for each BaseDelay.
0053 # Optionally the Label associated to the tag can also be specified (default = "").
0054 process.siStripDelayESProducer.ListOfRecordToMerge = cms.VPSet(
0055    cms.PSet(
0056        Record = cms.string('SiStripBaseDelayRcd'),
0057        Label = cms.string('baseDelay1'),
0058        SumSign = cms.int32(1)
0059    ),
0060    cms.PSet(
0061        Record = cms.string('SiStripBaseDelayRcd'),
0062        Label = cms.string('baseDelay2'),
0063        SumSign = cms.int32(-1)
0064    )
0065 )
0066 
0067 process.poolDBESSource = cms.ESSource(
0068     "PoolDBESSource",
0069     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0070     DBParameters = cms.PSet(
0071         messageLevel = cms.untracked.int32(2),
0072         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0073     ),
0074     timetype = cms.untracked.string('runnumber'),
0075     connect = cms.string('sqlite_file:dbfile.db'),
0076     toGet = cms.VPSet(
0077         cms.PSet(
0078             record = cms.string('SiStripBaseDelayRcd'),
0079             tag = cms.string('SiStripBaseDelay_Ideal_31X_4'),
0080             label = cms.untracked.string('baseDelay1')
0081         ),
0082         cms.PSet(
0083             record = cms.string('SiStripBaseDelayRcd'),
0084             tag = cms.string('SiStripBaseDelay_Ideal_31X_3'),
0085             label = cms.untracked.string('baseDelay2')
0086         )
0087     )
0088 )
0089 
0090 process.reader = cms.EDAnalyzer("SiStripDelayDummyPrinter")
0091                               
0092 process.p1 = cms.Path(process.reader)
0093 
0094