When I try compile my macro root return the error:
My OS is Ubuntu 16.04 lts
root [0] .x plotGraph.cpp
/home/juanleite/Dropbox/Juan/Iniciação-científica/Alberto-CBPF/Juan/Tarefa_3/Gráficos/PID/./plotGraph.cpp:13:1: error:
expected unqualified-id
while(!ler.eof()){
^
/home/juanleite/Dropbox/Juan/Iniciação-científica/Alberto-CBPF/Juan/Tarefa_3/Gráficos/PID/./plotGraph.cpp:24:1: error:
unknown type name 'ntuple’
ntuple->Draw(“cont:cut>>h0”);
^
/home/juanleite/Dropbox/Juan/Iniciação-científica/Alberto-CBPF/Juan/Tarefa_3/Gráficos/PID/./plotGraph.cpp:24:7: error:
cannot use arrow operator on a type (* I change to dot and doesn’t work ")
ntuple->Draw(“cont:cut>>h0”);
^
here is the macro:
{
#include
#include
double cut,cont,p,s;
TNtuple * ntuple = new TNtuple(“ntuple”,“title”,“cut:cont:p:s”);
ifstream ler(“dados.dat”,ios::in);
while(!ler.eof()){
ler >> cut >> cont >> p >> s;
ntuple->Fill(cut,cont,p,s);
}
TCanvas *canvas = new TCanvas(“Canvas”,"",900,600);
ntuple->Draw(“cont:cut>>h0”);
}