source: trunk/MagicSoft/Mars/mfbase/MFEventSelector.h@ 5817

Last change on this file since 5817 was 3330, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.1 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 void StreamPrimitive(ofstream &out) const;
22
23 Int_t PreProcess(MParList *pList);
24 Int_t Process();
25 Int_t PostProcess();
26
27 enum { kNumTotalFromFile = BIT(14) };
28
29public:
30 MFEventSelector(const char *name=NULL, const char *title=NULL);
31
32 Bool_t IsExpressionTrue() const { return fResult; }
33
34 void SetNumTotalEvts(Int_t n) { fNumTotalEvts = n; ResetBit(kNumTotalFromFile); }
35 void SetNumSelectEvts(Int_t n) { fNumSelectEvts = n; }
36 void SetSelectionRatio(Float_t f);
37
38 ClassDef(MFEventSelector, 0) // A filter to do a random selection of events
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.