source: trunk/MagicSoft/Mars/mfbase/MFEventSelector2.h@ 5448

Last change on this file since 5448 was 5448, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 2.1 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 Bool_t fResult;
44 Bool_t fHistIsProbability;
45 Int_t fCounter[2];
46
47 TH1 &InitHistogram(MH3* &hist);
48 Bool_t ReadDistribution(MRead &read);
49 void PrepareHistograms();
50 Bool_t PreProcessData(MParList *parlist);
51 Bool_t Select(Int_t bin);
52 Bool_t SelectProb(Int_t bin) const;
53
54 Int_t PreProcess(MParList *parlist);
55 Int_t Process();
56 Int_t PostProcess();
57
58public:
59 MFEventSelector2(MH3 &hist, const char *name=NULL, const char *title=NULL);
60 ~MFEventSelector2();
61
62 MH3 *GetHistOrig() { return fHistOrig; }
63
64 void SetNumMax(Long_t max=-1) { fNumMax = max; }
65 void SetHistIsProbability(Bool_t b=kTRUE) { fHistIsProbability=b; }
66 Bool_t IsExpressionTrue() const { return fResult; }
67
68 ClassDef(MFEventSelector2, 0) // FIXME!
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.