Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:wantto9 [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:wantto9

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
ja:root:wantto9 [2018/11/07 02:34]
kota
ja:root:wantto9 [2018/11/07 06:18] (現在)
kota
ライン 10: ライン 10:
   TGraph *graph = new TGraph(N, tree->​GetV1(),​ tree->​GetV2());​   TGraph *graph = new TGraph(N, tree->​GetV1(),​ tree->​GetV2());​
 </​code>​ </​code>​
-TTree::​GetV1() ~ TTree::​GetV4() は、TTree::​Draw("​V1:​V2:​V3:​V4",​...) のV1,​...,​V4の Double_t 配列の先頭ポインタを返す。\\+TTree::​GetV1() ~ TTree::​GetV4() は、TTree::​Draw("​V1:​V2:​V3:​V4",​...) のV1,​...,​V4の Double_t 配列の先頭ポインタを返す。 
 + 
 +<​note>​ 
 +  あとでNを使って配列を作ろうとして、でも  
 +    const Int_t N = ...  
 +  としたんで怒られるので 
 +    static const Int_t N = ...  
 +  としたら、 Error:​ No memory for static N\0\0  なんてエラーが出てきた。 
 +   
 +  結局、const Int_t N = ... のままにして、配列を宣言するところで、 
 +    Double_t *X = new Double[N];​ 
 +  のように動的に確保することによって解決。 
 +  ※最後にdeleteを忘れないように。 
 +</​note>​ 
 N of Selected raw > 1000000 となるときは N of Selected raw > 1000000 となるときは
   tree->​SetEstimate(tree->​GetEntries()+1);​   tree->​SetEstimate(tree->​GetEntries()+1);​
ja/root/wantto9.txt · 最終更新: 2018/11/07 06:18 by kota