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.

Introduction

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.

References

Python introductions:

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

Edit | Attach | Watch | Print version | History: r14 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 2010-03-31 - KatiLassilaPerini


ESSENTIALS

ADVANCED TOPICS


 
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback