Anp::HistKinem Class Reference

#include <PlotKinem.h>

Inheritance diagram for Anp::HistKinem:
Anp::Base

List of all members.

Public Member Functions

 HistKinem ()
virtual ~HistKinem ()
bool Fill (const RecoNu &rnu, double weight=1.0)
bool Make (TDirectory *dir)

Private Member Functions

TH1 * GetTH1 (const std::string &key, const std::string &name="")

Private Attributes

bool fPlot
int fNMiss
TDirectory * fDir
TH1 * fENeu
TH1 * fENeuZoom

Detailed Description

Definition at line 24 of file PlotKinem.h.


Constructor & Destructor Documentation

Anp::HistKinem::HistKinem (  ) 

Definition at line 29 of file PlotKinem.cxx.

00030    :fPlot(false),
00031     fNMiss(0),
00032     fDir(0),
00033     fENeu(0),
00034     fENeuZoom(0)
00035 {
00036 }

Anp::HistKinem::~HistKinem (  )  [virtual]

Definition at line 39 of file PlotKinem.cxx.

00040 {
00041 }


Member Function Documentation

bool Anp::HistKinem::Fill ( const RecoNu rnu,
double  weight = 1.0 
)

Definition at line 44 of file PlotKinem.cxx.

References Anp::RecoNu::ENeu(), fENeu, fENeuZoom, and fPlot.

00045 {
00046    //
00047    // Fill histograms if they have been created
00048    //
00049    if(!fPlot) return false;
00050 
00051    fENeu     -> Fill(rnu.ENeu(), weight);
00052    fENeuZoom -> Fill(rnu.ENeu(), weight);
00053 
00054    return true;
00055 }

TH1 * Anp::HistKinem::GetTH1 ( const std::string &  key,
const std::string &  name = "" 
) [private]

Definition at line 82 of file PlotKinem.cxx.

References Anp::HistMan::CreateTH1(), fDir, fNMiss, Anp::HistMan::Instance(), and Anp::SetDir().

Referenced by Make().

00083 {
00084    TH1 *h = HistMan::Instance().CreateTH1(key, "kinem");
00085    if(h)
00086    {
00087       Anp::SetDir(h, fDir, name);
00088    }
00089    else
00090    {
00091       ++fNMiss;
00092    }
00093 
00094    return h;
00095 }

bool Anp::HistKinem::Make ( TDirectory *  dir  ) 

Definition at line 58 of file PlotKinem.cxx.

References fDir, fENeu, fENeuZoom, fNMiss, fPlot, and GetTH1().

00059 {
00060    fPlot = false;
00061 
00062    if(!dir) return false;
00063 
00064    fDir = dir;
00065 
00066    fENeu     = HistKinem::GetTH1("eneu");
00067    fENeuZoom = HistKinem::GetTH1("eneu_zoom");
00068 
00069    if(fNMiss == 0)
00070    {
00071       fPlot = true;
00072    }
00073    else
00074    {
00075       cerr << "HistKinem::Make - missed " << fNMiss << " histograms" << endl;
00076    }
00077 
00078    return fPlot;
00079 }


Member Data Documentation

TDirectory* Anp::HistKinem::fDir [private]

Definition at line 44 of file PlotKinem.h.

Referenced by GetTH1(), and Make().

TH1* Anp::HistKinem::fENeu [private]

Definition at line 46 of file PlotKinem.h.

Referenced by Fill(), and Make().

TH1* Anp::HistKinem::fENeuZoom [private]

Definition at line 47 of file PlotKinem.h.

Referenced by Fill(), and Make().

int Anp::HistKinem::fNMiss [private]

Definition at line 42 of file PlotKinem.h.

Referenced by GetTH1(), and Make().

bool Anp::HistKinem::fPlot [private]

Definition at line 41 of file PlotKinem.h.

Referenced by Fill(), and Make().


The documentation for this class was generated from the following files:

Generated on 16 Jan 2018 for loon by  doxygen 1.6.1