laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class to store the results from the toy MC generation into an ntuple. More...

#include <LauGenNtuple.hh>

Public Member Functions

 LauGenNtuple (const TString &rootFileName, const TString &rootTreeName)
 Constructor. More...
 
virtual ~LauGenNtuple ()
 Destructor.
 
const TString & fileName () const
 Ntuple file name. More...
 
const TString & treeName () const
 Ntuple tree name. More...
 
void addIntegerBranch (const TString &name)
 Add integer branch to tree. More...
 
void addDoubleBranch (const TString &name)
 Add double branch to tree. More...
 
void setIntegerBranchValue (const TString &name, Int_t value)
 Set value of an integer branch. More...
 
void setDoubleBranchValue (const TString &name, Double_t value)
 Set value of a double branch. More...
 
Int_t getIntegerBranchValue (const TString &name) const
 Get value of an integer branch. More...
 
Double_t getDoubleBranchValue (const TString &name) const
 Get value of a double branch. More...
 
void fillBranches ()
 Fill branches in the ntuple.
 
void deleteAndRecreateTree ()
 Delete and recreate tree.
 
Int_t buildIndex (const TString &majorName, const TString &minorName="0")
 Create an index table using leaves of the tree. More...
 
void writeOutGenResults ()
 Write out the results from the generation.
 
void addFriendTree (const TString &rootFileName, const TString &rootTreeName)
 Add a friend tree. More...
 

Protected Member Functions

void createFileAndTree ()
 Create ntuple file and the tree.
 
void defineBranches ()
 Define branches of the tree.
 
Bool_t definedBranches () const
 Flags whether branches have been defined. More...
 
void definedBranches (Bool_t defined)
 Flags whether branches have been defined. More...
 

Private Types

typedef std::map< TString, Int_t > IntVarMap
 Type to hold integer variables.
 
typedef std::map< TString, Double_t > DoubleVarMap
 Type to hold double precision floating point variables.
 

Private Member Functions

 LauGenNtuple (const LauGenNtuple &rhs)
 Copy constructor (not implemented)
 
LauGenNtupleoperator= (const LauGenNtuple &rhs)
 Copy assignment operator (not implemented)
 

Private Attributes

TString rootFileName_
 Name of root file.
 
TString rootTreeName_
 Name of root tree.
 
TFile * rootFile_
 Root file.
 
TTree * rootTree_
 Root tree.
 
Bool_t definedBranches_
 Flags whether branches are defined.
 
IntVarMap intVars_
 Integer variables.
 
DoubleVarMap doubleVars_
 Double variables.
 

Detailed Description

Class to store the results from the toy MC generation into an ntuple.

Class to store the results from the toy MC generation into an ntuple

Definition at line 45 of file LauGenNtuple.hh.

Constructor & Destructor Documentation

◆ LauGenNtuple()

LauGenNtuple::LauGenNtuple ( const TString &  rootFileName,
const TString &  rootTreeName 
)

Constructor.

Parameters
[in]rootFileNamethe name for the ntuple
[in]rootTreeNamethe name for the tree in the ntuple

Definition at line 39 of file LauGenNtuple.cc.

Member Function Documentation

◆ addDoubleBranch()

void LauGenNtuple::addDoubleBranch ( const TString &  name)

Add double branch to tree.

Parameters
[in]namethe name of the branch

Definition at line 98 of file LauGenNtuple.cc.

◆ addFriendTree()

void LauGenNtuple::addFriendTree ( const TString &  rootFileName,
const TString &  rootTreeName 
)

Add a friend tree.

Parameters
[in]rootFileNamethe name of the root file
[in]rootTreeNamethe name of the root tree

Definition at line 220 of file LauGenNtuple.cc.

◆ addIntegerBranch()

void LauGenNtuple::addIntegerBranch ( const TString &  name)

Add integer branch to tree.

Parameters
[in]namethe name of the branch

Definition at line 88 of file LauGenNtuple.cc.

◆ buildIndex()

Int_t LauGenNtuple::buildIndex ( const TString &  majorName,
const TString &  minorName = "0" 
)

Create an index table using leaves of the tree.

Parameters
[in]majorNamethe majorname
[in]minorNamethe minorname
Returns
the number of entries in the index (< 0 indicates failure)

Definition at line 187 of file LauGenNtuple.cc.

◆ definedBranches() [1/2]

Bool_t LauGenNtuple::definedBranches ( ) const
inlineprotected

Flags whether branches have been defined.

Returns
boolean to determine whether branches have been defined

Definition at line 145 of file LauGenNtuple.hh.

◆ definedBranches() [2/2]

void LauGenNtuple::definedBranches ( Bool_t  defined)
inlineprotected

Flags whether branches have been defined.

Parameters
[in]definedboolean to determine whether branches have been defined

Definition at line 151 of file LauGenNtuple.hh.

◆ fileName()

const TString& LauGenNtuple::fileName ( ) const
inline

Ntuple file name.

Returns
the name of the ntuple

Definition at line 62 of file LauGenNtuple.hh.

◆ getDoubleBranchValue()

Double_t LauGenNtuple::getDoubleBranchValue ( const TString &  name) const

Get value of a double branch.

Parameters
[in]namethe name of the branch
Returns
the value of the branch

Definition at line 130 of file LauGenNtuple.cc.

◆ getIntegerBranchValue()

Int_t LauGenNtuple::getIntegerBranchValue ( const TString &  name) const

Get value of an integer branch.

Parameters
[in]namethe name of the branch
Returns
the value of the branch

Definition at line 118 of file LauGenNtuple.cc.

◆ setDoubleBranchValue()

void LauGenNtuple::setDoubleBranchValue ( const TString &  name,
Double_t  value 
)

Set value of a double branch.

Parameters
[in]namethe name of the branch
[in]valuethe value to set the branch

Definition at line 113 of file LauGenNtuple.cc.

◆ setIntegerBranchValue()

void LauGenNtuple::setIntegerBranchValue ( const TString &  name,
Int_t  value 
)

Set value of an integer branch.

Parameters
[in]namethe name of the branch
[in]valuethe value to set the branch

Definition at line 108 of file LauGenNtuple.cc.

◆ treeName()

const TString& LauGenNtuple::treeName ( ) const
inline

Ntuple tree name.

Returns
the name of the tree

Definition at line 68 of file LauGenNtuple.hh.


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