Fork me on GitHub

source: svn/trunk/examples/ProcessingTime.C@ 1115

Last change on this file since 1115 was 975, checked in by Pavel Demin, 12 years ago

fix examples

File size: 827 bytes
Line 
1/*
2root -l examples/ProcessingTime.C\(\"delphes_output.root\"\)
3*/
4
5//------------------------------------------------------------------------------
6
7TGraphErrors gr;
8
9//------------------------------------------------------------------------------
10
11void ProcessingTime(const char *inputFile)
12{
13 TChain *chain = new TChain("Delphes");
14 chain->Add(inputFile);
15
16 TH1F hist("time", "time", 50, 0, 0.01);
17 Int_t i;
18
19 for(i = 1; i < 8; ++i)
20 {
21 chain->Draw("Event.ProcTime >> time", TString::Format("Jet_size == %d", i+1));
22 gr.SetPoint(i, i+1, hist.GetMean()*1000);
23 gr.SetPointError(i, 0, hist.GetRMS()*1000);
24 }
25
26 gr.GetXaxis()->SetLimits(1.0, 9.0);
27 gr.GetXaxis()->SetTitle("number of jets");
28 gr.GetYaxis()->SetTitle("processing time per event, ms");
29 gr.SetMarkerStyle(kFullDotMedium);
30 gr.Draw("AP");
31}
32
Note: See TracBrowser for help on using the repository browser.