1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Adaptateur d objets (pour NamedObjMgr) pour Histos/NTuple
|
---|
3 | // Reza 05/99
|
---|
4 | // LAL-IN2P3/CNRS CEA-DAPNIA
|
---|
5 |
|
---|
6 | #ifndef NOMHISTADAPTER_H_SEEN
|
---|
7 | #define NOMHISTADAPTER_H_SEEN
|
---|
8 |
|
---|
9 | #include "nomgadapter.h"
|
---|
10 | #include "histos.h"
|
---|
11 | #include "histos2.h"
|
---|
12 | #include "hisprof.h"
|
---|
13 | #include "ntuple.h"
|
---|
14 |
|
---|
15 | //-------------------------------------------------------------------------
|
---|
16 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Histo / HProf
|
---|
17 | //-------------------------------------------------------------------------
|
---|
18 |
|
---|
19 | class NOMAdapter_Histo : public NObjMgrAdapter {
|
---|
20 | public:
|
---|
21 | NOMAdapter_Histo(Histo* h = NULL);
|
---|
22 | virtual ~NOMAdapter_Histo();
|
---|
23 |
|
---|
24 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
25 |
|
---|
26 | // virtual void ReadFits(string const & flnm);
|
---|
27 | // virtual void SaveFits(string const & flnm);
|
---|
28 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
29 |
|
---|
30 | virtual void Print(ostream& os);
|
---|
31 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
32 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
33 |
|
---|
34 | protected:
|
---|
35 | Histo* mHis;
|
---|
36 | };
|
---|
37 |
|
---|
38 | // Class Interface NTuple pour Histo / HProf
|
---|
39 | class NTupInt_Histo : public NTupleInterface {
|
---|
40 | public:
|
---|
41 | NTupInt_Histo(Histo* h);
|
---|
42 | virtual ~NTupInt_Histo();
|
---|
43 | virtual uint_4 NbLines() const ;
|
---|
44 | virtual uint_4 NbColumns() const ;
|
---|
45 | virtual r_8 * GetLineD(int n) const ;
|
---|
46 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
47 | protected:
|
---|
48 | Histo* mHis;
|
---|
49 | mutable r_8 mRet[4];
|
---|
50 | };
|
---|
51 |
|
---|
52 | //-------------------------------------------------------------------------
|
---|
53 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Histo2D
|
---|
54 | //-------------------------------------------------------------------------
|
---|
55 |
|
---|
56 | class NOMAdapter_Histo2D : public NObjMgrAdapter {
|
---|
57 | public:
|
---|
58 | NOMAdapter_Histo2D(Histo2D* h = NULL);
|
---|
59 | virtual ~NOMAdapter_Histo2D();
|
---|
60 |
|
---|
61 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
62 |
|
---|
63 | // virtual void ReadFits(string const & flnm);
|
---|
64 | // virtual void SaveFits(string const & flnm);
|
---|
65 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
66 |
|
---|
67 | virtual void Print(ostream& os);
|
---|
68 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
69 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
70 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
71 |
|
---|
72 | protected:
|
---|
73 | Histo2D* mHis;
|
---|
74 | };
|
---|
75 |
|
---|
76 | // Class Interface NTuple pour Histo2D
|
---|
77 | class NTupInt_Histo2D : public NTupleInterface {
|
---|
78 | public:
|
---|
79 | NTupInt_Histo2D(Histo2D* h);
|
---|
80 | virtual ~NTupInt_Histo2D();
|
---|
81 | virtual uint_4 NbLines() const ;
|
---|
82 | virtual uint_4 NbColumns() const ;
|
---|
83 | virtual r_8 * GetLineD(int n) const ;
|
---|
84 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
85 | protected:
|
---|
86 | Histo2D* mHis;
|
---|
87 | mutable r_8 mRet[6];
|
---|
88 | };
|
---|
89 |
|
---|
90 |
|
---|
91 | //-------------------------------------------------------------------------
|
---|
92 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet NTuple
|
---|
93 | //-------------------------------------------------------------------------
|
---|
94 |
|
---|
95 | class NOMAdapter_NTuple : public NObjMgrAdapter {
|
---|
96 | public:
|
---|
97 | NOMAdapter_NTuple(NTuple* h = NULL);
|
---|
98 | virtual ~NOMAdapter_NTuple();
|
---|
99 |
|
---|
100 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
101 |
|
---|
102 | // virtual void ReadFits(string const & flnm);
|
---|
103 | // virtual void SaveFits(string const & flnm);
|
---|
104 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
105 |
|
---|
106 | virtual void Print(ostream& os);
|
---|
107 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
108 |
|
---|
109 | protected:
|
---|
110 | NTuple* mNt;
|
---|
111 | };
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 | #endif
|
---|