Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
+7 -5
View File
@@ -95,17 +95,19 @@ inline std::string tos(bool a_value){
inline std::string tos(const std::string& a_value){return a_value;}
template <class T>
inline std::string tos(const std::vector<T>& a_value,
const std::string& a_sep = "\n" ) {
unsigned int number = a_value.size();
inline std::string tos(const std::vector<T>& a_vals,
const std::string& a_sep = "\n",
bool a_sep_at_end = false) {
unsigned int number = a_vals.size();
if(number<=0) return "";
std::string result;
number--;
for(unsigned int index=0;index<number;index++) {
result += tos(a_value[index]);
result += tos(a_vals[index]);
result += a_sep;
}
result += tos(a_value[number]);
result += tos(a_vals[number]);
if(a_sep_at_end) result += a_sep;
return result;
}