Skip to content

Reducing code in ConfigFile #168

@kreczko

Description

@kreczko

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions