Index: trunk/SophyaLib/HiStats/Makefile
===================================================================
--- trunk/SophyaLib/HiStats/Makefile	(revision 2195)
+++ trunk/SophyaLib/HiStats/Makefile	(revision 2244)
@@ -5,5 +5,5 @@
 	rm -f $(OBJ)hisprof.o $(OBJ)histinit.o $(OBJ)histos.o $(OBJ)histos2.o $(OBJ)ntupintf.o $(OBJ)ntuple.o $(OBJ)xntuple.o
 	rm -f $(LIB)libHiStats.a
-$(LIB)libHiStats.a : $(OBJ)hisprof.o $(OBJ)histinit.o $(OBJ)histos.o $(OBJ)histos2.o $(OBJ)ntupintf.o $(OBJ)ntuple.o $(OBJ)xntuple.o
+$(LIB)libHiStats.a : $(OBJ)hisprof.o $(OBJ)histinit.o $(OBJ)histos.o $(OBJ)histos2.o $(OBJ)ntupintf.o $(OBJ)ntuple.o $(OBJ)proxtuple.o $(OBJ)xntuple.o
 	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
 ifeq ($(CXX),cxx)
Index: trunk/SophyaLib/HiStats/objlist.list
===================================================================
--- trunk/SophyaLib/HiStats/objlist.list	(revision 2195)
+++ trunk/SophyaLib/HiStats/objlist.list	(revision 2244)
@@ -5,3 +5,4 @@
 ntupintf.o
 ntuple.o
+proxtuple.o
 xntuple.o
Index: trunk/SophyaLib/HiStats/proxtuple.cc
===================================================================
--- trunk/SophyaLib/HiStats/proxtuple.cc	(revision 2244)
+++ trunk/SophyaLib/HiStats/proxtuple.cc	(revision 2244)
@@ -0,0 +1,53 @@
+//--------------------------------------------------------------------------
+//
+// Description:
+// 	class ProxTuple : see header file for description.
+//
+//------------------------------------------------------------------------
+//-----------------------
+// This Class's Header --
+//-----------------------
+#include "proxtuple.h"
+//---------------
+// STL
+//-----------------
+using namespace std;
+//-------------------------------
+// Collaborating Class Headers --
+//-------------------------------
+//-----------------------------------------------------------------------
+// Local Macros, Typedefs, Structures, Unions and Forward Declarations --
+//-----------------------------------------------------------------------
+
+
+//-----------------
+// Member functions --
+//-----------------
+void
+ProxTuple::fill(float v,const char* n){
+
+  if (_tuple==0) {
+    _name.push_back(string(n));
+  }
+  _val.push_back(v);
+
+}
+
+void
+ProxTuple::dump(){
+
+  int N=_val.size();
+  if (_tuple==0) {
+    char** names=new (char*)[N];
+    for (int i=0;i<N;i++) names[i]=(char*)_name[i].c_str();
+    _tuple=new NTuple(N,names);
+  }
+  float* xnt=new float[N];
+  for (int i=0;i<N;i++) xnt[i]=_val[i];
+  _tuple->Fill(xnt);
+
+  delete xnt;
+  _val.clear();
+
+
+}
Index: trunk/SophyaLib/HiStats/proxtuple.h
===================================================================
--- trunk/SophyaLib/HiStats/proxtuple.h	(revision 2244)
+++ trunk/SophyaLib/HiStats/proxtuple.h	(revision 2244)
@@ -0,0 +1,68 @@
+//--------------------------------------------------------------------------
+//
+// Description:
+// 	class ProxTuple :
+//
+// un proxy pour ntuple sophya pour une interface + user friendly
+// example d'utilisation:
+/*
+
+  ProxTuple tupleCl;
+  for (i=0;i<N;i++){
+    tupleCl.fill(cl.l(i),"l");
+    tupleCl.fill(i,"i");
+    // etc...
+    
+    tupleCl.dump();
+  }
+   POutPersist pos(string("ct.ppf"));
+  pos.PutObject(tupleCl.tuple(),"tupleCl");
+*/
+//
+// Author List:
+//	S.Plaszczynski 
+//
+// History (add to end):
+//	S.Plaszczynski  sam oct 26 16:22:27 CEST 2002 (creation)
+//
+// Contact: 
+//	plaszczy@lal.in2p3.fr
+//------------------------------------------------------------------------
+#ifndef ProxTuple_hh
+#define ProxTuple_hh
+
+//forward declarations
+
+#include<ntuple.h>
+#include<string>
+
+class ProxTuple
+{
+
+public:
+
+  //constructors
+  ProxTuple():_tuple(0){};
+
+  // destructor
+  ~ProxTuple() {delete _tuple;};
+
+  //member functions
+  void fill(float v,const char*);
+  inline void fill(double v,const char* c) {return fill((float)v,c);}
+  inline void fill(int v,const char* c){return fill((float)v,c);}
+  void dump();
+  
+  //acces au ntuple
+  inline NTuple& tuple(){return *_tuple;}
+  
+
+private:
+  NTuple* _tuple;
+  vector<string> _name;
+  vector<float> _val;
+  
+};
+
+#endif
+
