source: branches/MarsISDCBranchBasedOn17887/mfbase/MFEventSelector2.h@ 18227

Last change on this file since 18227 was 5690, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MFEventSelector2
2#define MARS_MFEventSelector2
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MFEventSelector2 //
7// //
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef MARS_MFilter
11#include "MFilter.h"
12#endif
13#ifndef ROOT_TArrayL
14#include <TArrayL.h>
15#endif
16#ifndef MARS_MDataChain
17#include "MDataChain.h"
18#endif
19
20class TH1;
21class TCanvas;
22
23class MH3;
24class MRead;
25
26class MFEventSelector2 : public MFilter
27{
28private:
29 static const TString gsDefName;
30 static const TString gsDefTitle;
31
32 MH3 *fHistOrig; // original distribution of the events
33 MH3 *fHistNom; // nominal distribution
34 MH3 *fHistRes; // resulting distribution
35 MDataChain fDataX; // data rule for the x-axis
36 MDataChain fDataY; // data rule for the y-axis
37 MDataChain fDataZ; // data rule for the z-axis
38 Long_t fNumMax; // Maximum number of selected events
39 TArrayL fIs; //! array storing the original distribution
40 TArrayL fNom; //! array storing the nominal distribution
41 TCanvas *fCanvas; //! canvas for online display
42
43 TString fFilterName; // name of the MFilter object to be used when determining the original distribution
44
45 Bool_t fResult;
46 Bool_t fHistIsProbability;
47 Bool_t fUseOrigDist; // flag indicating that in the selection the original distribution is not changed
48
49 Int_t fCounter[3];
50
51 TH1 &InitHistogram(MH3* &hist);
52 Bool_t ReadDistribution(MRead &read, MFilter *filter);
53 void PrepareHistograms();
54 Bool_t PreProcessData(MParList *parlist);
55 Bool_t Select(Int_t bin);
56 Bool_t SelectProb(Int_t bin) const;
57
58 Int_t PreProcess(MParList *parlist);
59 Int_t Process();
60 Int_t PostProcess();
61
62public:
63 MFEventSelector2(MH3 &hist, const char *name=NULL, const char *title=NULL);
64 ~MFEventSelector2();
65
66 MH3 *GetHistOrig() { return fHistOrig; }
67
68 void SetNumMax(Long_t max=-1) { fNumMax = max; }
69 void SetHistIsProbability(Bool_t b=kTRUE) { fHistIsProbability=b; }
70 Bool_t IsExpressionTrue() const { return fResult; }
71
72 ClassDef(MFEventSelector2, 0) // FIXME!
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.