|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Loader for a ROOT file using classes used to generate the file. More...
#include <DataLoader.hh>

Public Member Functions | |
| DataLoader (const std::string &fileName, bool debugIn=false, bool processSamplersIn=true, bool allBranchesOn=true, const RBDS::BranchMap *branchesToTurnOn=nullptr, bool backwardsCompatibleIn=true) | |
| void | CommonCtor (const std::string &fileName) |
| void | BuildInputFileList (std::string inputPath) |
| Build up the input file list. | |
| void | BuildTreeNameList () |
| Open the first file in the file list and map the trees in it. | |
| void | BuildEventBranchNameList () |
| void | ChainTrees () |
| Create a tree for each sampler and add all the files to it. | |
| void | SetBranchAddress (bool allOn=true, const RBDS::BranchMap *bToTurnOn=nullptr) |
| Map each chain to the member instance of each storage class in this class. | |
| int | DataVersion () const |
| const std::set< std::string > & | GetAllCylindricalAndSphericalSamplerNames () const |
| const std::set< std::string > & | GetAllCylindricalSamplerNames () const |
| const std::set< std::string > & | GetAllSphericalSamplerNames () const |
| std::vector< std::string > | GetFileNames () |
| Accessor. | |
| std::vector< std::string > | GetTreeNames () |
| Accessor. | |
| std::vector< std::string > | GetBranchNames () |
| Accessor. | |
| std::vector< std::string > | GetSamplerNames () |
| Accessor. | |
| std::vector< std::string > | GetSamplerCNames () |
| Accessor. | |
| std::vector< std::string > | GetSamplerSNames () |
| Accessor. | |
| std::vector< std::string > | GetCollimatorNames () |
| Accessor. | |
| Header * | GetHeader () |
| Accessor. | |
| ParticleData * | GetParticleData () |
| Accessor. | |
| Beam * | GetBeam () |
| Accessor. | |
| Options * | GetOptions () |
| Accessor. | |
| Model * | GetModel () |
| Accessor. | |
| Event * | GetEvent () |
| Accessor. | |
| Run * | GetRun () |
| Accessor. | |
| TChain * | GetHeaderTree () |
| Accessor. | |
| TChain * | GetParticleDataTree () |
| Accessor. | |
| TChain * | GetBeamTree () |
| Accessor. | |
| TChain * | GetOptionsTree () |
| Accessor. | |
| TChain * | GetModelTree () |
| Accessor. | |
| TChain * | GetEventTree () |
| Accessor. | |
| TChain * | GetRunTree () |
| Accessor. | |
Private Member Functions | |
| ClassDef (DataLoader, 2) | |
Private Attributes | |
| bool | debug |
| bool | processSamplers |
| bool | allBranchesOn |
| const RBDS::BranchMap * | branchesToTurnOn |
| bool | backwardsCompatible |
| Header * | hea |
| ParticleData * | par |
| Beam * | bea |
| Options * | opt |
| Model * | mod |
| Event * | evt |
| Run * | run |
| std::vector< std::string > | fileNames |
| std::vector< std::string > | treeNames |
| std::vector< std::string > | branchNames |
| std::vector< std::string > | samplerNames |
| std::vector< std::string > | samplerCNames |
| std::vector< std::string > | samplerSNames |
| std::vector< std::string > | allSamplerNames |
| std::vector< std::string > | allCSamplerNames |
| std::vector< std::string > | allSSamplerNames |
| std::vector< std::string > | collimatorNames |
| std::set< std::string > | allSamplerCAndSNames |
| std::set< std::string > | allSamplerCNamesSet |
| std::set< std::string > | allSamplerSNamesSet |
| TChain * | heaChain |
| TChain * | parChain |
| TChain * | beaChain |
| TChain * | optChain |
| TChain * | modChain |
| TChain * | evtChain |
| TChain * | runChain |
| int | dataVersion |
| Integer version of data loaded. | |
Loader for a ROOT file using classes used to generate the file.
Definition at line 46 of file DataLoader.hh.
|
virtual |
Definition at line 64 of file DataLoader.cc.
| void DataLoader::BuildEventBranchNameList | ( | ) |
Inspect the first file (leaving it open...) and build a list of samplers by checking whether they have 'Sampler' in the name.
Definition at line 200 of file DataLoader.cc.
References allSamplerCAndSNames, Model::CollimatorNames(), dataVersion, Model::SamplerNames(), and Model::SetBranchAddress().
Referenced by CommonCtor().


