Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

#include "TROOT.h"
#include "TFile.h"
#include "TBenchmark.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TPad.h"
#include "TF1.h"
#include "TGraph.h"
#include "TSpectrum.h"

#include "RTUtil.h"

int plot_tdc()
{
  TFile *file0 = new TFile("C:/HOME/dino/l2d/root/test.root");
  //TNtuple *ntuple = (TNtuple*) file0->Get("nt");
  TCanvas *canvas1 = new TCanvas("canvas1","canvas1",1000,1000);
  TH2F* htdc = (TH2F*) file0->Get("htdc");
  canvas1->Divide(2,2);
  canvas1->cd(1);
  htdc->Draw();
  
  TH1F* h1ch = new TH1F("h1ch","h1ch",256,0,256);
  htdc->ProjectionX("h1ch",33,34,"");
  canvas1->cd(2);
  h1ch->Draw();
  
}