import FWCore.ParameterSet.Config as cms
import os

process = cms.Process("summary")

process.MessageLogger = cms.Service( "MessageLogger",
                                     debugModules = cms.untracked.vstring( "*" ),
                                     cout = cms.untracked.PSet( threshold = cms.untracked.string( "DEBUG" ) ),
                                     destinations = cms.untracked.vstring( "cout" )
                                     )

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(1)
)
process.source = cms.Source("EmptySource",
    numberEventsInRun = cms.untracked.uint32(1),
    firstRun = cms.untracked.uint32(1)
)

process.load("CondCore.CondDB.CondDB_cfi")
process.load("CondTools.BeamSpot.BeamSpotRcdPrinter_cfi")

### 2018 Prompt
process.BeamSpotRcdPrinter.tagName  = "BeamSpotObjects_PCL_byLumi_v0_prompt"
process.BeamSpotRcdPrinter.startIOV = 1350646955507767
process.BeamSpotRcdPrinter.endIOV   = 1406876667347162
process.BeamSpotRcdPrinter.output   = "summary2018_Prompt.txt"

### 2017 ReReco
#process.BeamSpotRcdPrinter.tagName  = "BeamSpotObjects_LumiBased_v4_offline"
#process.BeamSpotRcdPrinter.startIOV = 1275820035276801
#process.BeamSpotRcdPrinter.endIOV   = 1316235677532161

### 2018 ABC ReReco
#process.BeamSpotRcdPrinter.tagName  = "BeamSpotObjects_LumiBased_v4_offline"
#process.BeamSpotRcdPrinter.startIOV = 1354018504835073
#process.BeamSpotRcdPrinter.endIOV   = 1374668707594734

### 2018D Prompt
#process.BeamSpotRcdPrinter.tagName  = "BeamSpotObjects_PCL_byLumi_v0_prompt"
#process.BeamSpotRcdPrinter.startIOV = 1377280047710242
#process.BeamSpotRcdPrinter.endIOV   = 1406876667347162

process.p = cms.Path(process.BeamSpotRcdPrinter)

[((4, 10, 4, 32), 'FWCore.ParameterSet.Config.Process', 'cms.Process', ({(4, 22, 4, 31): '"""summary"""'}, {}), "('summary')", True, 'import FWCore.ParameterSet.Config as cms\n'), ((44, 12, 44, 48), 'FWCore.ParameterSet.Config.Path', 'cms.Path', ({(44, 21, 44, 47): 'process.BeamSpotRcdPrinter'}, {}), '(process.BeamSpotRcdPrinter)', True, 'import FWCore.ParameterSet.Config as cms\n'), ((7, 52, 7, 80), 'FWCore.ParameterSet.Config.untracked.vstring', 'cms.untracked.vstring', ({(7, 75, 7, 78): '"""*"""'}, {}), "('*')", True, 'import FWCore.ParameterSet.Config as cms\n'), ((9, 52, 9, 83), 'FWCore.ParameterSet.Config.untracked.vstring', 'cms.untracked.vstring', ({(9, 75, 9, 81): '"""cout"""'}, {}), "('cout')", True, 'import FWCore.ParameterSet.Config as cms\n'), ((13, 12, 13, 34), 'FWCore.ParameterSet.Config.untracked.int32', 'cms.untracked.int32', ({(13, 32, 13, 33): '1'}, {}), '(1)', True, 'import FWCore.ParameterSet.Config as cms\n'), ((16, 24, 16, 47), 'FWCore.ParameterSet.Config.untracked.uint32', 'cms.untracked.uint32', ({(16, 45, 16, 46): '1'}, {}), '(1)', True, 'import FWCore.ParameterSet.Config as cms\n'), ((17, 15, 17, 38), 'FWCore.ParameterSet.Config.untracked.uint32', 'cms.untracked.uint32', ({(17, 36, 17, 37): '1'}, {}), '(1)', True, 'import FWCore.ParameterSet.Config as cms\n'), ((8, 76, 8, 107), 'FWCore.ParameterSet.Config.untracked.string', 'cms.untracked.string', ({(8, 98, 8, 105): '"""DEBUG"""'}, {}), "('DEBUG')", True, 'import FWCore.ParameterSet.Config as cms\n')]