15 filedir +=
TString(
"/../tree/");
16 TString filename =
"cernstaff.root";
21 TString macroName = filedir +
"cernbuild.C";
23 gROOT->ProcessLineFast(
"cernbuild()");
27 Error(
"hbars",
"file cernstaff.root not found");
32 Error(
"hbars",
"Tree T is not present in file %s",f->
GetName() );
41 c1->
cd(1);
gPad->SetGrid();
gPad->SetLogx();
gPad->SetFrameFillColor(33);
42 T->
Draw(
"Nation",
"",
"hbar2");
45 c1->
cd(2);
gPad->SetGrid();
gPad->SetFrameFillColor(33);
46 T->
Draw(
"Division>>hDiv",
"",
"goff");
50 T->
Draw(
"Division>>hDivFR",
"Nation==\"FR\"",
"goff");
61 legend->
AddEntry(h1,
"All nations",
"f");
62 legend->
AddEntry(h2,
"French only",
"f");
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.
1-D histogram with a float per channel (see TH1 documentation)}
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
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.
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
void Error(const char *location, const char *msgfmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
virtual const char * GetName() const
Returns name of object.
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.
A TTree object has a header with a name and a title.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.