Previous page


This page contains a few instructions on how to do quick analysis with CMSSW

On this page:

Useful links

Setting CMSSW

The CMSSW versions are rapidly evolving, the recommendation is to use the most recent version. To get the full versions list run scram list CMSSW

Create a new empty/template plugin

The following lines will build a new analysis plugin. For more information see WorkBookWriteFrameworkModule.

Create the template:

mkedanlzr DemoAnalyzer
cd DemoAnalyzer
scram b -j

It will create which is the cpp main code

Add python configuration python folder

import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

process = cms.Process("Demo")

# import of standard configurations
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(100)

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
process.source = cms.Source("PoolSource",fileNames = cms.untracked.vstring(options.inputFiles))

process.demo = cms.EDAnalyzer('DemoAnalyzer')

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

Then you can run the analysis using the following command:

  cmsRun $CMSSW_BASE/src/DemoAnalyzer/python/

-- MichaelPitt - 2021-05-09

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2021-05-10 - MichaelPitt
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback