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 40 of file PndSimpleNtuple.h.

Constructor & Destructor Documentation

◆ PndSimpleNtuple()

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

◆ ~PndSimpleNtuple()

PndSimpleNtuple::~PndSimpleNtuple ( )
inline

Definition at line 44 of file PndSimpleNtuple.h.

References Column().

45  {
46  if (fFml != 0)
47  delete fFml;
48  }

Member Function Documentation

◆ Accept()

bool PndSimpleNtuple::Accept ( )

Referenced by AcceptData(), and DumpData().

◆ AcceptData()

bool PndSimpleNtuple::AcceptData ( )
inline

Definition at line 72 of file PndSimpleNtuple.h.

References Accept(), and DumpData().

73  {
74  if (Accept()) {
75  DumpData();
76  return true;
77  }
78  return false;
79  } // writes current event if accepted

◆ BranchExists()

bool PndSimpleNtuple::BranchExists ( TString  name)
inline

Definition at line 84 of file PndSimpleNtuple.h.

References ShowBranches().

84 { 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 58 of file PndSimpleNtuple.h.

References Column().

58 { 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 55 of file PndSimpleNtuple.h.

References Column().

55 { 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 56 of file PndSimpleNtuple.h.

References Column().

56 { 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 57 of file PndSimpleNtuple.h.

References Column().

57 { 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 65 of file PndSimpleNtuple.h.

References Accept().

Referenced by AcceptData().

66  {
67  fTree->Fill();
68  fTmpTree->Reset();
69  return true;
70  } // writes the current event

◆ GetCurrentValue()

double PndSimpleNtuple::GetCurrentValue ( TString  name)

Referenced by GetTree().

◆ GetTree()

TTree* PndSimpleNtuple::GetTree ( )
inline

Definition at line 81 of file PndSimpleNtuple.h.

References GetCurrentValue(), and SetPrecut().

81 { 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: