19#include "RebdsimTypes.hh"
21#include "BDSOutputROOTEventModel.hh"
35Model::Model(
bool debugIn,
39 dataVersion(dataVersionIn)
51 const RBDS::VectorString* branchesToTurnOn)
54 t->SetBranchStatus(
"*",
false);
57 {t->SetBranchStatus(
"*",
true);}
58 else if (branchesToTurnOn)
60 for (
const auto& name : *branchesToTurnOn)
62 std::string nameStar = name +
".*";
64 {std::cout <<
"Turning on branch \"" << nameStar <<
"\"" << std::endl;}
65 t->SetBranchStatus(nameStar.c_str(),
true);
69 t->SetBranchAddress(
"Model.", &
model);
75 {
return model->samplerNamesUnique;}
77 {
return std::vector<std::string>();}
80std::vector<std::string> Model::SamplerCNames()
const
82 return model ?
model->samplerCNamesUnique : std::vector<std::string>();
85std::vector<std::string> Model::SamplerSNames()
const
87 return model ?
model->samplerSNamesUnique : std::vector<std::string>();
95 {
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.