Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

process = cms.Process("DISPLAY")


options = VarParsing.VarParsing ()
options.register ('file',
                  "xxx", # default value
                  VarParsing.VarParsing.multiplicity.singleton,
                  VarParsing.VarParsing.varType.string,
                  "xrootd URL")


options.parseArguments()


process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")


# process.maxEvents = cms.untracked.PSet(
#         input = cms.untracked.int32(1)
#         )

### For running on pre 3.6 files the current needed to determine the
### magnetic field is taken from Conditions DB.
# process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
### specify tag:
# process.GlobalTag.globaltag = 'START36_V10::All'
### or use auto-cond:
# from Configuration.AlCa.autoCond import autoCond
# process.GlobalTag.globaltag = autoCond['mc']

### Request EveService
process.EveService = cms.Service("EveService")

process.source = cms.Source(
    "PoolSource",
    fileNames = cms.untracked.vstring('file:' + options.file)
)

### Extractor of geometry needed to display it in Eve.
### Required for "DummyEvelyser".
process.add_( cms.ESProducer(
        "TGeoMgrFromDdd",
        verbose = cms.untracked.bool(False),
        level   = cms.untracked.int32(8)
))

process.dump = cms.EDAnalyzer(
    "DummyEvelyser",
    tracks = cms.untracked.InputTag("generalTracks")
)

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