Skip to content

Commit 1e8c7f1

Browse files
refactoring, replace calls to new and cout
1 parent e17fbd5 commit 1e8c7f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/hep_dimuon_analysis_cms/hep_dimuon_analysis_cms.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ using Muon = llama::DS<
4646

4747
static void Show(TH1D& h)
4848
{
49-
new TApplication("", nullptr, nullptr);
49+
auto app = TApplication("", nullptr, nullptr);
5050

5151
gStyle->SetTextFont(42);
52-
auto c = new TCanvas("c", "", 800, 700);
53-
c->SetLogx();
54-
c->SetLogy();
52+
auto c = TCanvas("c", "", 800, 700);
53+
c.SetLogx();
54+
c.SetLogy();
5555

5656
h.SetTitle("");
5757
h.GetXaxis()->SetTitle("m_{#mu#mu} (GeV)");
@@ -73,9 +73,9 @@ static void Show(TH1D& h)
7373
label.DrawLatex(0.100, 0.920, "#bf{CMS Open Data}");
7474
label.SetTextSize(0.030);
7575
label.DrawLatex(0.50, 0.920, "#sqrt{s} = 8 TeV, L_{int} = 11.6 fb^{-1}");
76-
c->Modified();
76+
c.Modified();
7777

78-
std::cout << "press ENTER to exit...\n";
78+
fmt::print("press ENTER to exit...\n");
7979
auto future = std::async(std::launch::async, getchar);
8080
while (true)
8181
{

0 commit comments

Comments
 (0)