source: Sophya/trunk/SophyaPI/PIext/nobjmgr.h@ 318

Last change on this file since 318 was 295, checked in by ercodmgr, 26 years ago

Mise aux "normes" version DPC/Planck - Gestion des objets a travers

un adaptateur/interface NTuple par NamedObjMgr.
Enregistrement d'objets et de l'adaptateur (I/O PPersist, display, ...)
par ServNobjMgr .... Reza 13/05/99

File size: 4.8 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe de gestion d objets nommes pour piapp
3// Reza Aout 97 , Juillet,Aout 98
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef NOBJMGR_H_SEEN
7#define NOBJMGR_H_SEEN
8
9#include "ppersist.h"
10#include "dlftypes.h"
11#include "anydataobj.h"
12
13class NObjMgrAdapter;
14class PIStdImgApp;
15class Services2NObjMgr;
16
17class NamedObjMgr {
18public:
19// Constructeur et destructeur
20 NamedObjMgr();
21 virtual ~NamedObjMgr();
22
23 virtual void SetImgApp(PIStdImgApp* app);
24
25
26// Pour ajouter, supprimer et acceder aux objets PPersist
27 virtual void AddObj(AnyDataObj* obj, string& nom, bool crd=false);
28 virtual void DelObj(string const& nom, bool fgd=true);
29 virtual void DelObjects(string const& patt, bool fgd=true);
30 virtual AnyDataObj* GetObj(string const& nom);
31 virtual void RenameObj(string const& nom, string& nomnew);
32 virtual string LastObjName(); // Renvoie le nom du dernier objet ajoute
33
34// Lecture et sauvegarde des objets sur fichier
35 virtual void ReadObj(PInPersist& s, int num=-1);
36 virtual void ReadObj(string const & nomppf, string nobj="");
37 virtual void ReadAll(string const & nomppf);
38 virtual void ReadFits(string const & flnm, string nobj="");
39 virtual void SaveObj(string const& nom, POutPersist& s);
40 virtual void SaveAll(string const& nomppf);
41 virtual void SaveFits(string const& nom, string const & flnm);
42
43// Info sur les objets
44 virtual void ListObjs();
45 virtual void PrintObj(string const& nom);
46
47// Affichage des objets
48 virtual void DisplayObj(string const& nom, string dopt="");
49 virtual void DisplayImage(string const& nom, string dopt="");
50 virtual void DisplaySurf3D(string const& nom, string dopt="");
51 virtual void DisplayNT(string const& nom, string& nmx, string& nmy, string& nmz,
52 string& erx, string& ery, string& erz, string dopt="");
53 virtual void DisplayGFD(string const& nom, string& numvarx, string& numvary, string& err, string dopt="");
54
55 virtual void SetGraphicAttributes(string gratt="");
56 virtual void SetGraphicWinZone(int nzx, int nzy, bool fcr=false);
57
58
59// Trace d'expression de NTuple, et d'autres objets
60 virtual void DisplayPoints2D(string const& nom, string& expx, string& expy,
61 string& experrx, string& experry,
62 string& expcut, string dopt="");
63 virtual void DisplayPoints3D(string const& nom, string& expx, string& expy, string& expz,
64 string& expcut, string dopt="");
65// Projection d'expressions dans histogramme (et trace)
66 virtual void ProjectH1(string const& nom, string& expx, string& expwt, string& expcut,
67 string& nomh1, string dopt="");
68 virtual void ProjectH2(string const& nom, string& expx, string& expy, string& expwt,
69 string& expcut, string& nomh2, string dopt="");
70 virtual void ProjectHProf(string const& nom, string& expx, string& expy, string& expwt,
71 string& expcut, string& nomprof, string dopt="");
72// Projection d'expression dans vecteurs et dans n-tuple
73 virtual void FillVect(string const& nom, string& expx, string& expcut,
74 string& nomvec, string dopt="");
75 virtual void FillNT(string const& nom, string& expx, string& expy, string& expz,
76 string& expt, string& expcut, string& nomnt);
77 virtual void FillGFD(string const& nom, string& expx, string& expy, string& expz,
78 string& experr, string& expcut, string& nomgfd);
79
80// Trace de fonctions 1-D , 2-D
81 virtual void PlotFunc(string& expfunc, float xmin, float xmax, int np=100, string dopt="");
82 virtual void PlotFunc2D(string& expfunc, float xmin, float xmax, float ymin, float ymax,
83 int npx=50, int npy=50, string dopt="");
84 virtual void PlotFunc(DlFunctionOfX f, float xmin, float xmax, int np=100, string dopt="");
85 virtual void PlotFunc2D(DlFunctionOfXY f, float xmin, float xmax, float ymin, float ymax,
86 int npx=50, int npy=50, string dopt="");
87
88// Methodes de fit, a rajouter (pour CMV , deux methodes H1 H2 ou 1 seule ??) ...
89 virtual void Fit12D(string const& nom, string& func,
90 string par,string step,string min,string max,string opt);
91
92// Acces au PIApplication et a la classe de service
93 virtual PIStdImgApp* GetImgApp();
94 virtual Services2NObjMgr* GetServiceObj();
95
96protected :
97 virtual NObjMgrAdapter* GetObjAdapter(string const& nom);
98};
99
100
101#endif
Note: See TracBrowser for help on using the repository browser.