laura is hosted by Hepforge, IPPP Durham
Laura++  v3r3
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. More...
 
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. More...
 
void deleteAndRecreateTree ()
 Delete and recreate tree. More...
 
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. More...
 
void addFriendTree (const TString &rootFileName, const TString &rootTreeName)
 Add a friend tree. More...
 

Protected Member Functions

void createFileAndTree ()
 Create ntuple file and the tree. More...
 
void defineBranches ()
 Define branches of the tree. More...
 
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. More...
 
typedef std::map< TString,
Double_t > 
DoubleVarMap
 Type to hold double precision floating point variables. More...
 

Private Member Functions

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

Private Attributes

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

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 32 of file LauGenNtuple.hh.

Member Typedef Documentation

typedef std::map<TString, Double_t> LauGenNtuple::DoubleVarMap
private

Type to hold double precision floating point variables.

Definition at line 164 of file LauGenNtuple.hh.

typedef std::map<TString, Int_t> LauGenNtuple::IntVarMap
private

Type to hold integer variables.

Definition at line 162 of file LauGenNtuple.hh.

Constructor & Destructor Documentation

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 28 of file LauGenNtuple.cc.

LauGenNtuple::~LauGenNtuple ( )
virtual

Destructor.

Definition at line 38 of file LauGenNtuple.cc.

LauGenNtuple::LauGenNtuple ( const LauGenNtuple rhs)
private

Copy constructor (not implemented)

Member Function Documentation

void LauGenNtuple::addDoubleBranch ( const TString &  name)

Add double branch to tree.

Parameters
[in]namethe name of the branch

Definition at line 82 of file LauGenNtuple.cc.

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 195 of file LauGenNtuple.cc.

void LauGenNtuple::addIntegerBranch ( const TString &  name)

Add integer branch to tree.

Parameters
[in]namethe name of the branch

Definition at line 73 of file LauGenNtuple.cc.

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 164 of file LauGenNtuple.cc.

void LauGenNtuple::createFileAndTree ( )
protected

Create ntuple file and the tree.

Definition at line 48 of file LauGenNtuple.cc.

void LauGenNtuple::defineBranches ( )
protected

Define branches of the tree.

Definition at line 123 of file LauGenNtuple.cc.

Bool_t LauGenNtuple::definedBranches ( ) const
inlineprotected

Flags whether branches have been defined.

Returns
boolean to determine whether branches have been defined

Definition at line 134 of file LauGenNtuple.hh.

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 140 of file LauGenNtuple.hh.

void LauGenNtuple::deleteAndRecreateTree ( )

Delete and recreate tree.

Definition at line 155 of file LauGenNtuple.cc.

const TString& LauGenNtuple::fileName ( ) const
inline

Ntuple file name.

Returns
the name of the ntuple

Definition at line 50 of file LauGenNtuple.hh.

void LauGenNtuple::fillBranches ( )

Fill branches in the ntuple.

Definition at line 144 of file LauGenNtuple.cc.

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 112 of file LauGenNtuple.cc.

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 101 of file LauGenNtuple.cc.

LauGenNtuple& LauGenNtuple::operator= ( const LauGenNtuple rhs)
private

Copy assignment operator (not implemented)

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 96 of file LauGenNtuple.cc.

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 91 of file LauGenNtuple.cc.

const TString& LauGenNtuple::treeName ( ) const
inline

Ntuple tree name.

Returns
the name of the tree

Definition at line 56 of file LauGenNtuple.hh.

void LauGenNtuple::writeOutGenResults ( )

Write out the results from the generation.

Definition at line 173 of file LauGenNtuple.cc.

Member Data Documentation

Bool_t LauGenNtuple::definedBranches_
private

Flags whether branches are defined.

Definition at line 159 of file LauGenNtuple.hh.

DoubleVarMap LauGenNtuple::doubleVars_
private

Double variables.

Definition at line 169 of file LauGenNtuple.hh.

IntVarMap LauGenNtuple::intVars_
private

Integer variables.

Definition at line 167 of file LauGenNtuple.hh.

TFile* LauGenNtuple::rootFile_
private

Root file.

Definition at line 154 of file LauGenNtuple.hh.

TString LauGenNtuple::rootFileName_
private

Name of root file.

Definition at line 150 of file LauGenNtuple.hh.

TTree* LauGenNtuple::rootTree_
private

Root tree.

Definition at line 156 of file LauGenNtuple.hh.

TString LauGenNtuple::rootTreeName_
private

Name of root tree.

Definition at line 152 of file LauGenNtuple.hh.


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