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

Reducing code in ConfigFile #168

Open
kreczko opened this issue Jun 17, 2015 · 0 comments
Open

Reducing code in ConfigFile #168

kreczko opened this issue Jun 17, 2015 · 0 comments
Milestone

Comments

@kreczko
Copy link
Member

kreczko commented Jun 17, 2015

Currently we have a function for each parameter..time to introduce templates

template <type T> T getParameter(const std::string& name) const {
    if (programOptions.count(name))
        return programOptions["TTbarLikelihoodFile"].as<T>();
    else
        return boost::any_cast<T>parameters_[name];
}

where parameters_ is a map of std::string and boost::any.

or something like that.

Similar with histograms from files which can be one function like

boost::shared_ptr<TH1F> getHistogramFromFile(const std::string& histogram, std::string& file)
@kreczko kreczko added this to the 13 TeV proper milestone Jul 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant