source: Sophya/trunk/SophyaPI/PIext/servnobjm.h@ 326

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

1/ NTupleInterface mis ds Outils++ et complete -
2/ Les PINtuple et PINtup3D utilisent maintenant NTupleInterface
3/ Debut modification interface NObjMgr - Reza 23/6/99

File size: 3.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe de services destinee a NamedObjMgr pour piapp
3// Reza Aout 98
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef SERVNOBJM_H_SEEN
7#define SERVNOBJM_H_SEEN
8
9#include "machdefs.h"
10#include <string>
11#include <list>
12#include <map>
13#if defined(__KCC__)
14using std::string ;
15#include <list.h>
16#include <map.h>
17#endif
18
19#include "pdlmgr.h"
20#include "dlftypes.h"
21#include "nomgadapter.h"
22
23class NTuple;
24class Histo;
25class Histo2D;
26class HProf;
27class PIStdImgApp;
28
29class Services2NObjMgr {
30public:
31 Services2NObjMgr(PIStdImgApp* app, string& tmpdir);
32 ~Services2NObjMgr();
33
34// Pour enregistrer les objets de donnees et leurs adaptateurs
35 void RegisterClass(AnyDataObj* o, NObjMgrAdapter* oa);
36// Pour recuperer l'adaptateur pour un objet o
37 NObjMgrAdapter* GetAdapter(AnyDataObj* o);
38
39 inline void SetImgApp(PIStdImgApp* app) {mImgapp = app; }
40
41 void Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
42 string& expwt, string& expcut,
43 NTuple* nt=NULL, Histo* h1=NULL,
44 Histo2D* h2=NULL, HProf* hp=NULL);
45 PlotExprFunc LinkExprFunc(string& vardec, string& expx, string& expy, string& expz,
46 string& wt, string& cut);
47 DlFunction LinkFunctionFromFile(string const & fname, string const & funcname);
48 void CloseDLL();
49
50// Trace de fonctions 1-D , 2-D
51 virtual void PlotFunc(string const & expfunc, float xmin, float xmax, int np=100, string dopt="");
52 virtual void PlotFunc2D(string const & expfunc, float xmin, float xmax, float ymin, float ymax,
53 int npx=50, int npy=50, string dopt="");
54 virtual void PlotFuncFrCFile(string const & fname, string const & func, float xmin, float xmax,
55 int np=100, string dopt="");
56 virtual void PlotFunc2DFrCFile(string const & fname, string const & func, float xmin, float xmax,
57 float ymin, float ymax, int npx=50, int npy=50, string dopt="");
58 virtual void PlotFunc(DlFunctionOfX f, float xmin, float xmax, int np=100, string dopt="");
59 virtual void PlotFunc2D(DlFunctionOfXY f, float xmin, float xmax, float ymin, float ymax,
60 int npx=50, int npy=50, string dopt="");
61
62// Utilitaires divers
63 string FileName2Name(string const & fn);
64 int DecodeDispOption(string& dopt, bool& fgsrgr);
65
66protected:
67 void InitGrAttNames();
68
69// Pour enregister les objets et leurs adaptateurs pour NamedObjMgr
70 struct dataobj_adapter {
71 AnyDataObj* obj; NObjMgrAdapter* obja;
72 };
73 typedef list<dataobj_adapter> ObjAdaptList;
74 ObjAdaptList objadaplist;
75
76// Variables membre , en public pour le moment
77 struct gratt_item {
78 int a1, a2;
79 };
80 typedef map<string, gratt_item, less<string> > GrAttNames;
81
82// Pour les changements d'attributs graphiques / de visualisation
83 GrAttNames GrAcolors;
84 GrAttNames GrAlines;
85 GrAttNames GrAmarkers;
86 GrAttNames GrAfonts;
87 GrAttNames GrAcmap;
88 GrAttNames GrAzoom;
89 GrAttNames GrAaxes;
90
91 PDynLinkMgr * dynlink; // shared-lib lib.so
92 string TmpDir; // Pour fichiers temporaires
93
94 PIStdImgApp* mImgapp;
95
96};
97
98
99#endif
Note: See TracBrowser for help on using the repository browser.