PandaRoot
PndSimpleNtuple Class Reference

#include <PndSimpleNtuple.h>

Public Member Functions

 PndSimpleNtuple (TString name, TString title, TString precut="")
 
 ~PndSimpleNtuple ()
 
void Column (const TString &name, double value)
 
void Column (const TString &name, float value)
 
void Column (const TString &name, int value)
 
void Column (const TString &name, bool value)
 
void ColumnD (const TString &name, double value)
 
void ColumnF (const TString &name, float value)
 
void ColumnI (const TString &name, int value)
 
void ColumnB (const TString &name, bool value)
 
bool DumpData ()
 
bool Accept ()
 
bool AcceptData ()
 
TTree * GetTree ()
 
double GetCurrentValue (TString name)
 
void SetPrecut (TString precut)
 
bool BranchExists (TString name)
 
int ShowBranches ()
 

Detailed Description

Definition at line 52 of file PndSimpleNtuple.h.

Constructor & Destructor Documentation

◆ PndSimpleNtuple()

PndSimpleNtuple::PndSimpleNtuple ( TString  name,
TString  title,
TString  precut = "" 
)

◆ ~PndSimpleNtuple()

PndSimpleNtuple::~PndSimpleNtuple ( )
inline

Definition at line 56 of file PndSimpleNtuple.h.

References Column().

57  {
58  if (fFml != 0)
59  delete fFml;
60  }

Member Function Documentation

◆ Accept()

bool PndSimpleNtuple::Accept ( )

Referenced by AcceptData(), and DumpData().

◆ AcceptData()

bool PndSimpleNtuple::AcceptData ( )
inline

Definition at line 84 of file PndSimpleNtuple.h.

References Accept(), and DumpData().

85  {
86  if (Accept()) {
87  DumpData();
88  return true;
89  }
90  return false;
91  } // writes current event if accepted

◆ BranchExists()

bool PndSimpleNtuple::BranchExists ( TString  name)
inline

Definition at line 96 of file PndSimpleNtuple.h.

References ShowBranches().

96 { return (fBrTypes.find(name) != fBrTypes.end()); }

◆ Column() [1/4]

void PndSimpleNtuple::Column ( const TString &  name,
double  value 
)

◆ Column() [2/4]

void PndSimpleNtuple::Column ( const TString &  name,
float  value 
)

◆ Column() [3/4]

void PndSimpleNtuple::Column ( const TString &  name,
int  value 
)

◆ Column() [4/4]

void PndSimpleNtuple::Column ( const TString &  name,
bool  value 
)

◆ ColumnB()

void PndSimpleNtuple::ColumnB ( const TString &  name,
bool  value 
)
inline

Definition at line 70 of file PndSimpleNtuple.h.

References Column().

70 { Column(name, value); } // sets bool value of a variable 'name'
void Column(const TString &name, double value)

◆ ColumnD()

void PndSimpleNtuple::ColumnD ( const TString &  name,
double  value 
)
inline

Definition at line 67 of file PndSimpleNtuple.h.

References Column().

67 { Column(name, value); } // sets double value of a variable 'name'
void Column(const TString &name, double value)

◆ ColumnF()

void PndSimpleNtuple::ColumnF ( const TString &  name,
float  value 
)
inline

Definition at line 68 of file PndSimpleNtuple.h.

References Column().

68 { Column(name, value); } // sets float value of a variable 'name'
void Column(const TString &name, double value)

◆ ColumnI()

void PndSimpleNtuple::ColumnI ( const TString &  name,
int  value 
)
inline

Definition at line 69 of file PndSimpleNtuple.h.

References Column().

69 { Column(name, value); } // sets integer value of a variable 'name'
void Column(const TString &name, double value)

◆ DumpData()

bool PndSimpleNtuple::DumpData ( )
inline

Definition at line 77 of file PndSimpleNtuple.h.

References Accept().

Referenced by AcceptData().

78  {
79  fTree->Fill();
80  fTmpTree->Reset();
81  return true;
82  } // writes the current event

◆ GetCurrentValue()

double PndSimpleNtuple::GetCurrentValue ( TString  name)

Referenced by GetTree().

◆ GetTree()

TTree* PndSimpleNtuple::GetTree ( )
inline

Definition at line 93 of file PndSimpleNtuple.h.

References GetCurrentValue(), and SetPrecut().

93 { return fTree; }

◆ SetPrecut()

void PndSimpleNtuple::SetPrecut ( TString  precut)

Referenced by GetTree().

◆ ShowBranches()

int PndSimpleNtuple::ShowBranches ( )

Referenced by BranchExists().


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