BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
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.
 
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.
 
int DataVersion () const
 Accessor.
 
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.
 

Data Fields

BDSOutputROOTEventModel * model
 Member that ROOT can map file data to locally.
 

Private Member Functions

 ClassDef (Model, 2)
 

Private Attributes

bool debug
 
int dataVersion
 

Detailed Description

Model loader.

Author
Stuart Walker.

Definition at line 34 of file Model.hh.

Constructor & Destructor Documentation

◆ Model()

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

Definition at line 35 of file Model.cc.

◆ ~Model()

Model::~Model ( )
virtual

Definition at line 44 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 90 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 51 of file Model.hh.

◆ SamplerCNames()

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

Definition at line 80 of file Model.cc.

◆ SamplerNames()

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

Access all the unique sampler names from the model.

Definition at line 72 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 85 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 49 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 55 of file Model.hh.

Field Documentation

◆ dataVersion

int Model::dataVersion
private

Definition at line 68 of file Model.hh.

◆ debug

bool Model::debug
private

Definition at line 67 of file Model.hh.

◆ model

BDSOutputROOTEventModel* Model::model

Member that ROOT can map file data to locally.

Definition at line 63 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: