/* ======================================================================== *\ ! $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.69 2009-02-11 12:25:42 tbretz Exp $ \* ======================================================================== */ #ifndef MARS_MHCamera #define MARS_MHCamera #ifndef MARS_MAGIC #include "MAGIC.h" #endif #ifndef ROOT_TArrayC #include #endif #ifndef ROOT_TArrayI #include #endif #ifndef ROOT_MArrayD #include #endif #ifndef ROOT_TClonesArray #include #endif #ifndef ROOT_TH1 #include #endif #ifndef ROOT_TCanvas #include #endif class TPaveStats; class TProfile; class MGeomCam; class MCamEvent; class MRflEvtData; class MCerPhotEvt; class MImgCleanStd; class MHCamera : public TH1D { public: enum { // DO NOT USE BIT(14) (MStatusArray WORKAROUND!) // BIT(15)/BIT(16)/BIT(17) used by TH1 kProfile = BIT(18), // FIXME: When changing change max/min! kFreezed = BIT(19), kNoLegend = BIT(20), kNoScale = BIT(21), kNoUnused = BIT(22), kErrorMean = BIT(23)/*, // NO MORE BITS ALLOWED! kSqrtVariance = BIT(21), kSinglePixelProfile = BIT(22)*/ }; protected: MGeomCam *fGeomCam; // pointer to camera geometry (y-axis) TArrayC fUsed; // array containing flags TArrayI fBinEntries; // number of entries per bin TList *fNotify; //! //#if ROOT_VERSION_CODE < ROOT_VERSION(4,00,03) Bool_t fFreezed; //! Just a dummy!!!! ([Set,Is]Freezed) //#endif Float_t fAbberation; void Init(); /* Stat_t Profile(Stat_t val) const { if (!TestBit(kProfile)) return val; const Stat_t n = TH1D::GetEntries(); return n>0 ? val/n : val; } */ Int_t GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog); void PaintIndices(Int_t type); void Update(Bool_t islog, Bool_t isbox, Bool_t iscol, Bool_t issame); void UpdateLegend(Float_t min, Float_t max, Bool_t islog); TPaveStats *GetStatisticBox(); Int_t GetPixelIndex(Int_t px, Int_t py, Float_t conv=1) const; void PaintAxisTitle(); enum { kIsUsed = BIT(1) }; void ResetUsed(Int_t idx) { CLRBIT(fUsed[idx], kIsUsed); } Bool_t FindVal(const TArrayI &arr, Int_t val) const { const Int_t n = arr.GetSize(); if (n==0) return kTRUE; const Int_t *p = arr.GetArray(); const Int_t *end = p+n; while (p