ShadowKiller' blog

一个公开的网络记事本,并且博主特别的懒。比猪还懒。

[cernRoot] how to get contours from a TH2D

here, i use a TMultiGraph to save the gotten contours, because the contours may be not closed in a TH2D, with the function TMultiGraph * GetContours(...

2016-12-02 13:16:53

阅读数:264

评论数:0

how to remain a TObject after the corresponding TFile is closed

当一个TFile 被关闭时,在这个文件打开至结束之间产生的任何类,默认都是delete的。其用意相当于,TFile相当于一个目录,当打开这个目录的时候,里面的任何东西都是可以看得到的,但当关闭了这个目录,其中的任何东西都在内存中被清除。这是一个保持文件使用过程中保持内存清洁的做法。但是有的时候,我...

2016-11-25 22:07:13

阅读数:161

评论数:0

how to calculate the textsize of TLatex in CernRoot

double pad_width_for_textSizeValue0; double pad_height_for_textSizeValue0; double pad_width_for_textSizeValue; double pad_height_for_textSizeValue; d...

2016-10-15 16:30:42

阅读数:295

评论数:0

[cernRoot] How make a beautiful graph by CernRoot?

double xmin = 0.15, xmax = 1.65, ymin = .0, ymax = .59; double x[3] = {1./8., 4./8., 7./8.}; double y[6] = {1./17., 4./17., 7./17., 10./17., ...

2015-09-17 19:22:47

阅读数:1080

评论数:0

[cernRoot]how to get tree name?

TIter nextkey( root_file->GetListOfKeys() ); TKey *key, *oldkey=0; while ( (key = (TKey*)nextkey())) { TObject *obj = key->ReadObj...

2015-07-11 14:08:05

阅读数:291

评论数:0

[cernRoot]how to deal with TPavetext->SetTextAngle()?

https://root.cern.ch/root/roottalk/roottalk98/2083.html Charles Leggett wrote: > Is SetTextAngle() implemented for TPaveText objects? I can't seem...

2015-06-04 22:10:35

阅读数:402

评论数:0

[cernRoot]Get graphs from TMultiGraph

int ngr = mg[4]->GetListOfGraphs()->GetSize(); TList * gr_list = mg[0]->GetListOfGraphs(); TGraph * gr0 = (TGraph *)gr_list->Firs...

2015-06-04 14:13:06

阅读数:310

评论数:0

[cernRoot] Getting Contours From TH2D

double contours[3] = {chisqmin + 2.3, chisqmin + 6.3, chisqmin + 9}; // double contours[1] = {chisqmin + 2.3}; h2d->SetContour(3, contours); h2d-&...

2015-06-04 13:55:47

阅读数:489

评论数:0

[cernRoot]How to get tree name from root file

TIter nextkey( root_file->GetListOfKeys() ); TKey *key, *oldkey=0; while ( (key = (TKey*)nextkey())) { TObject *obj = key->ReadObj...

2015-06-04 13:54:14

阅读数:290

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