[Notes] ROOT User Guide (1)

2 篇文章 0 订阅
2 篇文章 0 订阅

What is ROOT?

The ROOT system provides a set of OO frameworks with all the functionality needed to handle and analyze large amounts of data in a very efficient way. See here for more about ROOT.

Chapter 1. Getting Started

Command line

root [-?] [-b] [-q] [filename]

-?   : for help information

-b : run in batch mode without graphics

-q : run root then quit

filename : execute the source file

 

CINT commands start with "."

root[] .? //show help information of CINT/ROOT C/C++ interpreter

root[] .L //load file, note: not upper case not lower case

root[] .x //execute file

root[] .!ls //os shell command

 

For more useful CINT commands, use command ".?".

 

Use TAB to invoke helpful hints(works like linux shell)

 

TObject::Dump() and TObject::Inspect() are useful methods to see the state of an object.

 

Using GUI

Inheritance:

TObject<--TPad<--TCanvas

 

• Only one TCanvas can be active at a time

• Only one Tpad can be active at a time

• Every object have a method Draw() 

 

Editor Frame

e.g. TAxis ~ TAxisEditor

 

Context Menu

Right click any object in canvas to get its context menu showing available methods. This can be alternative to 

 

 

Interact with the GUI to make the picture suit your wishes. Once done you can save it into various formats(like GIF, C, etc.)

 

Multi-pad Canvas

root[] TCanvas *MyC = new TCanvas("MyC","Test canvas",1)

root[] MyC->Divide(2,2) // 2 * 2, total 4 pads

root[] MyC->Cd(1) // Pad 1 is the active pad

root[] f1->Draw() // Function f1 is drawn on pad 1

root[] MyC->Cd(3) // switch to Pad 3, which is the active now

root[] MyC_3->Cd() // equivalent to the previous line assuming MyC_3 is a pointer to the third pad in the canvas

 

 

Global Variables

  • gROOT: get a set of global variables, like functions, browsers, classes, colors, etc.
  • gFile: (don't understand)
  • gDirectory:(don't understand)

 

Common Methods:

TF1

• Eval

• Derivative

• Integrate

• Draw

• SetNpx: how many equidistant points to draw

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值