StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Example_read_hist_file_min_list_draw_ps.C
1 // $Id: Example_read_hist_file_min_list_draw_ps.C,v 1.4 1999/11/30 20:04:17 kathy Exp $
2 // $Log: Example_read_hist_file_min_list_draw_ps.C,v $
3 // Revision 1.4 1999/11/30 20:04:17 kathy
4 // fix Example macros so that they work from .dst.root files or .dst.xdf files & update documentation; also had to change which values printed in *read_dst_print_tables* macro since the names have changed in dst tables
5 //
6 // Revision 1.3 1999/11/03 19:03:06 kathy
7 // changes to default input files and output file names - needed by perl script for testing
8 //
9 // Revision 1.2 1999/11/02 22:54:36 kathy
10 // fixing documentation in macro
11 //
12 // Revision 1.1 1999/10/11 17:17:58 kathy
13 // changed names of some macros to make them more standard; changed default input file to MakeHists since previous no longer existed; combined some macros so that the one example will show all functionality
14 //
15 //
16 //=======================================================================
17 // owner: Kathy Turner
18 // what it does:
19 // Minimal commands to read hist file and list,draw & send to ps
20 // histogram with known name.
21 //
22 // You must first run Example_read_dst_makehist.C to create
23 // an output *hist.root file (flat file).
24 // This macro then reads in the histogram file and draws
25 // histogram h1.
26 // This will not work for *.hist.root files produced from bfc.C since
27 // they have a tree directory structure.
28 //=======================================================================
29 //
30 void Example_read_hist_file_min_list_draw_ps()
31 {
32 TFile f1("Example_read_dst_makehist.root");
33 f1.ls();
34 TCanvas MyCanvas("CanvasName","Canvas Title",800,600);
35 gStyle->SetOptStat(111111);
36 TPostScript ps("Example_read_hist_file_min_list_draw_ps.ps",111);
37 h1->Draw();
38 ps.Close();
39 }