source: trunk/MagicSoft/Mars/mhist/MHArray.h@ 1587

Last change on this file since 1587 was 1574, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#ifndef MARS_MHArray
2#define MARS_MHArray
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8class TList;
9
10class MHArray : public MH
11{
12private:
13 Int_t fIdx; // current index for the fill function
14 TList *fArray; //-> Array storing the histograms
15
16 const MParList *fParList; //! pointer to parameter list used for SetupFill when a new Hist is created
17 TClass *fClass; //! pointer to class entry in root dictionary
18
19 MH *fTemplate; //! pointer to a template histogram
20 TString fTemplateName; //! name of the template class
21
22 Bool_t CreateH();
23
24 enum { kUseTemplate=BIT(14) };
25
26public:
27 MHArray(const TString hname, Bool_t istempl=kFALSE, const char *name=NULL, const char *title=NULL);
28 ~MHArray();
29
30 virtual Bool_t SetupFill(const MParList *pList);
31 virtual Bool_t Fill(const MParContainer *par);
32 virtual Bool_t Finalize();
33
34 MH &operator[](Int_t i);
35 MH *At(Int_t i);
36
37 MH *GetH();
38
39 void SetIndex(Int_t i) { fIdx=i; }
40 void IncIndex() { fIdx++; }
41 void DecIndex() { fIdx--; }
42
43 Int_t GetIndex() const { return fIdx; }
44
45 void Print(Option_t *option="") const;
46
47 void Draw(Option_t *opt="");
48 TObject *DrawClone(Option_t *opt="") const;
49
50 ClassDef(MHArray, 0) //A histogram class for an array of Mars histograms
51};
52
53#endif
54
Note: See TracBrowser for help on using the repository browser.