Ignore:
Timestamp:
08/01/03 11:33:07 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2274 r2297  
    222222}
    223223
     224// ------------------------------------------------------------------------
     225//
     226// Use x and y in millimeters
     227//
     228Int_t MHCamera::Fill(Axis_t x, Axis_t y, Stat_t w)
     229{
     230    for (Int_t idx=0; idx<fNcells-2; idx++)
     231    {
     232        MHexagon hex((*fGeomCam)[idx]);
     233        if (hex.DistanceToPrimitive(x, y)>0)
     234            continue;
     235
     236        SetUsed(idx);
     237        return Fill(idx, w);
     238    }
     239    return -1;
     240}
     241
    224242Stat_t MHCamera::GetMean(Int_t axis) const
    225243{
     
    839857}
    840858
    841 TPaveStats *MHCamera::GetStats()
     859TPaveStats *MHCamera::GetStatisticBox()
    842860{
    843861    TObject *obj = 0;
     
    857875void MHCamera::UpdateLegend(Float_t min, Float_t max, Bool_t islog)
    858876{
    859     TPaveStats *stats = GetStats();
     877    TPaveStats *stats = GetStatisticBox();
    860878
    861879    const Float_t hndc   = 0.92 - (stats ? stats->GetY1NDC() : 1);
     
    9921010// ------------------------------------------------------------------------
    9931011//
    994 // Function introduced  (31-01-03)  WILL BE REMOVED IN THE FUTURE! DON'T
    995 // USE IT!
    9961012//
    9971013Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py) const
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r2274 r2297  
    4545    void  SetRange();
    4646
    47     TPaveStats *GetStats();
     47    TPaveStats *GetStatisticBox();
    4848
    4949    Int_t GetPixelIndex(Int_t px, Int_t py) const;
     
    7474
    7575    Bool_t IsUsed(Int_t idx) const { return TESTBIT(const_cast<TArrayC&>(fUsed)[idx], kIsUsed); }
     76
     77    Int_t Fill(Axis_t x, Axis_t y, Stat_t w);
    7678
    7779    //void     AddPixContent(Int_t idx) const { AddBinContent(idx+1); }
     
    146148
    147149    //void SetStatusBar(TGStatusBar *bar) { fStatusBar = bar; }
     150
     151    const MGeomCam &GetGeomCam() const { return *fGeomCam; }
    148152
    149153    ClassDef(MHCamera, 1) // Displays the magic camera
  • trunk/MagicSoft/Mars/mhist/MHStarMap.cc

    r2173 r2297  
    3232//
    3333/////////////////////////////////////////////////////////////////////////////
    34 
    3534#include "MHStarMap.h"
    3635
     36#include <TH2.h>
    3737#include <TStyle.h>   // gStyle
    3838#include <TColor.h>   // SetRGB
  • trunk/MagicSoft/Mars/mhist/MHStarMap.h

    r2043 r2297  
    66#endif
    77
    8 #ifndef ROOT_TH2
    9 #include <TH2.h>
    10 #endif
    11 
     8class TH2F;
    129class MHillas;
    1310
     
    3532    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
    3633
    37     TH1 *GetHistByName(const TString name) { return fStarMap; }
     34    TH1 *GetHistByName(const TString name) { return (TH1*)fStarMap; }
    3835
    3936    TH2F *GetHist() { return fStarMap; }
Note: See TracChangeset for help on using the changeset viewer.