20#include "RebdsimTypes.hh"
22#include "BDSOutputROOTEventModel.hh"
36Model::Model(
bool debugIn,
40 dataVersion(dataVersionIn)
52 const RBDS::VectorString* branchesToTurnOn)
55 t->SetBranchStatus(
"*",
false);
58 {t->SetBranchStatus(
"*",
true);}
59 else if (branchesToTurnOn)
61 for (
const auto& name : *branchesToTurnOn)
63 std::string nameStar = name +
".*";
65 {std::cout <<
"Turning on branch \"" << nameStar <<
"\"" << std::endl;}
66 t->SetBranchStatus(nameStar.c_str(),
true);
70 t->SetBranchAddress(
"Model.", &
model);
76 {
return model->samplerNamesUnique;}
78 {
return std::vector<std::string>();}
81std::vector<std::string> Model::SamplerCNames()
const
83 return model ?
model->samplerCNamesUnique : std::vector<std::string>();
86std::vector<std::string> Model::SamplerSNames()
const
88 return model ?
model->samplerSNamesUnique : std::vector<std::string>();
96 {
return std::vector<std::string>();}
Information stored per model representing accelerator.
std::vector< std::string > collimatorBranchNamesUnique
Vector of all collimator branch names in event tree used to load data.
BDSOutputROOTEventModel * model
Member that ROOT can map file data to locally.
std::vector< std::string > CollimatorNames() const
Access all the sampler branch names from the model.
void SetBranchAddress(TTree *t, bool allBranchesOn=true, const RBDS::VectorString *branchesToTurnOn=nullptr)
Set the branch addresses to address the contents of the file.
std::vector< std::string > SamplerNames() const
Access all the unique sampler names from the model.