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");
61 legend->
AddEntry(h2,
"French only",
"f");
void Error(const char *location, const char *msgfmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)}
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
virtual void SetBarWidth(Float_t width=0.5)
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
virtual void SetBarOffset(Float_t offset=0.25)
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TTree represents a columnar dataset.