| Line | |
|---|
| 1 | //--------------------------------------------------------------------------
|
|---|
| 2 | //
|
|---|
| 3 | // Description:
|
|---|
| 4 | // class ProxTuple :
|
|---|
| 5 | //
|
|---|
| 6 | // un proxy pour ntuple sophya pour une interface + user friendly
|
|---|
| 7 | // example d'utilisation:
|
|---|
| 8 | /*
|
|---|
| 9 |
|
|---|
| 10 | ProxTuple tupleCl;
|
|---|
| 11 | for (i=0;i<N;i++){
|
|---|
| 12 | tupleCl.fill(cl.l(i),"l");
|
|---|
| 13 | tupleCl.fill(i,"i");
|
|---|
| 14 | // etc...
|
|---|
| 15 |
|
|---|
| 16 | tupleCl.dump();
|
|---|
| 17 | }
|
|---|
| 18 | POutPersist pos(string("ct.ppf"));
|
|---|
| 19 | pos.PutObject(tupleCl.tuple(),"tupleCl");
|
|---|
| 20 | */
|
|---|
| 21 | //
|
|---|
| 22 | // Author List:
|
|---|
| 23 | // S.Plaszczynski
|
|---|
| 24 | //
|
|---|
| 25 | // History (add to end):
|
|---|
| 26 | // S.Plaszczynski sam oct 26 16:22:27 CEST 2002 (creation)
|
|---|
| 27 | //
|
|---|
| 28 | // Contact:
|
|---|
| 29 | // plaszczy@lal.in2p3.fr
|
|---|
| 30 | //------------------------------------------------------------------------
|
|---|
| 31 | #ifndef ProxTuple_hh
|
|---|
| 32 | #define ProxTuple_hh
|
|---|
| 33 |
|
|---|
| 34 | //forward declarations
|
|---|
| 35 |
|
|---|
| 36 | #include "ntuple.h"
|
|---|
| 37 | #include <string>
|
|---|
| 38 |
|
|---|
| 39 | class ProxTuple
|
|---|
| 40 | {
|
|---|
| 41 |
|
|---|
| 42 | public:
|
|---|
| 43 |
|
|---|
| 44 | //constructors
|
|---|
| 45 | ProxTuple():_tuple(0){};
|
|---|
| 46 |
|
|---|
| 47 | // destructor
|
|---|
| 48 | ~ProxTuple() {delete _tuple;};
|
|---|
| 49 |
|
|---|
| 50 | //member functions
|
|---|
| 51 | void fill(float v,const char*);
|
|---|
| 52 | inline void fill(double v,const char* c) { fill((float)v,c);}
|
|---|
| 53 | inline void fill(int v,const char* c){ fill((float)v,c);}
|
|---|
| 54 | void dump();
|
|---|
| 55 |
|
|---|
| 56 | //acces au ntuple
|
|---|
| 57 | inline NTuple& tuple(){return *_tuple;}
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | private:
|
|---|
| 61 | NTuple* _tuple;
|
|---|
| 62 | vector<string> _name;
|
|---|
| 63 | vector<float> _val;
|
|---|
| 64 |
|
|---|
| 65 | };
|
|---|
| 66 |
|
|---|
| 67 | #endif
|
|---|
| 68 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.