[295] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | // Adaptateur pour objets gere par NamedObjMgr (piapp)
|
---|
| 3 | // Reza 05/99
|
---|
| 4 | // LAL-IN2P3/CNRS CEA-DAPNIA
|
---|
| 5 |
|
---|
| 6 | #ifndef NOMGADAPTER_H_SEEN
|
---|
| 7 | #define NOMGADAPTER_H_SEEN
|
---|
| 8 |
|
---|
| 9 | #include "machdefs.h"
|
---|
| 10 | #include "ppersist.h"
|
---|
| 11 | #include "anydataobj.h"
|
---|
| 12 | #include "pidrawer.h"
|
---|
| 13 | #include "parradapter.h"
|
---|
| 14 | #include "ntupintf.h"
|
---|
[1207] | 15 | #include "generalfit.h"
|
---|
[295] | 16 |
|
---|
| 17 |
|
---|
| 18 | // Classe d'adaptateur d'objets de donnees pour la gestion d'objets
|
---|
| 19 | // nommes (NamedObjMgr) de piapp
|
---|
| 20 |
|
---|
| 21 | class NObjMgrAdapter {
|
---|
| 22 | public:
|
---|
| 23 | NObjMgrAdapter(AnyDataObj* o);
|
---|
| 24 | virtual ~NObjMgrAdapter();
|
---|
| 25 |
|
---|
| 26 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
| 27 |
|
---|
[1164] | 28 | // Returns the actual data-object
|
---|
[295] | 29 | virtual AnyDataObj* GetDataObj();
|
---|
| 30 |
|
---|
[1164] | 31 | // Returns the actual data-object type (class name)
|
---|
| 32 | virtual string GetDataObjType();
|
---|
| 33 |
|
---|
| 34 | // Returns a new data-object, cloning the original object
|
---|
[1315] | 35 | virtual AnyDataObj* CloneDataObj(bool share=false);
|
---|
[1164] | 36 |
|
---|
| 37 | // Copies data from object o
|
---|
| 38 | virtual void CopyFrom(AnyDataObj* o);
|
---|
| 39 |
|
---|
| 40 | // Returns a string representation of the object
|
---|
| 41 | virtual string ToString();
|
---|
| 42 | // Fills the object from a string
|
---|
| 43 | virtual void FillFromString();
|
---|
| 44 |
|
---|
[2999] | 45 | // Returns a string with synthetic information about the object
|
---|
| 46 | // opts : additional optional argument
|
---|
| 47 | virtual string GetInfoString(vector<string>& opts);
|
---|
| 48 | // Perform an operation on the object definded
|
---|
| 49 | // opts : operation definition
|
---|
| 50 | virtual int PerformOperation(vector<string>& opts);
|
---|
[2383] | 51 |
|
---|
[295] | 52 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 53 |
|
---|
[2975] | 54 | virtual void Print(ostream& os, int lev=0);
|
---|
[295] | 55 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
| 56 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
[344] | 57 |
|
---|
| 58 | // NTupleInterface* nti = GetNTupleInterface(adel)
|
---|
| 59 | // Retourne un objet de type NTupleInterface (nti), ainsi que adel
|
---|
| 60 | // si adel == true, le programme appelant doit faire delete de nti
|
---|
| 61 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[1207] | 62 |
|
---|
| 63 | // Methode pour l'interface GeneralFit.
|
---|
| 64 | // Si adel==true:
|
---|
| 65 | // le programme appelant doit faire delete du GeneralFitData retourne
|
---|
| 66 | virtual GeneralFitData* GetGeneralFitData(bool& adel
|
---|
| 67 | ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
|
---|
| 68 | ,double errscale=1.,double errmin=0.
|
---|
| 69 | ,int i1=0,int i2=-1,int j1=0,int j2=-1);
|
---|
| 70 | virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
|
---|
| 71 | virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
|
---|
| 72 |
|
---|
[295] | 73 | protected:
|
---|
| 74 | AnyDataObj* mObj;
|
---|
| 75 | };
|
---|
| 76 |
|
---|
| 77 | #endif
|
---|