| Line | |
|---|
| 1 | #ifndef MARS_MFRandomSplit
|
|---|
| 2 | #define MARS_MFRandomSplit
|
|---|
| 3 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 4 | // //
|
|---|
| 5 | // MFRandomSplit //
|
|---|
| 6 | // //
|
|---|
| 7 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 8 |
|
|---|
| 9 | #ifndef MARS_MFilter
|
|---|
| 10 | #include "MFilter.h"
|
|---|
| 11 | #endif
|
|---|
| 12 |
|
|---|
| 13 | class MParList;
|
|---|
| 14 |
|
|---|
| 15 | class MFRandomSplit : public MFilter
|
|---|
| 16 | {
|
|---|
| 17 | private:
|
|---|
| 18 | Int_t fNumSelectedEvts;
|
|---|
| 19 | Double_t fProb; // probability with which the result should be kTRUE
|
|---|
| 20 |
|
|---|
| 21 | Bool_t fResult; // Result returned by IsExpressionTrue
|
|---|
| 22 |
|
|---|
| 23 | Int_t PreProcess(MParList *pList);
|
|---|
| 24 | Int_t Process();
|
|---|
| 25 | Int_t PostProcess();
|
|---|
| 26 |
|
|---|
| 27 | public:
|
|---|
| 28 | MFRandomSplit(Double_t f, const char *name=NULL, const char *title=NULL);
|
|---|
| 29 |
|
|---|
| 30 | Bool_t IsExpressionTrue() const { return fResult; }
|
|---|
| 31 |
|
|---|
| 32 | ClassDef(MFRandomSplit, 0) // A Filter giving kTRUE with a certain probability
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 | #endif
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.