#if !defined HHISTOGRAM_H
#define HHISTOGRAM_H
#include "TNamed.h"
#include "TH1.h"
#include "TH2.h"
class HUserParameter;
class TList;
class HDrawingOpt : public TObject {
public:
Float_t xstart;
Float_t xstop;
Float_t ystart;
Float_t ystop;
Float_t scale;
Text_t option[20];
public:
HDrawingOpt() : TObject() {}
virtual ~HDrawingOpt() {}
public:
ClassDef(HDrawingOpt,1)
};
class HHistogram : public TNamed {
protected:
TH1F *fHist1;
TH2F *fHist2;
Int_t fDim;
Bool_t kMulti;
Int_t fCType;
Int_t fCIdx;
Text_t fCName[100];
Int_t fDSIdx1;
Text_t fDSName1[100];
Int_t fDSIdx2;
Text_t fDSName2[100];
HUserParameter *fPar1;
HUserParameter *fPar2;
Bool_t kConsistent;
Bool_t kPause;
Int_t fLCount1;
Int_t fLCount2;
Int_t fLCondition1;
Int_t fLCondition2;
Int_t fKey;
Float_t fTheta;
Float_t fPhi;
HDrawingOpt fDrawing;
Int_t xcursor;
Int_t ycursor;
public:
HHistogram();
virtual ~HHistogram();
Bool_t checkConsistency(Bool_t kMsg = kFALSE);
void fill();
void action();
TList* isSameDS(Int_t axis);
void setDim(Int_t i) { fDim = i; }
Int_t getDim() const { return fDim; }
void setMulti(Bool_t kFlag = kTRUE) { kMulti = kFlag; }
Bool_t isMulti() const { return kMulti; }
void setCType(Int_t type) { fCType = type; }
Int_t getCType() const { return fCType; }
Bool_t isConditioned() { return ((fCType>0) ? kTRUE : kFALSE); }
void setPause(Bool_t kFlag = kTRUE) { kPause = kFlag; }
Bool_t isPause() const { return kPause; }
void setCIdx(Int_t idx) { fCIdx = idx; }
Int_t getCIdx() const { return fCIdx; }
void setCName(const Char_t* cname) { if(cname) sprintf(fCName,"%s",cname); }
void setDSIdx(Int_t ds, Int_t pos) {
if(pos==1) fDSIdx1 = ds;
if(pos==2) fDSIdx2 = ds;
}
Int_t getDSIdx(Int_t pos) const {
if(pos==1) return fDSIdx1;
if(pos==2) return fDSIdx2;
return -1;
}
void setDSName(const Char_t* name, Int_t pos) {
if(name && pos==1) sprintf(fDSName1,"%s",name);
if(name && pos==2) sprintf(fDSName2,"%s",name);
}
void setParameter(HUserParameter *pPar, Int_t idx) {
if(pPar && idx==1) fPar1 = pPar;
if(pPar && idx==2) fPar2 = pPar;
}
HUserParameter *getParameter(Int_t idx) const {
if(idx==1) return fPar1;
if(idx==2) return fPar2;
return 0;
}
void setHist1(TH1F *hist);
void setHist2(TH2F *hist);
TH1F* getHist1() const { return fHist1; }
TH2F* getHist2() const { return fHist2; }
Bool_t isConsistent() const { return kConsistent; }
void print();
void setKey(Int_t key) { fKey = key; }
Int_t getKey() const { return fKey; }
void setLCount(Int_t idx, Int_t axis) {
if(idx>0 && idx<4) {
if(axis==1) fLCount1 = idx;
if(axis==2) fLCount2 = idx;
}
}
Int_t getLCount(Int_t axis) const {
if(axis == 1) return fLCount1;
if(axis == 2) return fLCount2;
return 0;
}
void setLCondition(Int_t idx, Int_t axis) {
if(axis==1) fLCondition1 = idx;
if(axis==2) fLCondition2 = idx;
}
Int_t getLCondition(Int_t axis) const {
if(axis == 1) return fLCondition1;
if(axis == 2) return fLCondition2;
return 0;
}
void setTheta(Float_t t) { fTheta = t; }
void setPhi(Float_t p) { fPhi = p; }
Float_t getTheta() const { return fTheta; }
Float_t getPhi() const { return fPhi; }
void setDrawingOpt(HDrawingOpt *p, Bool_t kSave = kFALSE);
void setDrawingOpt(Bool_t kDefault = kTRUE);
void setCursors(Int_t x=1, Int_t y=1) { xcursor = x; ycursor = y; }
void getCursors(Int_t &x, Int_t &y) { x = xcursor; y = ycursor; }
public:
ClassDef(HHistogram,1)
};
#endif
Last change: Sat May 22 12:57:09 2010
Last generated: 2010-05-22 12:57
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.