Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 f9daq 1
#include "TROOT.h"
2
#include "TFile.h"
3
#include "TBenchmark.h"
4
#include "TH1F.h"
5
#include "TH2F.h"
6
#include "TCanvas.h"
7
#include "TStyle.h"
8
#include "TPad.h"
9
#include "TF1.h"
10
#include "TGraph.h"
11
#include "TSpectrum.h"
12
 
13
#include "RTUtil.h"
14
 
15
int plot_tdc()
16
{
17
  TFile *file0 = new TFile("C:/HOME/dino/l2d/root/test.root");
18
  //TNtuple *ntuple = (TNtuple*) file0->Get("nt");
19
  TCanvas *canvas1 = new TCanvas("canvas1","canvas1",1000,1000);
20
  TH2F* htdc = (TH2F*) file0->Get("htdc");
21
  canvas1->Divide(2,2);
22
  canvas1->cd(1);
23
  htdc->Draw();
24
 
25
  TH1F* h1ch = new TH1F("h1ch","h1ch",256,0,256);
26
  htdc->ProjectionX("h1ch",33,34,"");
27
  canvas1->cd(2);
28
  h1ch->Draw();
29
 
30
}