source: trunk/MagicSoft/Mars/mhbase/MFillH.h@ 5452

Last change on this file since 5452 was 3788, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MFillH
2#define MARS_MFillH
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class MH;
9class MMap;
10class MData;
11class MWeight;
12class MParList;
13
14class TCanvas;
15
16class MFillH : public MTask
17{
18public:
19 enum {
20 kDoNotDisplay = BIT(17),
21 kCanSkip = BIT(18)
22 };
23
24private:
25 MParContainer *fParContainer; // Pointer to the data container storing
26 TString fParContainerName; // Name to a data container
27
28 MH* fH; // Pointer to the MH container to get filled
29 TString fHName; // Name to a MH container to get filled
30 TString fNameTab;
31
32 MWeight *fWeight; // Pointer to the container storing a weight
33 TString fWeightName; // Name of a container storing a weight
34
35 MData *fIndex; // MData object describing the 'key' to an automatic index for an MHArray
36 MMap *fMapIdx; //! Map to map key-index-pair for an MHArray (MMap see MFillH.cc)
37
38 TCanvas *fCanvas; //! Canvas used to update a MStatusDisplay at the end of a loop
39
40 TString fDrawOption; // Draw option for status display
41
42 TString ExtractName(const char *name) const;
43 TString ExtractClass(const char *name) const;
44
45 void Init(const char *name, const char *title);
46
47 void StreamPrimitive(ofstream &out) const;
48
49 Bool_t DrawToDisplay();
50
51public:
52 MFillH();
53 MFillH(const char *hist, const char *par=NULL, const char *name=NULL, const char *title=NULL);
54 MFillH(const char *hist, MParContainer *par, const char *name=NULL, const char *title=NULL);
55 MFillH(MH *hist, const char *par=NULL, const char *name=NULL, const char *title=NULL);
56 MFillH(MH *hist, MParContainer *par, const char *name=NULL, const char *title=NULL);
57 ~MFillH();
58
59 void SetNameTab(const char *n="") { fNameTab = n; }
60
61 void SetRuleForIdx(const TString rule);
62 void SetRuleForIdx(MData *rule);
63
64 void SetWeight(MWeight *w) { fWeight = w; }
65 void SetWeight(const char *name) { fWeightName = name; }
66
67 void SetDrawOption(Option_t *option="");
68 Option_t *GetDrawOption() const { return fDrawOption; }
69
70 Int_t PreProcess(MParList *pList);
71 Bool_t ReInit(MParList *pList);
72 Int_t Process();
73 Int_t PostProcess();
74
75 TCanvas *GetCanvas() { return fCanvas; }
76
77 ClassDef(MFillH, 2) // Task to fill a histogram with data from a parameter container
78};
79
80#endif
81
Note: See TracBrowser for help on using the repository browser.