BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Member Functions | Private Attributes
Model Class Reference

Model loader. More...

#include <Model.hh>

Collaboration diagram for Model:
Collaboration graph

Public Member Functions

 Model (bool debugIn, int dataVersionIn=0)
 
std::vector< std::string > SamplerNames () const
 Access all the unique sampler names from the model. More...
 
std::vector< std::string > SamplerCNames () const
 
std::vector< std::string > SamplerSNames () const
 
std::vector< std::string > CollimatorNames () const
 Access all the sampler branch names from the model. More...
 
int DataVersion () const
 Accessor. More...
 
void SetDataVersion (int dataVersionIn)
 
void SetBranchAddress (TTree *t, bool allBranchesOn=true, const RBDS::VectorString *branchesToTurnOn=nullptr)
 Set the branch addresses to address the contents of the file. More...
 

Data Fields

BDSOutputROOTEventModelmodel
 Member that ROOT can map file data to locally. More...
 

Private Member Functions

 ClassDef (Model, 2)
 

Private Attributes

bool debug
 
int dataVersion
 

Detailed Description

Model loader.

Author
Stuart Walker.

Definition at line 35 of file Model.hh.

Constructor & Destructor Documentation

◆ Model()

Model::Model ( bool  debugIn,
int  dataVersionIn = 0 
)

Definition at line 36 of file Model.cc.

◆ ~Model()

Model::~Model ( )
virtual

Definition at line 45 of file Model.cc.

Member Function Documentation

◆ CollimatorNames()

std::vector< std::string > Model::CollimatorNames ( ) const

Access all the sampler branch names from the model.

Definition at line 91 of file Model.cc.

References BDSOutputROOTEventModel::collimatorBranchNamesUnique, and model.

Referenced by DataLoader::BuildEventBranchNameList().

Here is the caller graph for this function:

◆ DataVersion()

int Model::DataVersion ( ) const
inline

Accessor.

Definition at line 52 of file Model.hh.

◆ SamplerCNames()

std::vector< std::string > Model::SamplerCNames ( ) const

Definition at line 81 of file Model.cc.

◆ SamplerNames()

std::vector< std::string > Model::SamplerNames ( ) const

Access all the unique sampler names from the model.

Definition at line 73 of file Model.cc.

References model.

Referenced by DataLoader::BuildEventBranchNameList(), and Compare::Trees().

Here is the caller graph for this function:

◆ SamplerSNames()

std::vector< std::string > Model::SamplerSNames ( ) const

Definition at line 86 of file Model.cc.

◆ SetBranchAddress()

void Model::SetBranchAddress ( TTree *  t,
bool  allBranchesOn = true,
const RBDS::VectorString *  branchesToTurnOn = nullptr 
)

Set the branch addresses to address the contents of the file.

Definition at line 50 of file Model.cc.

References model.

Referenced by DataLoader::BuildEventBranchNameList(), DataLoader::SetBranchAddress(), and Compare::Trees().

Here is the caller graph for this function:

◆ SetDataVersion()

void Model::SetDataVersion ( int  dataVersionIn)
inline

Allow setting of data version if default constructor is used. If the default constructor was used, this function should be used before SetBranchAddress().

Definition at line 56 of file Model.hh.

Field Documentation

◆ dataVersion

int Model::dataVersion
private

Definition at line 69 of file Model.hh.

◆ debug

bool Model::debug
private

Definition at line 68 of file Model.hh.

◆ model

BDSOutputROOTEventModel* Model::model

Member that ROOT can map file data to locally.

Definition at line 64 of file Model.hh.

Referenced by CollimatorNames(), EventDisplay::DrawModel(), EventDisplay::DrawSamplers(), SamplerNames(), and SetBranchAddress().


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