Hello,
I am very new to Root
and I have a macro file to debug
my file’s code is
Int_t canvasnew(int RUN1=200,int RUN2=220,int NHITS=-1)
{
Int_t NENTRIES = NHITS;
gROOT->Reset();
////////// Canvas //////////
char COM[4][50];
if (RUN1!=RUN2){
sprintf(&COM[0][0],"FRONT WALL top - RUNS %d-%d",RUN1,RUN2);
sprintf(&COM[1][0],"FRONT WALL bottom - RUNS %d-%d",RUN1,RUN2);
sprintf(&COM[2][0],"REAR WALL top - RUNS %d-%d",RUN1,RUN2);
sprintf(&COM[3][0],"REAR WALL bottom - RUNS %d-%d",RUN1,RUN2);
}
else {
sprintf(&COM[0][0],"FRONT WALL top - RUNS %d",RUN1,RUN2);
sprintf(&COM[1][0],"FRONT WALL bottom - RUNS %d",RUN1,RUN2);
sprintf(&COM[2][0],"REAR WALL top - RUNS %d",RUN1,RUN2);
sprintf(&COM[3][0],"REAR WALL bottom - RUNS %d",RUN1,RUN2);
}
TCanvas *c[4];
TPad *p[4];
const char *tit="ALADIN TOF Wall - Control Interface";
char cname[50];
char pname[50];
const Int_t WindowWidth = 245;
const Int_t WindowHeight = 330;
const Int_t XWOffset=0;
const Int_t YWOffset=30;
Int_t XW,YW;
for (Int_t Group=0;Group<4;Group++) {// coul
sprintf(cname,"c%d",Group+1);
sprintf(pname,"p%d",Group+1);
if (Group<4){
XW=Group*(WindowWidth+8)+XWOffset;
YW=0;
}
else{
XW=(Group-4)*(WindowWidth+8)+XWOffset;
YW=WindowHeight+YWOffset;
}
c[Group] = new
TCanvas(cname,&COM[Group][0],XW,YW,WindowWidth,WindowHeight);
c[Group]->ToggleEventStatus();
c[Group]->cd();
TPaveLabel *title = new TPaveLabel(0.1,0.96,0.9,0.99,&COM[Group][0]);
title->Draw();
TDatime now;
TPaveLabel *date = new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
date->Draw();
}
for (Int_t Group=0;Group<4;Group++) {
c[Group]->cd();
gStyle->SetOptLogy(0); // Don't put that command before drawing title and
date paves!
p[Group] = new TPad(pname,"Graphs",0.01,0.05,0.99,0.95);
p[Group]->Draw();
gStyle->SetOptStat(0);
p[Group]->cd();
p[Group]->Divide(8,12,0.,0.,10);
c[Group]->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",0,
0, "ProcEvent(Int_t,Int_t,Int_t,TObject*)"); // blow-up
}
}
But I keep getting this error
Error in TQObject::CheckConnectArgs: slot ProcEvent(int,int,int,TObject*)
does not exist
Error in TQObject::CheckConnectArgs: slot ProcEvent(int,int,int,TObject*)
does not exist
Error in TQObject::CheckConnectArgs: slot ProcEvent(int,int,int,TObject*)
does not exist
Error in TQObject::CheckConnectArgs: slot ProcEvent(int,int,int,TObject*)
does not exist
How can I solve this error?
Pleeeeeeease
Thank you very very much!!