| void DataLoader::BuildInputFileList | ( | std::string | inputPath | ) |
Build up the input file list.
Definition at line 121 of file DataLoader.cc.
References dataVersion, and RBDS::IsBDSIMOutputFile().
Referenced by CommonCtor().


| void DataLoader::BuildTreeNameList | ( | ) |
Open the first file in the file list and map the trees in it.
Definition at line 179 of file DataLoader.cc.
Referenced by CommonCtor().

| void DataLoader::ChainTrees | ( | ) |
Create a tree for each sampler and add all the files to it.
Definition at line 290 of file DataLoader.cc.
References dataVersion.
Referenced by CommonCtor().

| void DataLoader::CommonCtor | ( | const std::string & | fileName | ) |
Create an instance of each class in the file to be overlaid by loading the ROOT file.
Definition at line 82 of file DataLoader.cc.
References BuildEventBranchNameList(), BuildInputFileList(), BuildTreeNameList(), ChainTrees(), dataVersion, ParticleData::particleData, and SetBranchAddress().

|
inline |
Definition at line 79 of file DataLoader.hh.
|
inline |
Definition at line 105 of file DataLoader.hh.
|
inline |
Definition at line 106 of file DataLoader.hh.
|
inline |
Definition at line 107 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 91 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 98 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 84 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 88 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 94 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 101 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 82 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 89 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 96 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 93 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 100 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 92 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 99 of file DataLoader.hh.
Referenced by EventDisplay::EventDisplay().

|
inline |
Accessor.
Definition at line 90 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 97 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 95 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 102 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 86 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 85 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 87 of file DataLoader.hh.
|
inline |
Accessor.
Definition at line 83 of file DataLoader.hh.
| void DataLoader::SetBranchAddress | ( | bool | allOn = true, |
| const RBDS::BranchMap * | bToTurnOn = nullptr |
||
| ) |
Map each chain to the member instance of each storage class in this class.
Definition at line 306 of file DataLoader.cc.
References dataVersion, Header::SetBranchAddress(), ParticleData::SetBranchAddress(), Beam::SetBranchAddress(), Model::SetBranchAddress(), Options::SetBranchAddress(), Run::SetBranchAddress(), and Event::SetBranchAddress().
Referenced by CommonCtor().


|
private |
Definition at line 112 of file DataLoader.hh.
|
private |
Definition at line 131 of file DataLoader.hh.
|
private |
We need to know if a sampler is a C or S type sampler for different variable names. Build a set of them together.
Definition at line 137 of file DataLoader.hh.
Referenced by BuildEventBranchNameList().
|
private |
Definition at line 138 of file DataLoader.hh.
|
private |
Definition at line 130 of file DataLoader.hh.
|
private |
Definition at line 139 of file DataLoader.hh.
|
private |
Definition at line 132 of file DataLoader.hh.
|
private |
Definition at line 114 of file DataLoader.hh.
|
private |
Definition at line 118 of file DataLoader.hh.
|
private |
Definition at line 143 of file DataLoader.hh.
|
private |
Definition at line 113 of file DataLoader.hh.
|
private |
Definition at line 126 of file DataLoader.hh.
|
private |
Definition at line 133 of file DataLoader.hh.
|
private |
Integer version of data loaded.
Definition at line 149 of file DataLoader.hh.
Referenced by BuildEventBranchNameList(), BuildInputFileList(), ChainTrees(), CommonCtor(), and SetBranchAddress().
|
private |
Definition at line 110 of file DataLoader.hh.
|
private |
Definition at line 121 of file DataLoader.hh.
|
private |
Definition at line 146 of file DataLoader.hh.
|
private |
Definition at line 124 of file DataLoader.hh.
|
private |
Definition at line 116 of file DataLoader.hh.
|
private |
Definition at line 141 of file DataLoader.hh.
|
private |
Definition at line 120 of file DataLoader.hh.
|
private |
Definition at line 145 of file DataLoader.hh.
|
private |
Definition at line 119 of file DataLoader.hh.
|
private |
Definition at line 144 of file DataLoader.hh.
|
private |
Definition at line 117 of file DataLoader.hh.
|
private |
Definition at line 142 of file DataLoader.hh.
|
private |
Definition at line 111 of file DataLoader.hh.
|
private |
Definition at line 122 of file DataLoader.hh.
|
private |
Definition at line 147 of file DataLoader.hh.
|
private |
Definition at line 128 of file DataLoader.hh.
|
private |
Definition at line 127 of file DataLoader.hh.
|
private |
Definition at line 129 of file DataLoader.hh.
|
private |
Definition at line 125 of file DataLoader.hh.