Exemplo n.º 1
0
///
/// finds a variable within a RooArgSet with a specific name sub-string
/// return all variables containing the sub-string in a std::vector
///
std::vector<TString> Utils::getParsWithName(const TString& subString, const RooArgSet& set){
	std::string vars = set.contentsString();
	std::vector<std::string>  _names;
	std::vector<TString>      _results;
	boost::split(_names,vars,boost::is_any_of(","));
	for( std::string str : _names){
		std::size_t found = str.find(subString);
		if(found != std::string::npos){
			_results.push_back(TString(str));
		}
	}
	return _results;
}