Index: trunk/SophyaPI/PIext/exclude
===================================================================
--- trunk/SophyaPI/PIext/exclude	(revision 667)
+++ trunk/SophyaPI/PIext/exclude	(revision 670)
@@ -1,4 +1,5 @@
 nomtmatvecadapter.cc
 nomskymapadapter.cc
+nomspecrespadapter.cc
 pitvmaad.cc
 modrecst.cc
Index: trunk/SophyaPI/PIext/nomspecrespadapter.cc
===================================================================
--- trunk/SophyaPI/PIext/nomspecrespadapter.cc	(revision 670)
+++ trunk/SophyaPI/PIext/nomspecrespadapter.cc	(revision 670)
@@ -0,0 +1,140 @@
+#include "machdefs.h"
+#include <stdlib.h>
+#include <typeinfo>
+#include <iostream.h>
+#include <string>
+
+#include "nomspecrespadapter.h"
+#include "specrespvector.h"
+#include "gaussfilt.h"
+#include "pidrawer.h"
+
+// ------ Classe de Drawer pour tracer Y = Transmission(nu = X) 
+class PISpectralResponseDrawer : public PIDrawer {
+public :
+ 	       PISpectralResponseDrawer(SpectralResponse* sr, bool ad=false);
+ 	       ~PISpectralResponseDrawer();
+  virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
+  virtual void UpdateLimits();
+
+protected:
+SpectralResponse * mSR;
+bool mAd;
+};
+
+PISpectralResponseDrawer::PISpectralResponseDrawer(SpectralResponse* sr, bool ad)
+{
+mSR = sr;
+mAd = ad;
+}
+
+PISpectralResponseDrawer::~PISpectralResponseDrawer()
+{
+if (mAd && mSR)  delete mSR;
+}
+
+void
+PISpectralResponseDrawer::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax)
+{
+  if (!mSR) return;
+  PIGrCoord x1, x2, y1, y2;
+  g->GetGrSpace(x1, x2, y1, y2);
+  double xMax = x2;
+  double xMin = x1;
+  double yMax = y2;
+  double yMin = y1;
+  double xStep = (xMax - xMin)/100;
+  double xOld = xMin;
+  double yOld = mSR->transmission(xMin);
+  double x,y;
+  for (x = xMin+xStep; x<xMax; x+=xStep) {
+    y = mSR->transmission(x);
+    if (y>yMin && yOld>yMin && 
+        y<yMax && yOld<yMax) 
+           g->DrawLine(xOld, yOld, x, y);
+    xOld = x;
+    yOld = y;
+  }
+}
+
+void
+PISpectralResponseDrawer::UpdateLimits()
+{
+  if (!mSR) return;
+  double xmin, xmax;
+  double ymin, ymax;
+  xmin = mSR->minFreq();
+  xmax = mSR->maxFreq();
+  double dx = (xmax-xmin)*0.025;
+  xmin -= dx;  xmax += dx;
+  ymin = 0.;
+  ymax = mSR->peakTransmission()*1.05;
+  SetLimits(xmin, xmax, ymin, ymax);
+//  cout << " DBG - " << xmin << "," << xmax << "   " << ymin << "," << ymax << endl;
+}
+//-------------------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet SpectralResponse
+//-------------------------------------------------------------------------
+
+/* --Methode-- */
+NOMAdapter_SpectralResponse::NOMAdapter_SpectralResponse(SpectralResponse* o)
+  : NObjMgrAdapter(o)
+{
+mSR = o;
+}
+
+/* --Methode-- */
+NOMAdapter_SpectralResponse::~NOMAdapter_SpectralResponse()
+{
+}
+
+/* --Methode-- */
+NObjMgrAdapter* NOMAdapter_SpectralResponse::Clone(AnyDataObj* o)
+{
+SpectralResponse* sr = dynamic_cast<SpectralResponse *>(o);
+if (sr) return ( new NOMAdapter_SpectralResponse(sr) );
+return ( new NObjMgrAdapter(o) );
+}
+
+
+/* --Methode-- */
+void NOMAdapter_SpectralResponse::SavePPF(POutPersist& pos, string const & nom)
+{
+  GaussianFilter* gf = dynamic_cast<GaussianFilter *> (mSR);
+  SpecRespVec*    vecFilt   = dynamic_cast<SpecRespVec    *> (mSR);
+  if (gf) { // C'est un GaussianFilter ....
+    ObjFileIO<GaussianFilter> oio(gf);
+    oio.Write(pos, nom);
+  }
+  else if (vecFilt) {
+    ObjFileIO<SpecRespVec> oio(vecFilt);
+    oio.Write(pos, nom);
+  }
+  else {
+   string s = typeid(*mSR).name();
+   cout << "NOMAdapter_SpectralResponse::SavePPF() - Error : Not supported for " << s << endl;
+  }
+}
+
+/* --Methode-- */
+void NOMAdapter_SpectralResponse::Print(ostream& os)
+{
+os << (*mSR);
+}
+
+/* --Methode-- */
+PIDrawer* NOMAdapter_SpectralResponse::GetDrawer(string & dopt)
+{
+return(new PISpectralResponseDrawer(mSR, false));
+}
+
+
+/* --Methode-- 
+NTupleInterface* NOMAdapter_SpectralResponse::GetNTupleInterface(bool& adel)
+{ 
+adel = true;
+return( new NTupInt_SpectralResponse(mSR) );
+}
+*/
+
+
Index: trunk/SophyaPI/PIext/nomspecrespadapter.h
===================================================================
--- trunk/SophyaPI/PIext/nomspecrespadapter.h	(revision 670)
+++ trunk/SophyaPI/PIext/nomspecrespadapter.h	(revision 670)
@@ -0,0 +1,38 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Adaptateur d objets (pour NamedObjMgr) pour Histos/NTuple
+//                                    Reza 05/99
+//  LAL-IN2P3/CNRS               CEA-DAPNIA     
+ 
+#ifndef NOMSPECRESPADAPTER_H_SEEN
+#define NOMSPECRESPADAPTER_H_SEEN
+
+#include "nomgadapter.h"
+#include "specresp.h"
+
+
+//-------------------------------------------------------------------------
+// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet SpectralResponse
+//-------------------------------------------------------------------------
+
+class NOMAdapter_SpectralResponse : public NObjMgrAdapter {
+public:
+				NOMAdapter_SpectralResponse(SpectralResponse* sr = NULL);
+  virtual			~NOMAdapter_SpectralResponse();
+
+  virtual NObjMgrAdapter*	Clone(AnyDataObj* o);
+
+  //  virtual void			ReadFits(string const & flnm);
+  //  virtual void			SaveFits(string const & flnm);
+  virtual void			SavePPF(POutPersist& s, string const & nom);
+
+  virtual void			Print(ostream& os);
+  virtual PIDrawer*		GetDrawer(string& dopt);
+//  virtual NTupleInterface*	GetNTupleInterface(bool& adel);
+
+protected:
+  SpectralResponse* mSR;
+};
+
+
+
+#endif
Index: trunk/SophyaPI/PIext/piinit.cc
===================================================================
--- trunk/SophyaPI/PIext/piinit.cc	(revision 667)
+++ trunk/SophyaPI/PIext/piinit.cc	(revision 670)
@@ -18,4 +18,9 @@
 #include "spheregorski.h"
 #include "localmap.h"
+
+#include "specrespvector.h"
+#include "gaussfilt.h"
+#include "nomspecrespadapter.h"
+
 #endif
 
@@ -85,4 +90,6 @@
   serv->RegisterClass(new SphereGorski<complex<double> >, new NOMAdapter_PixelMap<complex<double> > );
 
+  serv->RegisterClass(new GaussianFilter, new NOMAdapter_SpectralResponse );
+  serv->RegisterClass(new SpecRespVec, new NOMAdapter_SpectralResponse );
 #endif
 
