From 974aced9d22b801c839d312a5bf8c51e625f46c0 Mon Sep 17 00:00:00 2001
From: Baptiste Mouginot <mouginot.baptiste@gmail.com>
Date: Fri, 18 Jul 2014 12:23:50 +0000
Subject: [PATCH] add the Anti-mater Error !!

and the add(Z,A,I,Q) method in IsotopicVector

git-svn-id: svn+ssh://svn.in2p3.fr/class@355 0e7d625b-0364-4367-a6be-d5be4a48d228
---
 source/branches/CLASSV3/include/IsotopicVector.hxx | 3 +++
 source/branches/CLASSV3/src/ZAI.cxx                | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/source/branches/CLASSV3/include/IsotopicVector.hxx b/source/branches/CLASSV3/include/IsotopicVector.hxx
index 738d2580d..24e86e368 100755
--- a/source/branches/CLASSV3/include/IsotopicVector.hxx
+++ b/source/branches/CLASSV3/include/IsotopicVector.hxx
@@ -92,6 +92,9 @@ public :
 	void	Add(const ZAI& zai, double quantity); 		//!< Add Quantity gramme of the ZAI Element
 	void	Add(const IsotopicVector& isotopicvector); 	//!< Add IsotopicVector to the existing IsotopicVector
 	void	Add(const map<ZAI ,double>& quantity);		//!< Add IsotopicVector to the existing IsotopicVector
+	void	Add(int Z, int A, in I, double quantity)
+		{ (*this).Add(ZAI(Z,A,I), quantity); } 		//!< Add Quantity gramme of the ZAI Element
+
 
 	void	Need(const ZAI& zai, double quantity);		//!< Fill the fIsotopicQuantityNeeded
 	void	Need(const IsotopicVector& isotopicvector);	//!< Fill the fIsotopicQuantityNeeded
diff --git a/source/branches/CLASSV3/src/ZAI.cxx b/source/branches/CLASSV3/src/ZAI.cxx
index 59a94275b..31ee39635 100755
--- a/source/branches/CLASSV3/src/ZAI.cxx
+++ b/source/branches/CLASSV3/src/ZAI.cxx
@@ -38,6 +38,14 @@ ZAI::ZAI()
 ZAI::ZAI(int Z, int A, int I)
 {
 
+	if( Z > A )
+	{
+		cout << "!!!ERROR!!! " << "[" << __FILE__ << ":" << __FUNCTION__ << "]" << endl;
+		cout << "!!!ERROR!!!  Z:" << Z << " is higher than A: " << A << endl;
+		cout << "!!!ERROR!!!  CLASS did not manage yet anti-mater!!! Update comming soon !!!"  << endl;
+		exit(1);
+	}
+
 	fZ=Z;
 	fA=A;
 	fI=I;
-- 
GitLab