TF2 and I/O

Peter M. Jacobs (PMJacobs@lbl.gov)
Thu, 13 May 1999 18:35:42 -0700


This is a multi-part message in MIME format.
--------------4263B1C160E0453A3A6888AB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Daer Roottalk,

I have a TF2 that I evaluate with several different sets of parameters
within a macro. I would like to write to a root file a histogram of this
function for each of these parameter sets, in order to read them in and
plot them in a different macro. Plotting them within the original macro
can be done via TF2::DrawCopy. How do I address these histograms in
order to write them out?

I naively tried to shortcircuit the hitsogramming by trying to use the
Write method on my TF2, i.e.

TF2 *f2 = new TF2 (.....)
....
f2->Write();

f2 is written to the root file, but when I open the file and do
f2->Draw(), the resulting histogram is empty. (This technique works for
TF1, by the way, in contrast to TF2.)

Thanks,

Peter Jacobs,
LBNL

--------------4263B1C160E0453A3A6888AB
Content-Type: text/x-vcard; charset=us-ascii;
name="PMJacobs.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Peter M. Jacobs
Content-Disposition: attachment;
filename="PMJacobs.vcf"

begin:vcard
n:jacobs;peter
x-mozilla-html:TRUE
adr;dom;quoted-printable:;;MS 70-319, LBNL=0D=0A1 Cyclotron Road;Berkeley;California;94720;
org:Lawrence Berkeley National Laboratory
version:2.1
email;internet:pmjacobs@lbl.gov
title:Nuclear Science Division
tel;fax:(510)486-4818
tel;work:(510)486-5413
x-mozilla-cpt:;0
fn:jacobs, peter
end:vcard

--------------4263B1C160E0453A3A6888AB--