13 gStyle->SetPalette(1);
14 gROOT->SetStyle(
"Plain");
16 TCanvas*
c1 =
new TCanvas (
"c1",
"",20,20,1000,500);
18 TFile*
f =
new TFile(
"ICSD.root");
21 TH1D*
hist1 =
new TH1D(
"histo",
"ICSD", 30, 0.0, 30);
25 TNtuple*
ntuple1 = (TNtuple*)f->Get(
"ntuple_1");
27 TBranch* eventBranch = ntuple1->FindBranch(
"row_wise_branch");
28 if ( ! eventBranch ) rowWise =
false;
29 std::cout <<
"rowWise: " << rowWise << std::endl;
32 ntuple1->SetBranchAddress(
"ionisations", &ion);
37 Int_t
nentries = ntuple1->GetEntries();
46 hist1->GetXaxis()->SetLabelSize(0.025);
47 hist1->GetYaxis()->SetLabelSize(0.025);
49 hist1->GetXaxis()->SetTitleSize(0.035);
50 hist1->GetYaxis()->SetTitleSize(0.035);
55 hist1->GetXaxis()->SetTitle(
"ionisation number");
56 hist1->GetYaxis()->SetTitle(
"frequency");
58 c1->SaveAs(
"ICSD.tiff");
62 TLeaf* leaf = ntuple->FindLeaf(name);
64 std::cerr <<
"Error in <SetLeafAddress>: unknown leaf --> " << name << std::endl;
67 leaf->SetAddress(address);
TFile f("microbeam.root")
void SetLeafAddress(TNtuple *ntuple, const char *name, void *address)