source: trunk/Mars/mfbase/MFEventSelector.h@ 18679

Last change on this file since 18679 was 7804, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 1.0 KB
Line 
1#ifndef MARS_MFEventSelector
2#define MARS_MFEventSelector
3
4#ifndef MARS_MFilter
5#include "MFilter.h"
6#endif
7
8class MParList;
9
10class MFEventSelector : public MFilter
11{
12private:
13 Int_t fNumTotalEvts; // Number of total events from which are selected
14 Int_t fNumSelectEvts; // Number of events to be selected
15 Float_t fSelRatio; // Selection Probability
16
17 Int_t fNumSelectedEvts; //! Number of events which have been selected
18
19 Bool_t fResult; //! Reseult of a single selection
20
21 Int_t PreProcess(MParList *pList);
22 Int_t Process();
23 Int_t PostProcess();
24
25 enum { kNumTotalFromFile = BIT(14) };
26
27public:
28 MFEventSelector(const char *name=NULL, const char *title=NULL);
29
30 Bool_t IsExpressionTrue() const { return fResult; }
31
32 void SetNumTotalEvts(Int_t n) { fNumTotalEvts = n; ResetBit(kNumTotalFromFile); }
33 void SetNumSelectEvts(Int_t n) { fNumSelectEvts = n; }
34 void SetSelectionRatio(Float_t f);
35
36 ClassDef(MFEventSelector, 0) // A filter to do a random selection of events
37};
38
39#endif
Note: See TracBrowser for help on using the repository browser.