1 | #ifndef MARS_MFillH
|
---|
2 | #define MARS_MFillH
|
---|
3 |
|
---|
4 | #ifndef MARS_MTask
|
---|
5 | #include "MTask.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MH;
|
---|
9 | class MMap;
|
---|
10 | class MData;
|
---|
11 | class MWeight;
|
---|
12 | class MParList;
|
---|
13 |
|
---|
14 | class TCanvas;
|
---|
15 |
|
---|
16 | class MFillH : public MTask
|
---|
17 | {
|
---|
18 | private:
|
---|
19 | MParContainer *fParContainer; // Pointer to the data container storing
|
---|
20 | TString fParContainerName; // Name to a data container
|
---|
21 |
|
---|
22 | MH* fH; // Pointer to the MH container to get filled
|
---|
23 | TString fHName; // Name to a MH container to get filled
|
---|
24 |
|
---|
25 | MWeight *fWeight; // Pointer to the container storing a weight
|
---|
26 | TString fWeightName; // Name of a container storing a weight
|
---|
27 |
|
---|
28 | MData *fIndex; // MData object describing the 'key' to an automatic index for an MHArray
|
---|
29 | MMap *fMapIdx; //! Map to map key-index-pair for an MHArray (MMap see MFillH.cc)
|
---|
30 |
|
---|
31 | TCanvas *fCanvas; //! Canvas used to update a MStatusDisplay at the end of a loop
|
---|
32 |
|
---|
33 | TString ExtractName(const char *name) const;
|
---|
34 | TString ExtractClass(const char *name) const;
|
---|
35 |
|
---|
36 | void Init(const char *name, const char *title);
|
---|
37 |
|
---|
38 | void StreamPrimitive(ofstream &out) const;
|
---|
39 |
|
---|
40 | Bool_t DrawToDisplay();
|
---|
41 |
|
---|
42 | public:
|
---|
43 | MFillH();
|
---|
44 | MFillH(const char *hist, const char *par=NULL, const char *name=NULL, const char *title=NULL);
|
---|
45 | MFillH(const char *hist, MParContainer *par, const char *name=NULL, const char *title=NULL);
|
---|
46 | MFillH(MH *hist, const char *par=NULL, const char *name=NULL, const char *title=NULL);
|
---|
47 | MFillH(MH *hist, MParContainer *par, const char *name=NULL, const char *title=NULL);
|
---|
48 | ~MFillH();
|
---|
49 |
|
---|
50 | void SetRuleForIdx(const TString rule);
|
---|
51 | void SetRuleForIdx(MData *rule);
|
---|
52 |
|
---|
53 | void SetWeight(MWeight *w) { fWeight = w; }
|
---|
54 | void SetWeight(const char *name) { fWeightName = name; }
|
---|
55 |
|
---|
56 | Bool_t PreProcess(MParList *pList);
|
---|
57 | Bool_t Process();
|
---|
58 | Bool_t PostProcess();
|
---|
59 |
|
---|
60 | ClassDef(MFillH, 2) // Task to fill a histogram with data from a parameter container
|
---|
61 | };
|
---|
62 |
|
---|
63 | #endif
|
---|
64 |
|
---|