| Line | |
|---|
| 1 | #ifndef MARS_MTFillMatrix
|
|---|
| 2 | #define MARS_MTFillMatrix
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MH3
|
|---|
| 5 | #include "MH3.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MRead;
|
|---|
| 9 | class MTask;
|
|---|
| 10 | class MHMatrix;
|
|---|
| 11 |
|
|---|
| 12 | class MTFillMatrix : public MParContainer
|
|---|
| 13 | {
|
|---|
| 14 | private:
|
|---|
| 15 | MH3 fReference;
|
|---|
| 16 | MRead *fReader;
|
|---|
| 17 | MHMatrix *fDestMatrix1;
|
|---|
| 18 | MHMatrix *fDestMatrix2;
|
|---|
| 19 | Int_t fNumDestEvents1;
|
|---|
| 20 | Int_t fNumDestEvents2;
|
|---|
| 21 | MTask *fWriteFile1;
|
|---|
| 22 | MTask *fWriteFile2;
|
|---|
| 23 |
|
|---|
| 24 | Bool_t CheckResult(MHMatrix *m, Int_t num) const;
|
|---|
| 25 | Bool_t WriteMatrix(MHMatrix *m, const TString &fname, Int_t i) const;
|
|---|
| 26 |
|
|---|
| 27 | public:
|
|---|
| 28 | MTFillMatrix(const MH3 &ref);
|
|---|
| 29 |
|
|---|
| 30 | void SetDestMatrix1(MHMatrix *matrix, UInt_t num=0)
|
|---|
| 31 | {
|
|---|
| 32 | fDestMatrix1 = matrix;
|
|---|
| 33 | if (num>0)
|
|---|
| 34 | fNumDestEvents1 = num;
|
|---|
| 35 | }
|
|---|
| 36 | void SetWriteFile1(MTask *write, UInt_t num=0)
|
|---|
| 37 | {
|
|---|
| 38 | fWriteFile1 = write;
|
|---|
| 39 | if (num>0)
|
|---|
| 40 | fNumDestEvents1 = num;
|
|---|
| 41 | }
|
|---|
| 42 | void SetNumDestEvents1(UInt_t num)
|
|---|
| 43 | {
|
|---|
| 44 | fNumDestEvents1 = num;
|
|---|
| 45 | }
|
|---|
| 46 | void SetDestMatrix2(MHMatrix *matrix, UInt_t num=0)
|
|---|
| 47 | {
|
|---|
| 48 | fDestMatrix2 = matrix;
|
|---|
| 49 | if (num>0)
|
|---|
| 50 | fNumDestEvents2 = num;
|
|---|
| 51 | }
|
|---|
| 52 | void SetWriteFile2(MTask *write, UInt_t num=0)
|
|---|
| 53 | {
|
|---|
| 54 | fWriteFile2 = write;
|
|---|
| 55 | if (num>0)
|
|---|
| 56 | fNumDestEvents2 = num;
|
|---|
| 57 | }
|
|---|
| 58 | void SetNumDestEvents2(UInt_t num)
|
|---|
| 59 | {
|
|---|
| 60 | fNumDestEvents2 = num;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | void SetReader(MRead *task) { fReader = task; }
|
|---|
| 64 |
|
|---|
| 65 | Bool_t Process();
|
|---|
| 66 | Bool_t WriteMatrix1(const TString &fname) const { return WriteMatrix(fDestMatrix1, fname, 1); }
|
|---|
| 67 | Bool_t WriteMatrix2(const TString &fname) const { return WriteMatrix(fDestMatrix2, fname, 2); }
|
|---|
| 68 | Bool_t WriteMatrices(const TString &fname) const;
|
|---|
| 69 |
|
|---|
| 70 | ClassDef(MTFillMatrix, 0) // Tool to fill matrices (eg. trainings- and test-matrices)
|
|---|
| 71 | };
|
|---|
| 72 |
|
|---|
| 73 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.