15 TString filename =
"cernstaff.root";
20 TString macroName = filedir +
"cernbuild.C";
22 gROOT->ProcessLineFast(
"cernbuild()");
26 Error(
"hbars",
"file cernstaff.root not found");
31 Error(
"hbars",
"Tree T is not present in file %s",f->
GetName() );
40 c1->
cd(1);
gPad->SetGrid();
gPad->SetLogx();
gPad->SetFrameFillColor(33);
41 T->
Draw(
"Nation",
"",
"hbar2");
44 c1->
cd(2);
gPad->SetGrid();
gPad->SetFrameFillColor(33);
45 T->
Draw(
"Division>>hDiv",
"",
"goff");
49 T->
Draw(
"Division>>hDivFR",
"Nation==\"FR\"",
"goff");
60 legend->
AddEntry(h1,
"All nations",
"f");
61 legend->
AddEntry(h2,
"French only",
"f");
virtual const char * GetName() const
Returns name of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void SetBarOffset(Float_t offset=0.25)
This class displays a legend box (TPaveText) containing several legend entries.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
tomato 1-D histogram with a float per channel (see TH1 documentation)}
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
virtual void SetBarWidth(Float_t width=0.5)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
void Error(const char *location, const char *msgfmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
A TTree object has a header with a name and a title.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.