TString filename =
"cernstaff.root";
if (fileNotFound) {
TString macroName = filedir +
"cernbuild.C";
gROOT->ProcessLineFast(
"cernbuild()");
}
Error(
"hbars",
"file cernstaff.root not found");
return 0;
}
Error(
"hbars",
"Tree T is not present in file %s",
f->GetName() );
return 0;
}
c1->cd(1);
gPad->SetGrid();
gPad->SetLogx();
gPad->SetFrameFillColor(33);
T->Draw(
"Nation",
"",
"hbar2");
c1->cd(2);
gPad->SetGrid();
gPad->SetFrameFillColor(33);
T->Draw(
"Division>>hDiv",
"",
"goff");
T->Draw(
"Division>>hDivFR",
"Nation==\"FR\"",
"goff");
}
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::kUseGeneralPurpose, 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.