Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # The following comments couldn't be translated into the new config version:
0002 
0003 # upload to database 
0004 
0005 #string timetype = "timestamp"    
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process("Reader")
0010 
0011 # Use this to have also debug info (WARNING: the resulting file is > 200MB.
0012 process.MessageLogger = cms.Service("MessageLogger",
0013     cerr = cms.untracked.PSet(
0014         enable = cms.untracked.bool(False)
0015     ),
0016     debugModules = cms.untracked.vstring('*'),
0017     files = cms.untracked.PSet(
0018         GainReaderDebug = cms.untracked.PSet(
0019             threshold = cms.untracked.string('DEBUG')
0020         ),
0021         GainReaderSummary = cms.untracked.PSet(
0022             threshold = cms.untracked.string('INFO')
0023         )
0024     )
0025 )
0026 
0027 # How to use the EmptyIOVSource:
0028 # the EmptyIOVSource will generate N events with a given interval.
0029 # the N events must be specified in the maxEvents as usual but the
0030 # first value, last value, timetype (runnumber, timestamp or lumiid) must be specified
0031 # in the EmptyIOVSource configuration block. It will then generate events with the given
0032 # interval.
0033 # To generate one event per run in a given range of runs you should then use:
0034 # - first - last value as the run range
0035 # - interval == 1 (means move of one run unit at a time)
0036 # - maxEvents = lastValue - firstValue (so that there is one event per run
0037 # otherwise it will stop before completing the range or it will go beyond (to infinity).
0038 
0039 process.maxEvents = cms.untracked.PSet(
0040     input = cms.untracked.int32(5)
0041 )
0042 process.source = cms.Source("EmptyIOVSource",
0043     timetype   = cms.string('runnumber'),
0044     firstValue = cms.uint64(97),
0045     lastValue  = cms.uint64(102),
0046     interval = cms.uint64(1)
0047 )
0048 
0049 process.load("CalibTracker.SiStripESProducers.SiStripGainESProducer_cfi")
0050 
0051 # Need to specify the Record for each ApvGain.
0052 # Optionally the Label associated to the tag can also be specified (default = "").
0053 process.siStripGainESProducer.APVGain = cms.VPSet(
0054    cms.PSet(
0055        Record = cms.string('SiStripApvGainRcd'),
0056        Label = cms.untracked.string('SiStripApvGain_test_1')
0057    ),
0058    # cms.PSet(
0059    #     Record = cms.string('SiStripApvGain2Rcd'),
0060    #     Label = cms.untracked.string('SiStripApvGain_test_2')
0061    cms.PSet(
0062        Record = cms.string('SiStripApvGain2Rcd'),
0063    ),
0064 )
0065 
0066 # process.siStripGainESProducer.APVGain[0].Label = "SiStripApvGain_test_1"
0067 
0068 # From CondCore/ESSources V09-00-06 it is possible to use a single ESSource.
0069 # For earlier versions the two tags to go in the same record must be loaded by two different PoolDBESSources.
0070 process.poolDBESSource = cms.ESSource(
0071     "PoolDBESSource",
0072     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0073     DBParameters = cms.PSet(
0074         messageLevel = cms.untracked.int32(2),
0075         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0076     ),
0077     timetype = cms.untracked.string('runnumber'),
0078     connect = cms.string('sqlite_file:dbfile.db'),
0079     toGet = cms.VPSet(
0080         cms.PSet(
0081             record = cms.string('SiStripApvGainRcd'),
0082             tag = cms.string('SiStripApvGain_test_1'),
0083             label = cms.untracked.string('SiStripApvGain_test_1')
0084         ),
0085 #        cms.PSet(
0086 #            record = cms.string('SiStripApvGainRcd'),
0087 #            tag = cms.string('SiStripApvGain_test_2'),
0088 #            label = cms.untracked.string('SiStripApvGain_test_2')
0089 #        )
0090     )
0091 )
0092 
0093 process.poolDBESSource2 = cms.ESSource("PoolDBESSource",
0094    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0095    DBParameters = cms.PSet(
0096        messageLevel = cms.untracked.int32(2),
0097        authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0098    ),
0099    timetype = cms.untracked.string('runnumber'),
0100    connect = cms.string('sqlite_file:dbfile.db'),
0101    toGet = cms.VPSet(cms.PSet(
0102        record = cms.string('SiStripApvGain2Rcd'),
0103        # tag = cms.string('SiStripApvGain_test_2'),
0104        # label = cms.untracked.string('SiStripApvGain_test_2')
0105        tag = cms.string('SiStripApvGain_Ideal_31X'),
0106        # label = cms.untracked.string('')
0107    ))
0108 )
0109 
0110 process.reader = cms.EDFilter("SiStripGainDummyPrinter")
0111                               
0112 process.p1 = cms.Path(process.reader)
0113 
0114