Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zmumumerge: post-merge comments to #40346 #40371

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 14 additions & 6 deletions Alignment/OfflineValidation/bin/Zmumumerge.cc
Expand Up @@ -202,12 +202,20 @@ void Fitting_GetMassmeanVSvariables(TString inputfile_name, TString output_path)
}

const static int max_file_number = 10;
void Draw_TH1D_forMultiRootFiles(vector<TString> file_names,
vector<TString> label_names,
vector<int> colors,
vector<int> styles,
TString th1d_name,
TString output_name) {
void Draw_TH1D_forMultiRootFiles(const vector<TString>& file_names,
const vector<TString>& label_names,
const vector<int>& colors,
const vector<int>& styles,
const TString& th1d_name,
const TString& output_name) {
if (file_names.empty() || label_names.empty()) {
cout << "Provided an empty list of file and label names" << std::endl;
return;
}

// do not allow the list of files and labels names to differ
assert(file_names.size() == label_names.size());

TH1D* th1d_input[max_file_number];
TFile* file_input[max_file_number];
for (auto const& filename : file_names | boost::adaptors::indexed(0)) {
Expand Down