Thank you!
This solution works fine:
TCrown *crown = new TCrown(0, 0, m_rhoMin, m_rhoMax,
m_phiMin*180/PI, m_phiMax*180/PI);
crown->SetLineColor(get_color(maximal_dxX0Divdx));
crown->SetFillColor(get_color(maximal_dxX0Divdx));
crown->Draw();
What caused the problems was largely due to inconsistent behavior of an
inline function and a constant variable. And yes, I am coming from Java!
:)
/Rikard Sandström
On Mon, 12 Aug 2002, Rene Brun wrote:
> Hi,
>
> Doing:
> TCrown crown;
> crown = new TCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
> or
> TCrown crown = new TCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
> is illegal C++ (are you coming from Java?)
>
> You should do
> TCrown *crown = new TCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
>
> Below, you will find an example of TCrown:
>
> {
> gROOT->Reset();
> TCanvas c1("c1","c1",400,400);
> TCrown cr1(.5,.5,.3,.4);
> cr1->SetLineStyle(2);
> cr1->SetLineWidth(4);
> cr1.Draw();
> TCrown cr2(.5,.5,.2,.3,45,315);
> cr2.SetFillColor(38);
> cr2.SetFillStyle(3010);
> cr2.Draw();
> TCrown cr3(.5,.5,.2,.3,-45,45);
> cr3.SetFillColor(50);
> cr3.SetFillStyle(3025);
> cr3.Draw();
> TCrown cr4(.5,.5,.0,.2);
> cr4.SetFillColor(4);
> cr4.SetFillStyle(3008);
> cr4.Draw();
> }
>
> NB. This new class has been introduced a few days ago *CVS version
> only).
>
> Rene Brun
>
>
> On Mon, 12 Aug 2002, Rikard Sandstrom wrote:
>
> > Hi,
> >
> > when using the new class TCrown I encountered some problems. While
> > TCrown crown;
> > crown = new TCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
> > works, the following does not work for me:
> > TCrown crown = new TCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
> >
> > Using * does not seem to help either.
> >
> > Another problem is drawing the crown. Paint() and Draw() does not work but
> > DrawCrown(0, 0, rhoMin, rhoMax, phiMin, phiMax);
> > does work.
> >
> > I am using version v3.03.07a.
> >
> > Are these bugs or have I missed something?
> >
> > /Rikard Sandström
> >
>
>
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:04 MET