Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions FileParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ void FileParser::OpenFile(TString fname, TString cyclename)
fname.Prepend(Prefix);
}

// check if input filename has .root extension
// necessary for extracting process name and creating ratio plots
if (!fname.EndsWith(".root")){
cerr << "fInputFiles entry must end with .root, instead got " << fname << endl;;
exit(EXIT_FAILURE);
}

// check if name consists of a wildcard, if so use hadd to combine histograms
if (fname.Contains("*")){
TString target(fname);
Expand Down Expand Up @@ -154,6 +161,12 @@ void FileParser::OpenThetaFile(TString cyclename)

// fname = target;

// check if input filename has .root extension
// necessary for extracting process name and creating ratio plots
if (!fname.EndsWith(".root")){
cerr << "fCycleName must end with .root, instead got " << fname << endl;;
exit(EXIT_FAILURE);
}

if (debug) cout << "Opening file with name " << fname << "..." << endl;
m_file = new TFile(fname, "READ");
Expand Down
2 changes: 1 addition & 1 deletion SPlotter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ vector<SHist*> SPlotter::CalcRatios(vector<SHist*> hists)
Double_t rel_err = err / val;
rdhist->SetBinError(ibin, rel_err * rdhist->GetBinContent(ibin) );
}
rdhist->GetYaxis()->SetTitle(rd->GetProcessName() + " / BG");
rdhist->GetYaxis()->SetTitle(rd->GetLegName() + " / BG");
if (bSingleEPS){
SingleEPSRatioCosmetics(rdhist);
} else {
Expand Down