hist painter

From: OKUMURA, Akira <oxon_at_astro.isas.jaxa.jp>
Date: Wed, 18 Aug 2010 17:19:45 -0700


Hello ROOTers,

I am writing a class MyHistPainter which derive from THistPainter.

Since TH1 does not have a method SetPainter, I have to write my code as follows.

TVirtualHistPainter::SetPainter("MyHistPainter"); // switch the default painter to mine TH1* hist = new TH1("", "", 100, 0, 1);
hist->GetPainter(); // create a painter
TVirtualHistPainter::SetPainter("THistPainter"); // revert to the original one

Is this a correct way when using own painter?

Regards,

--
OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
Institute of Space and Astronautical Science (ISAS/JAXA)
Now at KIPAC/SLAC/Stanford
Varian Physics #306
382 Via Pueblo Mall, MC 406 Stanford, CA94305
TEL 650-736-0971/FAX 650-724-5065
Skype : okumura.akira
Received on Thu Aug 19 2010 - 02:19:58 CEST

This archive was generated by hypermail 2.2.0 : Thu Aug 19 2010 - 11:50:01 CEST