Example of using this class
void
{
if (!gROOT->GetClass("GraphSysErr"))
gROOT->LoadMacro("GraphSysErr.C+g");
gStyle->SetErrorX(.2);
gStyle->SetEndErrorSize(10);
gse->
SetKey(
"laboratory",
"The Center");
gse->
SetKey(
"accelerator",
"Mega Collider");
gse->
SetKey(
"detector",
"Huge Experiment");
gse->
SetKey(
"author",
"Christensen");
gse->
SetKey(
"reference",
"Jour.All.Things A1,999");
gse->
SetKey(
"doi",
"9999-9999-9999-9999");
gse->
SetKey(
"abstract",
"The data");
gse->
SetKey(
"location",
"In the paper");
gse->
SetKey(
"reackey",
"graviton -> tachyons");
gse->
AddQualifier(
"question",
"Life, universe, and everything");
TH1* h =
new TH1F(
"h",
"h", 30, -3, 3);
h->Sumw2();
h->SetDirectory(0);
h->FillRandom("gaus",1000);
h->Scale(1./1000, "width");
for (
Int_t i = 0; i < h->GetNbinsX(); i++) {
Double_t x = h->GetXaxis()->GetBinCenter(bin);
Double_t w = h->GetXaxis()->GetBinWidth(bin);
}
delete h;
TCanvas*
c =
new TCanvas(
"c",
"c", 1400, 1000);
c->SetFillColor(0);
c->SetFillStyle(0);
c->SetTopMargin(0.01);
c->SetRightMargin(0.01);
const char* option = "STACK stat axis quad split max west";
if (!fit)
else
gse->
Fit(
"gaus",
"SQ", option, -3, 3);
TLegend* l = c->BuildLegend(0.7,0.7,0.97,0.97);
l->SetFillColor(0);
l->SetFillStyle(0);
l->SetBorderSize(0);
c->Modified();
c->Update();
c->cd();
c->Print("Example.png");
}