Changeset 8267


Ignore:
Timestamp:
01/25/07 10:00:31 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreflector
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc

    r8266 r8267  
    132132}
    133133
     134// --------------------------------------------------------------------------
     135//
     136// Fills all photons into a TH2 scaled with scale (default=1)
     137//
     138void MRflEvtData::Fill(TH2 &hist, Float_t scale) const
     139{
     140    MRflSinglePhoton *ph=NULL;
     141
     142    TIter Next(&fList);
     143    while ((ph=(MRflSinglePhoton*)Next()))
     144        ph->Fill(hist, scale);
     145}
     146
    134147void MRflEvtData::DrawPixelContent(Int_t num) const
    135148{
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.h

    r8266 r8267  
    1414#endif
    1515
     16class TH2;
    1617class MRflSinglePhoton;
    1718
     
    3637    const MRflSinglePhoton &GetPhoton(Int_t i) const;
    3738
     39    void Fill(TH2 &hist, Float_t scale=1) const;
     40
    3841    void Print(Option_t *o="") const;
    3942    void Paint(Option_t *o="");
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.cc

    r2173 r8267  
    3232#include "MRflSinglePhoton.h"
    3333
     34#include <TH2.h>
     35
    3436#include "MLog.h"
    3537#include "MLogManip.h"
     
    4143// --------------------------------------------------------------------------
    4244//
     45// Fill photon position into histogram scaled by scale.
     46//
     47void MRflSinglePhoton::Fill(TH2 &hist, Float_t scale) const
     48{
     49    hist.Fill(fX*scale, fY*scale);
     50}
     51
     52// --------------------------------------------------------------------------
     53//
    4354// Dump all photon information
    4455//
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.h

    r8266 r8267  
    55#include "MParContainer.h"
    66#endif
     7
     8class TH2;
    79
    810class MRflSinglePhoton : public MParContainer
     
    3335    Float_t GetY() const { return fY; }
    3436
     37    void Fill(TH2 &hist, Float_t scale=1) const;
     38
    3539    void Print(Option_t *o="") const;
    3640
Note: See TracChangeset for help on using the changeset viewer.