diff --git a/src/Parameters/DataTypeMath.hh b/src/Parameters/DataTypeMath.hh
index 2d45c0a..df6b541 100644
--- a/src/Parameters/DataTypeMath.hh
+++ b/src/Parameters/DataTypeMath.hh
@@ -1131,6 +1131,28 @@ AMDA::Parameters::Tab2DData<Type1> operator /(const AMDA::Parameters::Tab2DData<
 }
 
 /**
+ * @brief Function total on all components of a vector => result is a scalar
+ */
+template <typename Type>
+Type total(const std::vector<Type>& a)
+{
+	Type sum;
+	sum << NotANumber();
+
+		for(int j = 0; j < a.size(); ++j)
+		{
+			if (isFinite(a[j]))
+			{
+				if (isNAN(sum))
+					sum = a[j];
+				else
+					sum += a[j];
+			}
+		}
+	return sum;
+}
+
+/**
  * @brief Function total on all components of a Tab2D => result is a scalar
  */
 template <typename Type>
--
libgit2 0.21.2