3.5.4 FWLite.Python (using PyROOT)

Detailed Review status

Goals of this page:

In this section you will learn how to use FWLite.Python.


This document assumes that you already know python (although you may be able to learn a fair bit just following the examples). Please see references for some links for learning Python.

Why Python? CMS already uses it for its configuration files. It is a powerful language that many consider both much easier to read and easier to write than C++.

Simple Example

This tutorial assumes that the user has setup their area as described in WorkBookFWLiteExamples35X.

An example of accessing data in python is shown here.

To use this example, simply do

python PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py

This will loop over the muons in the event ("cleanPatMuons") and plot the kinematic information.


Python introductions:

-- SalvatoreRoccoRappoccio - 08-Mar-2010 -- CharlesPlager - 13-Jan-2010 -- PetarMaksimovic - 08 Jul 2009

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-03-08 - SalvatoreRRappoccio
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic 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