// 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 NOMSTLISTADAPTER_H_SEEN
#define NOMSTLISTADAPTER_H_SEEN

#include "nomgadapter.h"
#include "stlist.h"


//-------------------------------------------------------------------------
// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet StarList 
//-------------------------------------------------------------------------

class NOMAdapter_StarList : public NObjMgrAdapter {
public:
				NOMAdapter_StarList(StarList* stl = NULL);
  virtual			~NOMAdapter_StarList();

  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:
  StarList* mStl;
};

// Class Interface NTuple pour StarList 
class NTupInt_StarList : public NTupleInterface {
public:
			NTupInt_StarList(StarList* stl);
  virtual		~NTupInt_StarList();
  virtual uint_4        NbLines() const ;
  virtual uint_4        NbColumns() const ;
  virtual r_8 *         GetLineD(int n) const ;
  virtual string        VarList_C(const char* nomx=NULL) const ;
protected:
  StarList* mStl;
  mutable r_8 mRet[12];
};


#endif
